From 76e30d8950e70e28aaba38fb77caef429dc8c80a Mon Sep 17 00:00:00 2001 From: Louis Dispa Date: Sun, 16 Feb 2025 22:42:11 +0100 Subject: [PATCH 1/6] Update to zola v0.20 --- .github/workflows/website.yml | 4 ++-- config.toml | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 17cdfd021..b4c4fb680 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -64,9 +64,9 @@ jobs: cd findutils cd docs mdbook build - + - name: Run Zola - uses: shalzz/zola-deploy-action@v0.18.0 + uses: shalzz/zola-deploy-action@v0.20.0 env: BUILD_DIR: uutils.github.io BUILD_ONLY: true diff --git a/config.toml b/config.toml index be03294fa..f80949de2 100644 --- a/config.toml +++ b/config.toml @@ -7,9 +7,7 @@ description = "" default_language = "en" -paginate_by = 10 - -generate_feed = true +generate_feeds = true [markdown] highlight_code = true From f55d745bf78a148cfaf39e4d214ecf55b9a47d60 Mon Sep 17 00:00:00 2001 From: Louis Dispa Date: Sun, 16 Feb 2025 22:43:07 +0100 Subject: [PATCH 2/6] Add languages to code blocks --- README.md | 4 ++-- content/gsoc.md | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 275051574..f67b8508e 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ It is available on: https://uutils.github.io/coreutils/docs/ Can be generated with: -``` +```bash cargo run --bin uudoc --all-features cd docs mdbook build @@ -20,7 +20,7 @@ It is available on: https://uutils.github.io/dev/coreutils/ Can be generated with: -``` +```bash cargo doc --no-deps --all-features --workspace ``` diff --git a/content/gsoc.md b/content/gsoc.md index de386e3d5..77ba7b010 100644 --- a/content/gsoc.md +++ b/content/gsoc.md @@ -65,8 +65,8 @@ However, a bunch of work remains on the color side for a full GNU compat. Other We have 12 remaining failing tests. To get the list of failing tests, run: -``` -$ ./util/remaining-gnu-error.py |grep "/ls/" +```bash +$ ./util/remaining-gnu-error.py | grep "/ls/" ``` - Difficulty: Medium @@ -82,8 +82,8 @@ Most of the features in `cp` have been implemented by now. However, some corner cases needs to be implemented. We have 16 remaining failing tests. To get the list of failing tests, run: -``` -$ ./util/remaining-gnu-error.py |grep "/cp/" +```bash +$ ./util/remaining-gnu-error.py | grep "/cp/" ``` - Difficulty: Medium @@ -99,8 +99,8 @@ Most of the features in `mv` have been implemented by now. However, some corner cases needs to be implemented. We have 10 remaining failing tests. To get the list of failing tests, run: -``` -$ ./util/remaining-gnu-error.py |grep "/mv/" +```bash +$ ./util/remaining-gnu-error.py | grep "/mv/" ``` - Difficulty: Medium From 7cfe565c290fb41f1fadfc8bd64bd25fe5c000ac Mon Sep 17 00:00:00 2001 From: Louis Dispa Date: Sun, 16 Feb 2025 22:52:06 +0100 Subject: [PATCH 3/6] Add dark mode --- .gitignore | 3 +- config.toml | 7 +++- content/_index.md | 7 ++-- static/logo-dark.svg | 61 +++++++++++++++++++++++++++++++++ static/style.css | 80 +++++++++++++++++++++++++++++++++----------- templates/base.html | 4 ++- 6 files changed, 138 insertions(+), 24 deletions(-) create mode 100644 static/logo-dark.svg diff --git a/.gitignore b/.gitignore index 15ce475e7..d90d7f863 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -/public/ \ No newline at end of file +/public/ +/static/syntax-* diff --git a/config.toml b/config.toml index f80949de2..35730ecbb 100644 --- a/config.toml +++ b/config.toml @@ -11,4 +11,9 @@ generate_feeds = true [markdown] highlight_code = true -highlight_theme = "OneHalfLight" +highlight_theme = "css" + +highlight_themes_css = [ + { theme = "OneHalfDark", filename = "syntax-theme-dark.css" }, + { theme = "OneHalfLight", filename = "syntax-theme-light.css" }, +] diff --git a/content/_index.md b/content/_index.md index 24b225083..d5781f237 100644 --- a/content/_index.md +++ b/content/_index.md @@ -4,8 +4,11 @@ template = "index.html" +++
- -
uutils
+ + + + +
uutils
The uutils project reimplements ubiquitous command line utilities in diff --git a/static/logo-dark.svg b/static/logo-dark.svg new file mode 100644 index 000000000..dee38a04f --- /dev/null +++ b/static/logo-dark.svg @@ -0,0 +1,61 @@ + diff --git a/static/style.css b/static/style.css index 9fad9d917..0a0c42f7c 100644 --- a/static/style.css +++ b/static/style.css @@ -1,4 +1,5 @@ :root { + /* Light theme colors (default) */ --dark-fg-color: #fff; --light-fg-color: #141414; --light-bg-color: var(--dark-fg-color); @@ -14,7 +15,37 @@ --dark-highlight-fg-color: #ededed; --highlight-fg-color: var(--light-highlight-fg-color); --highlight-bg-color: var(--light-highlight-bg-color); + --link-text-color: #c04828; + --border-color: #ddd; + --post-bg-color: #e5e5e5; --font-face: "Fira Sans", sans-serif; + + --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"); + --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"); +} + +@media (prefers-color-scheme: dark) { + :root { + --fg-color: #e1e1e1; + --bg-color: #222222; + --light-link-color: #ff7b5c; + --dark-link-color: #ff6b47; + --link-color: var(--light-link-color); + --light-highlight-bg-color: #2d2d2d; + --light-highlight-fg-color: #ffffff; + --dark-highlight-bg-color: #27272a; + --dark-highlight-fg-color: #ededed; + --highlight-fg-color: var(--light-highlight-fg-color); + --highlight-bg-color: var(--light-highlight-bg-color); + --link-text-color: var(--fg-color); + --border-color: #404040; + --post-bg-color: #2d2d2d; + } +} + +body { + background-color: var(--bg-color); + color: var(--fg-color); } *, @@ -89,7 +120,7 @@ header { justify-items: center; padding: 0.5rem 2rem; width: 100%; - border-bottom: 1px solid #ddd; + border-bottom: 1px solid var(--border-color); font-size: 1.2rem; } @@ -111,13 +142,12 @@ header .home svg { } header a { - color: black; + color: var(--fg-color); border-bottom: 2px solid transparent; } header a:hover:not(.home) { - color: black; - border-bottom: 2px solid #c04828; + border-bottom: 2px solid var(--link-text-color); } .navigation-block { @@ -155,7 +185,7 @@ header .icon { header { grid-template-columns: max-content 1fr; } - + .spacer { display: none; } @@ -165,7 +195,7 @@ header .icon { grid-column: auto / span 2; justify-self: left; } - + header:not(.open) .spacer, header:not(.open) .navigation-block { display: none; @@ -273,8 +303,8 @@ ul { /* FOOTER */ footer { align-items: center; - background-color: var(--fg-color); - color: var(--bg-color); + background-color: var(--light-fg-color); + color: var(--light-bg-color); display: flex; flex-grow: 0; flex-shrink: 1; @@ -286,17 +316,23 @@ footer { } .github-icon { - 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"); + background-image: var(--github-icon); height: 1.25rem; width: 1.25rem; } .github-icon-black { - 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"); + background-image: var(--github-icon-black); height: 1em; width: 1em; } +@media (prefers-color-scheme: dark) { + .github-icon-black { + background-image: var(--github-icon); + } +} + .projects { display: flex; flex-direction: column; @@ -325,13 +361,13 @@ footer { margin-bottom: 0; } -.project>span { +.project > span { color: transparent; transition: color 0.3s; } -.project:hover>span { - color: black; +.project:hover > span { + color: var(--fg-color); } .project:hover { @@ -353,21 +389,21 @@ footer { .details { margin-bottom: 1.5em; - color: #333; + color: var(--fg-color); } .post-thingy { display: block; padding: 1em; - color: black; - background: #e5e5e5; + color: var(--fg-color); + background: var(--post-bg-color); border-radius: 0.3em; - border: 0.2em solid #e5e5e5; + border: 0.2em solid var(--post-bg-color); margin-bottom: 0.5em; } .post-thingy:hover { - border-color: #c04828; + border-color: var(--link-text-color); background: transparent; } @@ -391,8 +427,14 @@ blockquote { .links > a { padding: 0.2em 1em; - color: #c04828; + color: var(--link-text-color); border: 2px solid #c04828; flex: 1; text-align: center; } + +.links > a:hover { + color: var(--dark-fg-color); + background-color: #c04828; + border-color: #c04828; +} diff --git a/templates/base.html b/templates/base.html index 61e9395ab..03d44a344 100644 --- a/templates/base.html +++ b/templates/base.html @@ -10,6 +10,8 @@ + + @@ -54,4 +56,4 @@ }); - \ No newline at end of file + From 1505e7208ebede53f116cac69e9b0148ffb45640 Mon Sep 17 00:00:00 2001 From: Louis Dispa Date: Mon, 17 Feb 2025 22:37:00 +0100 Subject: [PATCH 4/6] Run deploy github action only on the main branch --- .github/workflows/website.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index b4c4fb680..b7d7e061e 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -158,6 +158,7 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest needs: build + if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'schedule' steps: - name: Deploy to GitHub Pages id: deployment From be58b7aaa4c2ca1bee64dfc055aa2e3ed120fc67 Mon Sep 17 00:00:00 2001 From: Louis Dispa Date: Thu, 27 Feb 2025 22:58:57 +0100 Subject: [PATCH 5/6] Small fixes to css variables --- static/style.css | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/static/style.css b/static/style.css index 0a0c42f7c..c6e124e04 100644 --- a/static/style.css +++ b/static/style.css @@ -1,22 +1,23 @@ :root { /* Light theme colors (default) */ + + --accent-color: #c04828; + --dark-fg-color: #fff; --light-fg-color: #141414; --light-bg-color: var(--dark-fg-color); --dark-bg-color: var(--light-fg-color); --fg-color: var(--light-fg-color); --bg-color: var(--light-bg-color); - --light-link-color: #c04828; - --dark-link-color: #c04828; - --link-color: var(--light-link-color); + --link-color: var(--accent-color); --light-highlight-bg-color: #ededed; --light-highlight-fg-color: #595959; --dark-highlight-bg-color: #27272a; --dark-highlight-fg-color: #ededed; --highlight-fg-color: var(--light-highlight-fg-color); --highlight-bg-color: var(--light-highlight-bg-color); - --link-text-color: #c04828; - --border-color: #ddd; + --link-text-color: var(--accent-color); + --header-border-color: #ddd; --post-bg-color: #e5e5e5; --font-face: "Fira Sans", sans-serif; @@ -28,17 +29,15 @@ :root { --fg-color: #e1e1e1; --bg-color: #222222; - --light-link-color: #ff7b5c; - --dark-link-color: #ff6b47; - --link-color: var(--light-link-color); + --link-color: var(--accent-color); --light-highlight-bg-color: #2d2d2d; --light-highlight-fg-color: #ffffff; --dark-highlight-bg-color: #27272a; --dark-highlight-fg-color: #ededed; --highlight-fg-color: var(--light-highlight-fg-color); --highlight-bg-color: var(--light-highlight-bg-color); - --link-text-color: var(--fg-color); - --border-color: #404040; + --link-text-color: var(--accent-color); + --header-border-color: #404040; --post-bg-color: #2d2d2d; } } @@ -120,7 +119,7 @@ header { justify-items: center; padding: 0.5rem 2rem; width: 100%; - border-bottom: 1px solid var(--border-color); + border-bottom: 1px solid var(--header-border-color); font-size: 1.2rem; } @@ -179,7 +178,7 @@ header .icon { #mobile-open-navigation button div { margin: 0.5em 0; width: 2em; - border-bottom: 0.25em solid black; + border-bottom: 0.25em solid var(--fg-color); } header { From 219f09af3ae9370387deb19cdaac175b68d3b2f1 Mon Sep 17 00:00:00 2001 From: Louis Dispa Date: Thu, 27 Feb 2025 23:02:19 +0100 Subject: [PATCH 6/6] Capitalize menu and title --- static/style.css | 1 + templates/base.html | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/static/style.css b/static/style.css index c6e124e04..1214b0641 100644 --- a/static/style.css +++ b/static/style.css @@ -377,6 +377,7 @@ footer { font-size: 3em; font-weight: 900; margin-bottom: 0.5em; + text-transform: capitalize; } @media (min-width: 640px) { diff --git a/templates/base.html b/templates/base.html index 03d44a344..c6d86070d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -25,13 +25,13 @@