Skip to content

Commit 0f71215

Browse files
committed
adaptive dark theme
1 parent 8b310ea commit 0f71215

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<meta name="description" content="Enka.Network API responses and data mapping reference.">
88
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
99
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
10+
<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="style/themes/dark.css">
1011
</head>
1112
<body>
1213
<div id="app"></div>

style/themes/dark.css

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
body {
2+
--bg-color:#12151b;
3+
--sidebar-bg-color: #181a20;
4+
--text-color: rgba(255, 255, 255, 0.8);
5+
}
6+
7+
body {
8+
background-color: var(--bg-color);
9+
color: var(--text-color);
10+
--theme-color: #84baff;
11+
}
12+
13+
.sidebar {
14+
background-color:var(--sidebar-bg-color);
15+
border-right: 1px solid rgba(255, 255, 255, 0.07);
16+
color: var(--text-color);
17+
}
18+
19+
.sidebar-toggle {
20+
background-color: var(--sidebar-bg-color);
21+
color: var(--text-color);
22+
}
23+
24+
body.close .sidebar-toggle {
25+
background-color: var(--bg-color);
26+
color: var(--text-color);
27+
}
28+
29+
.github-corner svg {
30+
color: var(--bg-color);;
31+
}
32+
33+
.sidebar ul li a {
34+
color: var(--text-color);
35+
}
36+
37+
.anchor span {
38+
color: rgba(255, 255, 255, 0.85);
39+
}
40+
41+
.markdown-section code {
42+
border-radius: 2px;
43+
background-color: rgb(0, 0, 0, 0.4);
44+
color: #caaa85;
45+
margin: 0 2px;
46+
padding: 3px 5px;
47+
white-space: pre-wrap;
48+
}
49+
50+
.markdown-section pre {
51+
color: var(--text-color);
52+
background-color: rgb(0, 0, 0, 0.4);
53+
}
54+
55+
.markdown-section pre > code {
56+
color: var(--text-color);
57+
background-color: rgb(0, 0, 0, 0.0);
58+
}
59+
60+
.markdown-section tr {
61+
border-top: 1px solid #ffffff;
62+
}
63+
64+
.markdown-section td, .markdown-section th {
65+
border: 1px solid rgba(255, 255, 255, 0.1);
66+
padding: 6px 13px;
67+
}
68+
69+
.markdown-section p.tip, .markdown-section tr:nth-child(2n) {
70+
background-color: #00000033;
71+
}
72+
73+
.markdown-section strong {
74+
color: #ffffffb0;
75+
font-weight: 600;
76+
}

0 commit comments

Comments
 (0)