Skip to content

Commit 2728fe7

Browse files
committed
use css variables in style
1 parent c8d17b6 commit 2728fe7

File tree

1 file changed

+37
-38
lines changed

1 file changed

+37
-38
lines changed

src/main/resources/static/index.html

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,65 +4,64 @@
44
<meta charset="UTF-8">
55
<title>Lavalink Config Server</title>
66
<link rel="icon" href="lavalink.svg" type="image/png">
7+
<meta name="darkreader-lock">
78
<style>
9+
:root {
10+
--font-family: Arial;
11+
--button-border-radius: 20px;
12+
--transition-duration: 0.3s;
13+
}
14+
15+
@media (prefers-color-scheme: dark) {
16+
:root {
17+
--background-color: #1e1e1e;
18+
--text-color: #ffffff;
19+
--button-bg: #ff624a;
20+
--button-hover-bg: #e65c00;
21+
}
22+
}
23+
24+
@media (prefers-color-scheme: light) {
25+
:root {
26+
--background-color: #ffffff;
27+
--text-color: #000000;
28+
--button-bg: #ff624a;
29+
--button-hover-bg: #e65c00;
30+
}
31+
}
32+
833
body {
9-
background-color: #ff624a;
10-
color: #ffffff;
11-
font-family: Arial, sans-serif;
34+
background-color: var(--background-color);
35+
color: var(--text-color);
36+
font-family: var(--font-family), sans-serif;
1237
text-align: center;
1338
padding-top: 100px;
14-
transition: background-color 0.3s ease, color 0.3s ease;
39+
transition: background-color var(--transition-duration) ease, color var(--transition-duration) ease;
1540
}
41+
1642
img {
1743
width: 150px;
1844
margin-bottom: 30px;
1945
}
46+
2047
h1 {
2148
font-size: 36px;
2249
margin-bottom: 20px;
2350
}
51+
2452
a.button {
2553
display: inline-block;
2654
padding: 12px 24px;
27-
background-color: #ff624a;
55+
background-color: var(--button-bg);
2856
color: #ffffff;
2957
text-decoration: none;
30-
border-radius: 20px;
58+
border-radius: var(--button-border-radius);
3159
font-size: 18px;
32-
transition: background-color 0.3s ease, color 0.3s ease;
60+
transition: background-color var(--transition-duration) ease, color var(--transition-duration) ease;
3361
}
34-
a.button:hover {
35-
background-color: #e65c00;
36-
}
37-
@media (prefers-color-scheme: dark) {
38-
body {
39-
background-color: #1e1e1e;
40-
color: #ffffff;
41-
}
42-
43-
a.button {
44-
background-color: #ff624a;
45-
color: #ffffff;
46-
}
47-
48-
a.button:hover {
49-
background-color: #e65c00;
50-
}
51-
}
52-
@media (prefers-color-scheme: light) {
53-
body {
54-
background-color: #ffffff;
55-
color: #000000;
56-
}
5762

58-
a.button {
59-
background-color: #ff624a;
60-
color: #ffffff;
61-
}
62-
63-
a.button:hover {
64-
background-color: #e65c00;
65-
}
63+
a.button:hover {
64+
background-color: var(--button-hover-bg);
6665
}
6766
</style>
6867
</head>

0 commit comments

Comments
 (0)