Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaa24730

Browse files
authored
Merge pull request#38 from LouisDISPA/main
Add dark mode support to website
2 parents6811eff +219f09a commitaa24730

File tree

9 files changed

+158
-45
lines changed

9 files changed

+158
-45
lines changed

‎.github/workflows/website.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ jobs:
6464
cd findutils
6565
cd docs
6666
mdbook build
67-
67+
6868
-name:Run Zola
69-
uses:shalzz/zola-deploy-action@v0.18.0
69+
uses:shalzz/zola-deploy-action@v0.20.0
7070
env:
7171
BUILD_DIR:uutils.github.io
7272
BUILD_ONLY:true
@@ -158,6 +158,7 @@ jobs:
158158
url:${{ steps.deployment.outputs.page_url }}
159159
runs-on:ubuntu-latest
160160
needs:build
161+
if:(github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'schedule'
161162
steps:
162163
-name:Deploy to GitHub Pages
163164
id:deployment

‎.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
/public/
1+
/public/
2+
/static/syntax-*

‎README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ It is available on:
88
https://uutils.github.io/coreutils/docs/
99

1010
Can be generated with:
11-
```
11+
```bash
1212
cargo run --bin uudoc --all-features
1313
cd docs
1414
mdbook build
@@ -20,7 +20,7 @@ It is available on:
2020
https://uutils.github.io/dev/coreutils/
2121

2222
Can be generated with:
23-
```
23+
```bash
2424
cargo doc --no-deps --all-features --workspace
2525
```
2626

‎config.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ description = ""
77

88
default_language ="en"
99

10-
paginate_by =10
11-
12-
generate_feed =true
10+
generate_feeds =true
1311

1412
[markdown]
1513
highlight_code =true
16-
highlight_theme ="OneHalfLight"
14+
highlight_theme ="css"
15+
16+
highlight_themes_css = [
17+
{theme ="OneHalfDark",filename ="syntax-theme-dark.css" },
18+
{theme ="OneHalfLight",filename ="syntax-theme-light.css" },
19+
]

‎content/_index.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ template = "index.html"
44
+++
55

66
<divclass="hero">
7-
<imgsrc="logo.svg">
8-
<div>uutils</div>
7+
<picture>
8+
<source srcset="logo-dark.svg" media="(prefers-color-scheme: dark)">
9+
<img src="logo.svg">
10+
</picture>
11+
<div>uutils</div>
912
</div>
1013

1114
The uutils project reimplements ubiquitous command line utilities in

‎content/gsoc.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ However, a bunch of work remains on the color side for a full GNU compat. Other
6565
We have 12 remaining failing tests.
6666

6767
To get the list of failing tests, run:
68-
```
69-
$ ./util/remaining-gnu-error.py |grep "/ls/"
68+
```bash
69+
$ ./util/remaining-gnu-error.py|grep"/ls/"
7070
```
7171

7272
- Difficulty: Medium
@@ -82,8 +82,8 @@ Most of the features in `cp` have been implemented by now.
8282
However, some corner cases needs to be implemented. We have 16 remaining failing tests.
8383

8484
To get the list of failing tests, run:
85-
```
86-
$ ./util/remaining-gnu-error.py |grep "/cp/"
85+
```bash
86+
$ ./util/remaining-gnu-error.py|grep"/cp/"
8787
```
8888

8989
- Difficulty: Medium
@@ -99,8 +99,8 @@ Most of the features in `mv` have been implemented by now.
9999
However, some corner cases needs to be implemented. We have 10 remaining failing tests.
100100

101101
To get the list of failing tests, run:
102-
```
103-
$ ./util/remaining-gnu-error.py |grep "/mv/"
102+
```bash
103+
$ ./util/remaining-gnu-error.py|grep"/mv/"
104104
```
105105

106106
- Difficulty: Medium

‎static/logo-dark.svg

Lines changed: 61 additions & 0 deletions
Loading

‎static/style.css

Lines changed: 65 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,50 @@
11
:root {
2+
/* Light theme colors (default) */
3+
4+
--accent-color:#c04828;
5+
26
--dark-fg-color:#fff;
37
--light-fg-color:#141414;
48
--light-bg-color:var(--dark-fg-color);
59
--dark-bg-color:var(--light-fg-color);
610
--fg-color:var(--light-fg-color);
711
--bg-color:var(--light-bg-color);
8-
--light-link-color:#c04828;
9-
--dark-link-color:#c04828;
10-
--link-color:var(--light-link-color);
12+
--link-color:var(--accent-color);
1113
--light-highlight-bg-color:#ededed;
1214
--light-highlight-fg-color:#595959;
1315
--dark-highlight-bg-color:#27272a;
1416
--dark-highlight-fg-color:#ededed;
1517
--highlight-fg-color:var(--light-highlight-fg-color);
1618
--highlight-bg-color:var(--light-highlight-bg-color);
19+
--link-text-color:var(--accent-color);
20+
--header-border-color:#ddd;
21+
--post-bg-color:#e5e5e5;
1722
--font-face:"Fira Sans", sans-serif;
23+
24+
--github-icon:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E");
25+
--github-icon-black:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='000' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E");
26+
}
27+
28+
@media (prefers-color-scheme: dark) {
29+
:root {
30+
--fg-color:#e1e1e1;
31+
--bg-color:#222222;
32+
--link-color:var(--accent-color);
33+
--light-highlight-bg-color:#2d2d2d;
34+
--light-highlight-fg-color:#ffffff;
35+
--dark-highlight-bg-color:#27272a;
36+
--dark-highlight-fg-color:#ededed;
37+
--highlight-fg-color:var(--light-highlight-fg-color);
38+
--highlight-bg-color:var(--light-highlight-bg-color);
39+
--link-text-color:var(--accent-color);
40+
--header-border-color:#404040;
41+
--post-bg-color:#2d2d2d;
42+
}
43+
}
44+
45+
body {
46+
background-color:var(--bg-color);
47+
color:var(--fg-color);
1848
}
1949

2050
*,
@@ -89,7 +119,7 @@ header {
89119
justify-items: center;
90120
padding:0.5rem2rem;
91121
width:100%;
92-
border-bottom:1px solid#ddd;
122+
border-bottom:1px solidvar(--header-border-color);
93123
font-size:1.2rem;
94124
}
95125

@@ -111,13 +141,12 @@ header .home svg {
111141
}
112142

113143
headera {
114-
color:black;
144+
color:var(--fg-color);
115145
border-bottom:2px solid transparent;
116146
}
117147

118148
headera:hover:not(.home) {
119-
color: black;
120-
border-bottom:2px solid#c04828;
149+
border-bottom:2px solidvar(--link-text-color);
121150
}
122151

123152
.navigation-block {
@@ -149,13 +178,13 @@ header .icon {
149178
#mobile-open-navigationbuttondiv {
150179
margin:0.5em0;
151180
width:2em;
152-
border-bottom:0.25em solidblack;
181+
border-bottom:0.25em solidvar(--fg-color);
153182
}
154183

155184
header {
156185
grid-template-columns: max-content1fr;
157186
}
158-
187+
159188
.spacer {
160189
display: none;
161190
}
@@ -165,7 +194,7 @@ header .icon {
165194
grid-column: auto/ span2;
166195
justify-self: left;
167196
}
168-
197+
169198
header:not(.open) .spacer,
170199
header:not(.open) .navigation-block {
171200
display: none;
@@ -273,8 +302,8 @@ ul {
273302
/* FOOTER */
274303
footer {
275304
align-items: center;
276-
background-color:var(--fg-color);
277-
color:var(--bg-color);
305+
background-color:var(--light-fg-color);
306+
color:var(--light-bg-color);
278307
display: flex;
279308
flex-grow:0;
280309
flex-shrink:1;
@@ -286,17 +315,23 @@ footer {
286315
}
287316

288317
.github-icon {
289-
background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E");
318+
background-image:var(--github-icon);
290319
height:1.25rem;
291320
width:1.25rem;
292321
}
293322

294323
.github-icon-black {
295-
background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='000' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E");
324+
background-image:var(--github-icon-black);
296325
height:1em;
297326
width:1em;
298327
}
299328

329+
@media (prefers-color-scheme: dark) {
330+
.github-icon-black {
331+
background-image:var(--github-icon);
332+
}
333+
}
334+
300335
.projects {
301336
display: flex;
302337
flex-direction: column;
@@ -325,13 +360,13 @@ footer {
325360
margin-bottom:0;
326361
}
327362

328-
.project>span {
363+
.project>span {
329364
color: transparent;
330365
transition: color0.3s;
331366
}
332367

333-
.project:hover>span {
334-
color:black;
368+
.project:hover>span {
369+
color:var(--fg-color);
335370
}
336371

337372
.project:hover {
@@ -342,6 +377,7 @@ footer {
342377
font-size:3em;
343378
font-weight:900;
344379
margin-bottom:0.5em;
380+
text-transform: capitalize;
345381
}
346382

347383
@media (min-width:640px) {
@@ -353,21 +389,21 @@ footer {
353389

354390
.details {
355391
margin-bottom:1.5em;
356-
color:#333;
392+
color:var(--fg-color);
357393
}
358394

359395
.post-thingy {
360396
display: block;
361397
padding:1em;
362-
color:black;
363-
background:#e5e5e5;
398+
color:var(--fg-color);
399+
background:var(--post-bg-color);
364400
border-radius:0.3em;
365-
border:0.2em solid#e5e5e5;
401+
border:0.2em solidvar(--post-bg-color);
366402
margin-bottom:0.5em;
367403
}
368404

369405
.post-thingy:hover {
370-
border-color:#c04828;
406+
border-color:var(--link-text-color);
371407
background: transparent;
372408
}
373409

@@ -391,8 +427,14 @@ blockquote {
391427

392428
.links>a {
393429
padding:0.2em1em;
394-
color:#c04828;
430+
color:var(--link-text-color);
395431
border:2px solid#c04828;
396432
flex:1;
397433
text-align: center;
398434
}
435+
436+
.links>a:hover {
437+
color:var(--dark-fg-color);
438+
background-color:#c04828;
439+
border-color:#c04828;
440+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp