Skip to content

Commit 82f0ee5

Browse files
authored
docs: improve dark mode (#859)
* add darkmode css file * add style for dark mode * move hljs to js/hljs.js * set use js/ dir for js files * remove - form extra_css
1 parent cb3ade8 commit 82f0ee5

File tree

3 files changed

+48
-2
lines changed

3 files changed

+48
-2
lines changed

docs/assets/css/dark_mode.css

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
[data-md-color-scheme="slate"] {
2+
--md-primary-fg-color: #6a290d;
3+
--md-primary-fg-color--light: #8d7474;
4+
--md-primary-fg-color--dark: #6d554d;
5+
6+
.hljs-title,
7+
.hljs-title.class_,
8+
.hljs-title.class_.inherited__,
9+
.hljs-title.function_ {
10+
color: #c9a69b;
11+
}
12+
13+
.hljs-meta .hljs-string,
14+
.hljs-regexp,
15+
.hljs-string {
16+
color: #a3b4c7;
17+
}
18+
19+
.hljs-attr,
20+
.hljs-attribute,
21+
.hljs-literal,
22+
.hljs-meta,
23+
.hljs-number,
24+
.hljs-operator,
25+
.hljs-selector-attr,
26+
.hljs-selector-class,
27+
.hljs-selector-id,
28+
.hljs-variable {
29+
color: #c1b79f;
30+
}
31+
32+
.hljs-doctag,
33+
.hljs-keyword,
34+
.hljs-meta .hljs-keyword,
35+
.hljs-template-tag,
36+
.hljs-template-variable,
37+
.hljs-type,
38+
.hljs-variable.language_ {
39+
color: #c97100;
40+
}
41+
42+
.hljs-subst {
43+
color: #ddba52
44+
}
45+
}
File renamed without changes.

mkdocs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ extra:
5454
- icon: material/slack
5555
link: https://join.slack.com/t/codeigniterchat/shared_invite/zt-244xrrslc-l_I69AJSi5y2a2RVN~xIdQ
5656
name: Slack
57-
57+
5858

5959
repo_url: https://github.com/codeigniter4/shield
6060
edit_uri: edit/develop/docs/
@@ -67,10 +67,11 @@ markdown_extensions:
6767

6868
extra_css:
6969
- https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/github.min.css
70+
- assets/css/dark_mode.css
7071

7172
extra_javascript:
7273
- https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js
73-
- assets/hljs.js
74+
- assets/js/hljs.js
7475

7576
nav:
7677
- Home: index.md

0 commit comments

Comments
 (0)