Compare commits

...

72 Commits
v1.4.1 ... main

Author SHA1 Message Date
renovate[bot] d2e0968784
chore(deps): update devdeps non-major (#1053)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-21 13:10:25 +02:00
renovate[bot] e253048ed6
chore(deps): lock file maintenance (#1054)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-21 13:10:04 +02:00
renovate[bot] aaf42bf2af
fix(deps): update dependency mermaid to v11.9.0 (#1052)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-16 19:58:38 +02:00
renovate[bot] a1fb274782
chore(deps): update quay.io/thegeeklab/hugo docker tag to v0.148 (#1051)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 10:09:55 +02:00
renovate[bot] cac7e18341
chore(deps): update devdeps non-major (#1049)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 06:08:53 +00:00
renovate[bot] 6d2df35f95
chore(deps): lock file maintenance (#1050)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 08:07:38 +02:00
renovate[bot] 478a5a7d07
fix(deps): update dependency mermaid to v11.8.1 (#1048)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-09 02:05:06 +02:00
renovate[bot] d9977756a6
chore(deps): lock file maintenance (#1047)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-07 11:06:52 +02:00
renovate[bot] 7a49e2bbd4
chore(deps): update devdeps non-major (#1046)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-07 07:41:53 +00:00
renovate[bot] 77971af475
fix(deps): update dependency mermaid to v11.8.0 (#1045)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-04 07:28:17 +02:00
renovate[bot] 62cc830930
chore(deps): update devdeps non-major (#1043)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-30 08:48:44 +02:00
renovate[bot] 193ffc9967
chore(deps): lock file maintenance (#1044)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-30 08:48:26 +02:00
renovate[bot] c7234c1589
fix(deps): update dependency flexsearch to v0.8.205 (#999)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2025-06-26 13:00:10 +02:00
James cc623cb688
feat: add `rel=edit` attribute to "Edit page" link (#1027)
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2025-06-23 14:41:20 +02:00
Robert Kaussow 0f0af88444 ci: only warn on html-valiudate attribute-misuse rule 2025-06-23 14:31:49 +02:00
renovate[bot] ef5c5838d4
chore(deps): lock file maintenance (#1042)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-23 13:05:31 +02:00
renovate[bot] 80f6ecbb1b
chore(deps): update devdeps non-major (#1041)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-23 11:50:06 +02:00
renovate[bot] 0da8732896
chore(deps): update quay.io/thegeeklab/lhci docker tag to v0.15 (#1034) 2025-06-22 19:50:06 +02:00
renovate[bot] ecb10e5512
fix(deps): update dependency mermaid to v11.7.0 (#1040)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-22 12:36:11 +02:00
Robert Kaussow c774adba0e docs: update broken link to hugo docs 2025-06-22 12:14:09 +02:00
renovate[bot] 459eb1d813
chore(deps): update devdeps non-major (#1036)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-16 08:20:31 +02:00
renovate[bot] 1eea4e5f01
chore(deps): lock file maintenance (#1037)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-16 08:20:19 +02:00
renovate[bot] d295e24ced
chore(deps): lock file maintenance (#1033)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-11 11:42:34 +02:00
renovate[bot] 4bfe090c90
chore(deps): update dependency @babel/eslint-parser to v7.27.5 (#1032)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-09 06:31:18 +00:00
renovate[bot] 738db3e0a4
chore(deps): lock file maintenance (#1031)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-06 07:22:30 +02:00
renovate[bot] 3ba33c63d7
chore(deps): update devdeps non-major (#1030)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-02 05:41:58 +00:00
renovate[bot] 97b0428583
chore(deps): lock file maintenance (#1026)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-28 10:07:28 +02:00
renovate[bot] 504c4815be
chore(deps): update devdeps non-major (#1029)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-26 05:55:06 +00:00
renovate[bot] f718190103
chore(deps): update devdeps non-major (#1028)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-19 09:20:51 +02:00
renovate[bot] 4fc71d4103
chore(deps): update devdeps non-major (#1025)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-12 17:09:30 +00:00
Robert Kaussow 539dbf80a4
ci: use github token for link check 2025-05-09 13:05:59 +02:00
renovate[bot] 93b8671792
chore(deps): update devdeps non-major (#1022)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-05 07:39:38 +02:00
renovate[bot] 18515b4ca7
chore(deps): lock file maintenance (#1023)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-05 07:39:28 +02:00
renovate[bot] 1bb1dab866
chore(deps): update dependency npm-run-all2 to v8 (#1021)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-03 10:18:59 +02:00
Bartolomeo Müller 89605e4767
docs: use constant wording in theme description (#1020) 2025-04-29 15:36:41 +02:00
renovate[bot] 72985c2ada
chore(deps): update quay.io/thegeeklab/hugo docker tag to v0.147 (#1019)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 16:12:41 +02:00
renovate[bot] 3ef7149bd7
chore(deps): lock file maintenance (#1017)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-21 09:02:45 +02:00
renovate[bot] be0dc0aa7d
chore(deps): update devdeps non-major (#1016)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-21 05:58:22 +00:00
renovate[bot] 39b76591d5
chore(deps): lock file maintenance (#1015)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-15 10:55:32 +02:00
renovate[bot] 6140ca1917
chore(deps): update devdeps non-major (#1014)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-14 07:06:51 +00:00
renovate[bot] 475a2408f6
fix(deps): update dependency katex to v0.16.22 (#1013)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-10 09:26:52 +02:00
renovate[bot] 68e6d34421
chore(deps): lock file maintenance (#1012)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-07 20:37:02 +02:00
renovate[bot] b82e8b6354
chore(deps): update devdeps non-major (#1011)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-07 05:27:39 +00:00
renovate[bot] afc3b1c15e
chore(deps): lock file maintenance (#1009)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-31 10:26:17 +02:00
renovate[bot] 57e89aec4a
chore(deps): update devdeps non-major (#1008)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-31 07:24:22 +02:00
renovate[bot] e2bb139f39
fix(deps): update dependency mermaid to v11.6.0 (#1007)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-25 20:30:12 +01:00
Robert Kaussow aad8147d63
docs: document how to include custom resources (#1004) 2025-03-24 13:25:24 +01:00
renovate[bot] 0af7e8c401
chore(deps): lock file maintenance (#1006)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-24 07:32:30 +01:00
renovate[bot] 6d9e3cab0a
chore(deps): update devdeps non-major (#1005)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-24 07:32:10 +01:00
Robert Kaussow 9a2e2dcbc8
feat: support brand subtitle (#1003) 2025-03-23 13:14:40 +01:00
Robert Kaussow ef9ac519ec
fix: use site param geekdocLogo in microformats (#1002) 2025-03-19 23:56:20 +01:00
renovate[bot] dc7041f323
chore(deps): lock file maintenance (#998)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-17 13:04:49 +01:00
renovate[bot] e29d89a1b2
chore(deps): update devdeps non-major (#997)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-17 07:09:14 +00:00
renovate[bot] 3746fe3e22
chore(deps): lock file maintenance (#993)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-14 08:24:12 +01:00
renovate[bot] afec1a884f
fix(deps): update dependency mermaid to v11.5.0 (#996)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-14 08:19:29 +01:00
renovate[bot] 1c4c539d52
chore(deps): update devdeps non-major (#992)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-10 07:53:37 +01:00
Robert Kaussow 2675bec266
fix: fix accessibility helper for desktop (#991) 2025-03-04 07:50:04 +01:00
renovate[bot] 78e46d2af6
chore(deps): lock file maintenance (#990)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-03 09:11:10 +01:00
Robert Kaussow c55c466e17
fix: support keyboard navigation for menus (#988) 2025-03-03 09:10:22 +01:00
renovate[bot] a61602e94a
chore(deps): update devdeps non-major (#989)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-03 06:56:27 +00:00
Robert Kaussow 9fd43f8e4d
feat: add hover transition for icon links (#984) 2025-03-01 23:00:45 +01:00
Robert Kaussow b6d6abe239
feat: add skip-to-content link to improve accessability (#985) 2025-03-01 23:00:36 +01:00
Robert Kaussow 3d695d85a0
chore: harmonize some bg colors, borders and hints (#983) 2025-03-01 20:57:53 +01:00
renovate[bot] 34d0bcfc89
chore(deps): update dependency copy-webpack-plugin to v13 (#982)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-28 09:36:46 +01:00
renovate[bot] 7bed6cd9bd
chore(deps): update quay.io/thegeeklab/hugo docker tag to v0.144 (#981)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-28 00:09:21 +01:00
Robert Kaussow ef129994be
chore: replace audio shortcut example track 2025-02-27 12:55:41 +01:00
renovate[bot] c574a8e90f
chore(deps): update devdeps non-major (#980)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 18:53:20 +00:00
renovate[bot] e5965443f0
chore(deps): update dependency globals to v16 (#977)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-20 20:59:08 +01:00
dependabot[bot] 5b69d29247
chore(deps): bump dompurify from 3.2.3 to 3.2.4 (#979)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.2.3...3.2.4)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-20 20:58:09 +01:00
renovate[bot] a4ac261b2f
fix(deps): update dependency uuid to v11.1.0 (#976)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-20 08:48:20 +01:00
renovate[bot] 4ddd98d0d4
chore(deps): lock file maintenance (#975)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-17 07:34:06 +01:00
renovate[bot] 5ae523970f
chore(deps): update devdeps non-major (#974)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-17 05:41:23 +00:00
45 changed files with 1552 additions and 1106 deletions

View File

@ -3,6 +3,7 @@
"rules": {
"element-required-content": "off",
"element-permitted-content": "off",
"no-raw-characters": "off"
"no-raw-characters": "off",
"attribute-misuse": "warn"
}
}

View File

@ -19,7 +19,15 @@ ci:
"is-crawlable",
"image-size-responsive",
"render-blocking-resources",
"largest-contentful-paint"
"largest-contentful-paint",
"unused-css-rules",
"network-dependency-tree-insight",
"legacy-javascript",
"errors-in-console",
"max-potential-fid",
"interactive",
"dom-size",
"forced-reflow-insight"
]
assert:
preset: "lighthouse:no-pwa"
@ -33,6 +41,14 @@ ci:
image-size-responsive: off
render-blocking-resources: off
largest-contentful-paint: off
unused-css-rules: off
network-dependency-tree-insight: off
legacy-javascript: off
errors-in-console: off
max-potential-fid: off
interactive: off
dom-size: off
forced-reflow-insight: off
total-byte-weight: warn
identical-links-same-purpose: warn
tap-targets: warn

View File

@ -44,7 +44,7 @@ steps:
- event: [pull_request]
- name: build
image: quay.io/thegeeklab/hugo:0.143
image: quay.io/thegeeklab/hugo:0.148
commands:
- hugo --panicOnWarning -s exampleSite/

View File

@ -24,7 +24,7 @@ steps:
FORCE_COLOR: "true"
- name: testbuild
image: quay.io/thegeeklab/hugo:0.143
image: quay.io/thegeeklab/hugo:0.148
depends_on: [assets]
commands:
- mkdir -p exampleSite/themes/ && ln -s $(pwd)/ exampleSite/themes/${CI_REPO_NAME}
@ -44,9 +44,12 @@ steps:
depends_on: [testbuild]
commands:
- lychee --no-progress --format detailed exampleSite/content/ README.md
environment:
GITHUB_TOKEN:
from_secret: github_token_ro
- name: page-validation
image: quay.io/thegeeklab/lhci:0.14
image: quay.io/thegeeklab/lhci:0.15
depends_on: [testbuild]
commands:
- lhci autorun

View File

@ -6,7 +6,7 @@
[![GitHub contributors](https://img.shields.io/github/contributors/thegeeklab/hugo-geekdoc)](https://github.com/thegeeklab/hugo-geekdoc/graphs/contributors)
[![License: MIT](https://img.shields.io/github/license/thegeeklab/hugo-geekdoc)](https://github.com/thegeeklab/hugo-geekdoc/blob/main/LICENSE)
Geekdoc is a simple Hugo theme for documentations. It is intentionally designed as a fast and lean theme and may not fit the requirements of complex projects. If a more feature-complete theme is required there are a lot of good alternatives out there. You can find a demo and the full documentation at [https://geekdocs.de](https://geekdocs.de).
Geekdoc is a simple Hugo theme for documentations. It is intentionally designed as a fast and lean theme and may not fit the requirements of complex projects. If a more feature-complete theme is required there are a lot of great alternatives out there. You can find a demo and the full documentation at [https://geekdocs.de](https://geekdocs.de).
![Desktop and mobile preview](https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/main/images/readme.png)

View File

@ -16,7 +16,7 @@ geekdocAnchor: false
<!-- markdownlint-restore -->
Geekdoc is a simple Hugo theme for documentations. It is intentionally designed as a fast and lean theme and may not fit the requirements of complex projects. If a more feature-complete theme is required there are a lot of got alternatives out there.
Geekdoc is a simple Hugo theme for documentations. It is intentionally designed as a fast and lean theme and may not fit the requirements of complex projects. If a more feature-complete theme is required there are a lot of great alternatives out there.
{{< button size="large" relref="usage/getting-started/" >}}Getting Started{{< /button >}}

View File

@ -41,7 +41,7 @@ The minimal steps to load a custom Favicon is to overwrite the three default Fav
### Full replacement
If you want to add more Favicon formats you have to [overwrite](https://gohugo.io/templates/partials/#partial-template-lookup-order) the default partial that is used to load the files. In the next step you have to place the required files in the `static` folder of your project as well.
If you want to add more Favicon formats you have to [overwrite](https://gohugo.io/templates/lookup-order/) the default partial that is used to load the files. In the next step you have to place the required files in the `static` folder of your project as well.
**Example:**

View File

@ -1,11 +1,11 @@
---
title: Audio
resources:
- name: risen
src: "risen.mp3"
title: Risen
- name: diamonds-trap
src: "diamonds-trap.mp3"
title: Diamonds Trap
params:
credits: "[Sascha Ende on filmmusic.io](https://filmmusic.io/en/song/12856-risen)"
credits: "[Jakob Eglmeier on openmusic.academy CC0-1.0](https://openmusic.academy/media-library/b9do2E2ZwVCfppyBf2yuej)"
---
The audio shortcode allows you to embed audio files.
@ -19,14 +19,14 @@ Define your resources in the page front matter, custom parameter `params.credits
```md
---
resources:
- name: risen
src: "risen.mp3"
title: Risen
- name: diamonds-trap
src: "diamonds-trap.mp3"
title: Diamonds Trap
params:
credits: "[Sascha Ende on filmmusic.io](https://filmmusic.io/en/song/12856-risen)"
credits: "[Jakob Eglmeier on openmusic.academy CC0-1.0](https://openmusic.academy/media-library/b9do2E2ZwVCfppyBf2yuej)"
---
{{</* audio name="risen" */>}}
{{</* audio name="diamonds-trap" */>}}
```
### Attributes
@ -43,6 +43,6 @@ resources:
<!-- spellchecker-disable -->
{{< audio name="risen" >}}
{{< audio name="diamonds-trap" >}}
<!-- spellchecker-enable -->

View File

@ -37,6 +37,9 @@ enableRobotsTXT = true
tag = "tags"
[params]
# (Optional, default none) Set a subtitle used in the page header.
geekdocSubtitle = "A Hugo theme for documentation"
# (Optional, default 6) Set how many table of contents levels to be showed on page.
# Use false to hide ToC, note that 0 will default to 6 (https://gohugo.io/functions/default/)
# You can also specify this parameter per page in front matter.
@ -167,6 +170,9 @@ taxonomies:
tag: tags
params:
# (Optional, default none) Set a subtitle used in the page header.
geekdocSubtitle: "A Hugo theme for documentation"
# (Optional, default 6) Set how many table of contents levels to be showed on page.
# Use false to hide ToC, note that 0 will default to 6 (https://gohugo.io/functions/default/)
# You can also specify this parameter per page in front matter.

View File

@ -0,0 +1,16 @@
---
title: Customization
---
{{< toc >}}
## Custom resources
To add custom resources to your site e.g. CSS or JavaScript files, create the `layouts/partials/head/custom.html` in the root directory of your project. Add the source files you want to include in the `static/` folder of your project, for example `static/css/custom.css` and `static/js/custom.js`. To include the files in your site, add the following code to `layouts/partials/head/custom.html`:
```html
<link rel="stylesheet" type="text/css" href="/css/custom.css" />
<script type="text/javascript" src="/js/custom.js"></script>
```
Ensure to use the absolute path to the files.

View File

@ -13,8 +13,6 @@
<div class="wrapper">
<input type="checkbox" class="hidden" id="menu-header-control" />
{{ partial "site-header" (dict "Root" . "MenuEnabled" false) }}

View File

@ -22,14 +22,16 @@
</head>
<body itemscope itemtype="https://schema.org/WebPage">
<div class="w-full flex justify-center">
<a href="#main-content" id="gdoc-to-main" class="gdoc-markdown__link">Skip to main content</a>
</div>
{{ partial "svg-icon-symbols" . }}
<div
class="wrapper {{ if default false .Site.Params.geekdocDarkModeDim }}dark-mode-dim{{ end }}"
>
<input type="checkbox" class="hidden" id="menu-control" />
<input type="checkbox" class="hidden" id="menu-header-control" />
{{ $navEnabled := default true .Page.Params.geekdocNav }}
{{ partial "site-header" (dict "Root" . "MenuEnabled" $navEnabled) }}

View File

@ -4,6 +4,7 @@
<article
class="gdoc-markdown gdoc-markdown__align--{{ default "left" (.Page.Params.geekdocAlign | lower) }}"
id="main-content" tabindex="-1"
>
<h1>{{ partial "utils/title" . }}</h1>
{{ partial "utils/content" . }}

View File

@ -4,6 +4,7 @@
<article
class="gdoc-markdown gdoc-markdown__align--{{ default "left" (.Page.Params.geekdocAlign | lower) }}"
id="main-content" tabindex="-1"
>
<h1>{{ partial "utils/title" . }}</h1>
{{ partial "page-metadata" . }}

View File

@ -1,4 +1,5 @@
{{ define "main" }}
<div id="main-content" tabindex="-1">
{{ range .Paginator.Pages }}
<article class="gdoc-post">
<header class="gdoc-post__header">
@ -31,6 +32,7 @@
</footer>
</article>
{{ end }}
</div>
{{ partial "pagination.html" . }}
{{ end }}

View File

@ -1,4 +1,5 @@
{{ define "main" }}
<div id="main-content" tabindex="-1">
{{ range .Paginator.Pages.ByTitle }}
<article class="gdoc-post">
<header class="gdoc-post__header">
@ -28,5 +29,6 @@
</footer>
</article>
{{ end }}
</div>
{{ partial "pagination.html" . }}
{{ end }}

View File

@ -1,6 +0,0 @@
{{ if default true .Site.Params.geekdocSearch }}
<script defer src="{{ index (index .Site.Data.assets "search.js") "src" | relURL }}"></script>
{{- $searchConfigFile := printf "search/%s.config.json" .Language.Lang -}}
{{- $searchConfig := resources.Get "search/config.json" | resources.ExecuteAsTemplate $searchConfigFile . | resources.Minify -}}
{{- $searchConfig.Publish -}}
{{ end }}

View File

@ -1 +1,9 @@
<!-- You can add custom elements to the page header here. -->
<!--
You can add custom elements to the page header here.
Example:
Ensure to use the absolute path to custom files and place the source files in the `static` folder.
<link rel="stylesheet" type="text/css" href="/custom.css">
<script type="text/javascript" src="/custom.js"></script>
-->

View File

@ -1,6 +1,6 @@
{{ if hugo.IsMultilingual }}
<span class="gdoc-language">
<ul class="gdoc-language__selector" role="button" aria-pressed="false" tabindex="0">
<ul class="gdoc-language__selector" tabindex="0" role="button" aria-pressed="false">
<li>
{{ range .Site.Languages }}
{{ if eq . $.Site.Language }}

View File

@ -60,7 +60,7 @@
"url": {{ .Site.Home.Permalink }},
"logo": {
"@type": "ImageObject",
"url": {{ (default "brand.svg" .Site.Params.logo) | absURL }},
"url": {{ (default "brand.svg" .Site.Params.geekdocLogo) | absURL }},
"width":"32",
"height":"32"
}

View File

@ -48,6 +48,7 @@
<svg class="gdoc-icon gdoc_code"><use xlink:href="#gdoc_code"></use></svg>
<a
href="{{ $geekdocRepo }}/{{ path.Join $geekdocEditPath ($.Scratch.Get "geekdocFilePath") }}"
rel="edit"
>
{{ i18n "edit_page" }}
</a>

View File

@ -1,4 +1,9 @@
{{ if default true .Site.Params.geekdocSearch }}
<script defer src="{{ index (index .Site.Data.assets "search.js") "src" | relURL }}"></script>
{{- $searchConfigFile := printf "search/%s.config.json" .Language.Lang -}}
{{- $searchConfig := resources.Get "search/config.json" | resources.ExecuteAsTemplate $searchConfigFile . | resources.Minify -}}
{{- $searchConfig.Publish -}}
<div class="gdoc-search flex align-center">
<svg class="gdoc-icon gdoc_search"><use xlink:href="#gdoc_search"></use></svg>
<input

View File

@ -1,7 +1,10 @@
<header class="gdoc-header">
<div class="container flex align-center justify-between">
{{ if .MenuEnabled }}
<label for="menu-control" class="gdoc-nav__control" tabindex="0">
<label for="menu-control" class="gdoc-nav__control">
<div tabindex="0" role="button" aria-pressed="false">
<input type="checkbox" class="hidden" id="menu-control" />
<svg class="gdoc-icon gdoc_menu">
<title>{{ i18n "button_nav_open" }}</title>
<use xlink:href="#gdoc_menu"></use>
@ -10,28 +13,32 @@
<title>{{ i18n "button_nav_close" }}</title>
<use xlink:href="#gdoc_arrow_back"></use>
</svg>
</div>
</label>
{{ end }}
<div>
<a class="gdoc-brand gdoc-header__link" href="{{ .Root.Site.Home.Permalink }}">
<span class="flex align-center">
<a class="gdoc-brand gdoc-header__link flex gap-16 align-center" href="{{ .Root.Site.Home.Permalink }}">
<img
class="gdoc-brand__img"
src="{{ (default "brand.svg" .Root.Site.Params.geekdocLogo) | relURL }}"
alt=""
/>
<span class="gdoc-brand__title">{{ .Root.Site.Title }}</span>
</span>
<div>
<div class="gdoc-brand__title">{{ .Root.Site.Title }}</div>
{{ with .Root.Site.Params.geekdocSubtitle }}
<div class="gdoc-brand__subtitle">{{ . }}</div>
{{ end }}
</div>
</a>
</div>
<div class="gdoc-menu-header">
<div class="gdoc-menu-header flex gap-16">
<span class="gdoc-menu-header__items">
{{ if .Root.Site.Data.menu.extra.header }}
{{ partial "menu-extra" (dict "current" .Root "source" .Root.Site.Data.menu.extra.header "target" "header") }}
{{ end }}
<span id="gdoc-color-theme">
<span id="gdoc-color-theme" tabindex="0" role="button" aria-pressed="false">
<svg class="gdoc-icon gdoc_brightness_dark">
<title>{{ i18n "button_toggle_dark" }}</title>
<use xlink:href="#gdoc_brightness_dark"></use>
@ -56,23 +63,24 @@
</span>
{{ partial "language" .Root }}
</span>
<span class="gdoc-menu-header__control">
<label for="menu-header-control">
<div tabindex="0" role="button" aria-pressed="false">
<input type="checkbox" class="hidden" id="menu-header-control" />
<svg class="gdoc-icon gdoc_keyboard_arrow_right">
<use xlink:href="#gdoc_keyboard_arrow_right"></use>
<title>{{ i18n "button_menu_close" }}</title>
</svg>
</label>
</span>
</span>
<label for="menu-header-control" class="gdoc-menu-header__control">
<svg class="gdoc-icon gdoc_keyboard_arrow_left">
<use xlink:href="#gdoc_keyboard_arrow_left"></use>
<title>{{ i18n "button_menu_open" }}</title>
</svg>
</div>
</label>
</span>
</div>
</div>
</header>

View File

@ -1,4 +1,5 @@
{{ define "main" }}
<div id="main-content" tabindex="-1">
{{ range .Paginator.Pages }}
<article class="gdoc-markdown gdoc-post">
<header class="gdoc-post__header">
@ -29,6 +30,7 @@
</footer>
</article>
{{ end }}
</div>
{{ partial "pagination.html" . }}
{{ end }}

View File

@ -1,5 +1,5 @@
{{ define "main" }}
<article class="gdoc-post">
<article class="gdoc-post" id="main-content" tabindex="-1">
<header class="gdoc-post__header">
<h1 class="gdoc-post__title">{{ partial "utils/title" . }}</h1>
<div class="flex flex-wrap align-center gdoc-post__meta gdoc-post__meta--head">

View File

@ -5,7 +5,7 @@
{{- end }}
<div class="gdoc-columns gdoc-columns--{{ $size }} flex flex-gap flex-mobile-column">
<div class="gdoc-columns gdoc-columns--{{ $size }} flex gap-16 flex-mobile-column">
{{- range split .Inner "<--->" }}
<div class="gdoc-columns__content gdoc-markdown--nested flex-even">
{{ . | $.Page.RenderString -}}

View File

@ -4,12 +4,13 @@
<blockquote class="gdoc-hint {{ $type | lower }}">
<div class="gdoc-hint__title flex align-center">
<div class="gdoc-hint__title flex gap-8 align-center">
{{- with $icon -}}
<svg class="gdoc-icon {{ . }}"><use xlink:href="#{{ . }}"></use></svg>
<span>{{ $title }}</span>
{{- else -}}
<i class="fa {{ $type | lower }}" title="{{ $title }}"></i>
<i class="fa {{ $type | lower }}"></i>
<span>{{ $title }}</span>
{{- end -}}
</div>
<div class="gdoc-hint__text">{{ .Inner | $.Page.RenderString }}</div>

2044
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -36,37 +36,37 @@
"dependencies": {
"@cfworker/json-schema": "4.1.1",
"clipboard": "2.0.11",
"flexsearch": "0.7.43",
"katex": "0.16.21",
"flexsearch": "0.8.205",
"katex": "0.16.22",
"lodash": "4.17.21",
"mermaid": "11.4.1",
"mermaid": "11.9.0",
"store2": "2.14.4",
"uuid": "11.0.5"
"uuid": "11.1.0"
},
"devDependencies": {
"@babel/eslint-parser": "7.26.8",
"autoprefixer": "10.4.20",
"copy-webpack-plugin": "12.0.2",
"@babel/eslint-parser": "7.28.0",
"autoprefixer": "10.4.21",
"copy-webpack-plugin": "13.0.0",
"css-loader": "7.1.2",
"eslint": "9.20.0",
"eslint-config-prettier": "10.0.1",
"eslint-plugin-prettier": "5.2.3",
"eslint": "9.31.0",
"eslint-config-prettier": "10.1.8",
"eslint-plugin-prettier": "5.5.3",
"favicons": "7.2.0",
"favicons-webpack-plugin": "6.0.1",
"globals": "15.14.0",
"html-validate": "9.2.1",
"npm-run-all2": "7.0.2",
"globals": "16.3.0",
"html-validate": "9.7.1",
"npm-run-all2": "8.0.4",
"postcss-loader": "8.1.1",
"prettier": "3.5.0",
"sass": "1.84.0",
"sass-loader": "16.0.4",
"shx": "0.3.4",
"prettier": "3.6.2",
"sass": "1.89.2",
"sass-loader": "16.0.5",
"shx": "0.4.0",
"svg-sprite": "2.0.4",
"svgtofont": "6.2.0",
"webpack": "5.97.1",
"svgtofont": "6.3.2",
"webpack": "5.100.2",
"webpack-cli": "6.0.1",
"webpack-manifest-plugin": "5.0.0",
"webpack-remove-empty-scripts": "1.0.4"
"webpack-manifest-plugin": "5.0.1",
"webpack-remove-empty-scripts": "1.1.1"
},
"overrides": {
"colors": "1.4.0"

53
src/js/accessibility.js Normal file
View File

@ -0,0 +1,53 @@
document.addEventListener("DOMContentLoaded", function () {
const gdocNav = document.querySelector(".gdoc-nav")
const gdocPage = document.querySelector(".gdoc-page")
const menuControl = document.getElementById("menu-control")
// Helper function for menu navigation accessibility
function updateMenuAccessibility() {
if (!gdocNav || !gdocPage || !menuControl) return
const isMenuOpen = menuControl.checked
const isDesktop = window.matchMedia("(min-width: 41rem)").matches
// Set nav accessibility attributes
gdocNav.toggleAttribute("inert", !isDesktop && !isMenuOpen)
gdocNav.setAttribute("aria-hidden", (!isDesktop && !isMenuOpen).toString())
// Set page accessibility attributes
gdocPage.toggleAttribute("inert", !isDesktop && isMenuOpen)
gdocPage.setAttribute("aria-hidden", (!isDesktop && isMenuOpen).toString())
}
// Process all button role elements
document.querySelectorAll('[role="button"]').forEach((buttonElement) => {
const controlId = buttonElement.parentElement?.getAttribute("for")
if (!controlId) return
const controlElement = document.getElementById(controlId)
if (!controlElement || controlElement.type !== "checkbox") return
// Set initial accessibility state
buttonElement.setAttribute("aria-pressed", controlElement.checked)
// Handle accessibility updates
const updateButton = () => {
buttonElement.setAttribute("aria-pressed", controlElement.checked)
if (controlId === "menu-control") updateMenuAccessibility()
}
// Event listeners
buttonElement.addEventListener("click", updateButton)
buttonElement.addEventListener("keydown", (event) => {
if (event.key === "Enter") {
controlElement.checked = !controlElement.checked
updateButton()
event.preventDefault()
}
})
})
// Initial call and resize handler
updateMenuAccessibility()
window.addEventListener("resize", updateMenuAccessibility)
})

View File

@ -7,7 +7,7 @@ import { TOGGLE_COLOR_THEMES, THEME, COLOR_THEME_AUTO } from "./config.js"
document.addEventListener("DOMContentLoaded", () => {
const colorThemeToggle = document.getElementById("gdoc-color-theme")
colorThemeToggle.onclick = function () {
function toggleColorTheme() {
let lstore = Storage.namespace(THEME)
let currentColorTheme = lstore.get("color-theme") || COLOR_THEME_AUTO
let nextColorTheme = toggle(TOGGLE_COLOR_THEMES, currentColorTheme)
@ -15,6 +15,17 @@ document.addEventListener("DOMContentLoaded", () => {
lstore.set("color-theme", TOGGLE_COLOR_THEMES[nextColorTheme])
applyTheme(false)
}
colorThemeToggle.onclick = function () {
toggleColorTheme()
}
colorThemeToggle.addEventListener("keydown", function (event) {
if (event.key === "Enter") {
toggleColorTheme()
event.preventDefault()
}
})
})
function applyTheme(init = true) {

View File

@ -1,4 +1,5 @@
import Clipboard from "clipboard"
import "./accessibility.js"
document.addEventListener("DOMContentLoaded", function () {
let clipboard = new Clipboard(".clip")

View File

@ -1,6 +1,6 @@
import groupBy from "lodash/groupBy.js"
import truncate from "lodash/truncate.js"
import Document from "flexsearch/dist/module/document.js"
import { Document, Charset } from "flexsearch"
import { Validator } from "@cfworker/json-schema"
document.addEventListener("DOMContentLoaded", function () {
@ -55,7 +55,8 @@ function init(input, searchConfig) {
input.removeEventListener("focus", init)
const indexCfgDefaults = {
tokenize: "forward"
tokenize: "forward",
encoder: Charset.LatinBalance
}
const indexCfg = searchConfig.indexConfig ? searchConfig.indexConfig : indexCfgDefaults
const dataUrl = searchConfig.dataFile
@ -63,7 +64,7 @@ function init(input, searchConfig) {
indexCfg.document = {
key: "id",
index: ["title", "content", "description"],
store: ["title", "href", "parent", "description"]
store: ["title", "href", "parent", "content", "description"]
}
const index = new Document(indexCfg)
@ -79,7 +80,14 @@ function init(input, searchConfig) {
function search(input, results, searchConfig) {
const searchCfg = {
enrich: true,
limit: 5
limit: 5,
highlight: {
template: "<b>$1</b>",
boundary: {
before: 10,
after: 20
}
}
}
while (results.firstChild) {
@ -157,11 +165,24 @@ function createLinks(pages, target, showDesc) {
if (showDesc === true) {
const desc = a.appendChild(document.createElement("span"))
desc.classList.add("gdoc-search__entry--description")
if (page.highlight) {
const parser = new DOMParser()
const doc = parser.parseFromString(
truncate(page.highlight, {
length: 55,
separator: " "
}),
"text/html"
)
desc.innerHTML = doc.body.innerHTML
} else {
desc.textContent = truncate(page.description, {
length: 55,
separator: " "
})
}
}
if (target) {
target.appendChild(item)
@ -206,6 +227,11 @@ function flattenHits(results) {
for (const page of field.result) {
if (!map.has(page.doc.href)) {
map.set(page.doc.href, true)
if (page.highlight) {
page.doc.highlight = page.highlight
}
items.push(page.doc)
}
}

View File

@ -2,20 +2,33 @@
@use "defaults";
.admonitionblock {
@each $name, $color in defaults.$hint-colors {
&.#{$name} {
border-left-color: $color;
background-color: color.scale($color, $lightness: 95%, $saturation: -30%);
color: defaults.$body-font-color;
}
}
$root: &;
& {
margin: defaults.$padding-16 0;
padding: 0;
border: defaults.$border-1 solid var(--accent-color);
border-left: defaults.$border-4 solid var(--accent-color);
border-radius: defaults.$border-radius;
@each $name, $color in defaults.$hint-colors {
&.#{$name} {
border-color: $color;
color: defaults.$body-font-color;
td.icon {
background-color: color.adjust($color, $alpha: -0.9);
border-start-start-radius: inherit;
border-start-end-radius: inherit;
position: relative;
z-index: -10;
outline: color.adjust($color, $alpha: -0.9);
}
}
}
.table-wrap {
margin: 0;
}
table {
@ -35,28 +48,34 @@
font-weight: bold;
&.icon {
.title {
display: flex;
align-items: center;
}
i.fa::after {
content: attr(title);
font-style: normal;
padding-left: defaults.$padding-24;
}
i.fa {
color: defaults.$black;
background-size: auto 90%;
background-repeat: no-repeat;
filter: invert(30%);
margin-left: -5px;
}
@each $name, $icon in defaults.$hint-icons {
i.fa.icon-#{$name} {
background-image: url(img/geekdoc-stack.svg##{$icon});
width: defaults.$font-size-24;
height: defaults.$font-size-24;
position: relative;
&::before {
content: "";
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: defaults.$font-size-24;
height: defaults.$font-size-24;
mask-image: url(img/geekdoc-stack.svg##{$icon});
mask-repeat: no-repeat;
mask-size: contain;
background-color: var(--body-font-color);
}
&::after {
color: var(--body-font-color);
content: attr(title);
font-style: normal;
padding-left: defaults.$padding-32;
}
}
}
}

View File

@ -105,6 +105,24 @@ body {
* {
box-sizing: inherit;
}
#gdoc-to-main {
position: absolute;
margin: defaults.$padding-8 0;
padding: defaults.$padding-8;
display: inline-block;
background-color: var(--accent-color-lite);
border-radius: defaults.$border-radius;
border: defaults.$border-1 solid var(--accent-color);
transform: translateY(0);
transition: transform 250ms ease-in;
&:not(:focus) {
transform: translateY(-#{defaults.$padding-64});
}
}
}
h1,
@ -208,14 +226,19 @@ svg.gdoc-icon {
}
.gdoc-brand {
font-size: defaults.$font-size-32;
line-height: defaults.$font-size-32;
&__img {
margin-right: defaults.$padding-16;
width: defaults.$padding-32;
height: defaults.$padding-32;
}
&__title {
font-size: defaults.$font-size-24;
line-height: defaults.$font-size-24;
}
&__subtitle {
font-size: defaults.$font-size-12;
}
}
.gdoc-menu-header {
@ -354,8 +377,8 @@ svg.gdoc-icon {
background: var(--body-background);
border-radius: defaults.$border-radius;
box-shadow:
0 1px 3px 0 var(--accent-color-dark),
0 1px 2px 0 var(--accent-color);
0 1px 3px 0 var(--accent-color),
0 1px 2px 0 var(--accent-color-lite);
position: absolute;
margin: 0;
padding: defaults.$padding-8 defaults.$padding-4 !important;
@ -420,6 +443,7 @@ svg.gdoc-icon {
width: 1.85em;
height: 1.85em;
color: transparent;
transition: color 0.2s ease-in-out;
}
&:focus {
@ -513,12 +537,20 @@ svg.gdoc-icon {
position: relative;
&:hover > .gdoc-post__codecopy {
opacity: 1;
visibility: visible;
pointer-events: auto;
}
}
&__codecopy {
opacity: 0;
visibility: hidden;
transition:
opacity 0.2s ease,
visibility 0.2s ease;
pointer-events: none;
position: absolute;
top: defaults.$padding-8;
right: defaults.$padding-8;
@ -578,6 +610,10 @@ svg.gdoc-icon {
text-decoration: underline;
color: var(--footer-link-color);
&:hover {
text-decoration: none;
}
&:visited {
color: var(--footer-link-color-visited);
}

View File

@ -20,7 +20,6 @@
/* LineTable */
.chroma .lntable {
border: defaults.$border-1 solid var(--code-accent-color);
border-radius: defaults.$border-radius;
border-spacing: 0;
padding: 0;
@ -39,7 +38,7 @@
.chroma .lntable td:first-child {
code {
background-color: var(--code-accent-color-lite);
border-right: defaults.$border-1 solid var(--code-accent-color);
font-size: defaults.$font-size-12;
padding-left: 0;
padding-right: 0;
border-radius: 0;

View File

@ -19,10 +19,6 @@
--link-color: #{defaults.$link-color};
--link-color-visited: #{defaults.$link-color-visited};
--hint-link-color: #{defaults.$link-color};
--hint-link-color-visited: #{defaults.$link-color-visited};
--accent-color-dark: #{defaults.$gray-400};
--accent-color: #{defaults.$gray-200};
--accent-color-lite: #{defaults.$gray-100};
@ -40,16 +36,10 @@
}
.gdoc-markdown {
.gdoc-hint,
.gdoc-props__tag,
.admonitionblock {
filter: none;
}
.gdoc-hint__title,
.admonitionblock table td:first-child {
background-color: color.scale(defaults.$gray-600, $alpha: -95%);
}
}
}
@ -68,10 +58,6 @@
--link-color: #{defaults.$link-color-dark};
--link-color-visited: #{defaults.$link-color-visited-dark};
--hint-link-color: #{defaults.$link-color};
--hint-link-color-visited: #{defaults.$link-color-visited};
--accent-color-dark: #{color.scale(defaults.$body-background-dark, $lightness: -60%)};
--accent-color: #{color.scale(defaults.$body-background-dark, $lightness: -30%)};
--accent-color-lite: #{color.scale(defaults.$body-background-dark, $lightness: -15%)};
@ -89,7 +75,6 @@
}
.gdoc-markdown {
.gdoc-hint,
.gdoc-props__tag,
.admonitionblock {
filter: saturate(2.5) brightness(0.85);
@ -98,22 +83,6 @@
.gdoc-progress__bar {
filter: saturate(0.85) brightness(0.85);
}
.gdoc-hint,
.admonitionblock {
a {
color: var(--hint-link-color);
&:visited {
color: var(--hint-link-color-visited);
}
}
}
.gdoc-hint__title,
.admonitionblock table td:first-child {
background-color: color.scale(defaults.$gray-600, $alpha: -85%);
}
}
}
@ -124,7 +93,7 @@
--code-background: #{defaults.$code-background-dark};
--code-accent-color: #{color.scale(defaults.$code-background-dark, $lightness: -30%)};
--code-accent-color-lite: #{color.scale(defaults.$code-background-dark, $lightness: -15%)};
--code-font-color: #{defaults.$code-font-color-dark};
--code-font-color: #{defaults.$gray-300};
--code-copy-background: #{defaults.$code-background-dark};
--code-copy-font-color: #{color.scale(defaults.$code-font-color-dark, $lightness: -15%)};
@ -140,11 +109,11 @@
--code-background: #{defaults.$code-background};
--code-accent-color: #{color.scale(defaults.$code-background, $lightness: -45%)};
--code-accent-color-lite: #{color.scale(defaults.$code-background, $lightness: -15%)};
--code-font-color: #{defaults.$code-font-color};
--code-font-color: #{defaults.$gray-700};
--code-copy-background: #{defaults.$code-background};
--code-copy-font-color: #{color.scale(defaults.$code-font-color, $lightness: 20%)};
--code-copy-border-color: #{color.scale(defaults.$code-font-color, $lightness: 40%)};
--code-copy-font-color: #{defaults.$gray-500};
--code-copy-border-color: #{defaults.$gray-400};
--code-copy-success-color: #{map.get(defaults.$hint-colors, "ok")};
}
}

View File

@ -28,19 +28,18 @@ $border-1: 1px !default;
$border-2: 1.5px !default;
$border-4: 3px !default;
$border-radius: 0.15rem !default;
$border-radius: 0.3rem !default;
// Grayscale
$white: rgba(255, 255, 255, 1) !default;
$gray-100: rgba(248, 249, 250, 1) !default;
$gray-200: rgba(233, 236, 239, 1) !default;
$gray-300: rgba(222, 226, 230, 1) !default;
$gray-400: rgba(206, 212, 218, 1) !default;
$gray-500: rgba(173, 181, 189, 1) !default;
$gray-600: rgba(134, 142, 150, 1) !default;
$gray-700: rgba(73, 80, 87, 1) !default;
$gray-800: rgba(52, 58, 64, 1) !default;
$gray-900: rgba(33, 37, 41, 1) !default;
$gray-100: rgba(244, 246, 247, 1) !default;
$gray-200: rgba(217, 219, 221, 1) !default;
$gray-300: rgba(189, 192, 195, 1) !default;
$gray-400: rgba(162, 165, 169, 1) !default;
$gray-500: rgba(134, 137, 142, 1) !default;
$gray-600: rgba(107, 110, 116, 1) !default;
$gray-700: rgba(79, 83, 90, 1) !default;
$gray-800: rgba(52, 56, 64, 1) !default;
$black: rgba(0, 0, 0, 1) !default;
$link-color: rgba(10, 83, 154, 1) !default;

View File

@ -38,7 +38,7 @@
line-height: normal;
&:hover {
text-decoration: underline;
text-decoration: none;
}
}
@ -56,7 +56,7 @@
}
&__link--code {
text-decoration: none;
text-decoration: underline;
code {
color: inherit !important;
}
@ -64,7 +64,7 @@
&:hover {
background: none;
color: var(--link-color) !important;
text-decoration: underline;
text-decoration: none;
}
&:visited,
@ -120,6 +120,7 @@
padding: defaults.$padding-8 defaults.$padding-16 defaults.$padding-8
(defaults.$padding-16 - defaults.$padding-4); //to keep total left space 16dp
border: defaults.$border-1 solid var(--accent-color);
border-left: defaults.$border-4 solid var(--accent-color);
border-radius: defaults.$border-radius;
}
@ -174,7 +175,7 @@
}
code {
padding: defaults.$padding-4 defaults.$padding-8;
padding: defaults.$padding-2 defaults.$padding-4;
}
pre,
@ -183,7 +184,7 @@
border-radius: defaults.$border-radius;
color: var(--code-font-color);
font-size: defaults.$font-size-14;
line-height: defaults.$padding-16;
line-height: defaults.$padding-20;
}
pre code {

View File

@ -31,6 +31,12 @@
display: none;
}
&__control {
svg.gdoc-icon.gdoc_keyboard_arrow_right {
display: none;
}
}
&__control,
&__home {
display: flex;
@ -76,7 +82,7 @@
}
}
#menu-control:checked ~ main {
.wrapper:has(#menu-control:checked) {
.gdoc-nav nav,
.gdoc-page {
transform: translateX(defaults.$menu-width);
@ -85,9 +91,7 @@
.gdoc-page {
opacity: 0.25;
}
}
#menu-control:checked ~ .gdoc-header .gdoc-nav__control {
svg.gdoc-icon.gdoc_menu {
display: none;
}
@ -97,7 +101,7 @@
}
}
#menu-header-control:checked ~ .gdoc-header {
.wrapper:has(#menu-header-control:checked) {
.gdoc-brand {
display: none;
}
@ -111,6 +115,9 @@
svg.gdoc-icon.gdoc_keyboard_arrow_left {
display: none;
}
svg.gdoc-icon.gdoc_keyboard_arrow_right {
display: inline-block;
}
}
}
}

View File

@ -140,51 +140,44 @@
// {{< hint >}}
.gdoc-hint {
$root: &;
@each $name, $color in defaults.$hint-colors {
&.#{$name} {
border-left-color: $color;
background-color: color.scale($color, $lightness: 95%, $saturation: -30%);
color: defaults.$body-font-color;
border-color: $color;
padding: 0;
code,
pre {
background-color: color.scale($color, $lightness: 80%, $saturation: -75%);
color: defaults.$code-font-color;
#{$root}__title {
background-color: color.adjust($color, $alpha: -0.9);
border-start-start-radius: inherit;
border-start-end-radius: inherit;
position: relative;
z-index: -10;
outline: color.adjust($color, $alpha: -0.9);
}
}
}
&__title {
padding: defaults.$padding-4 defaults.$padding-16;
background-color: color.scale(defaults.$gray-600, $alpha: -95%);
font-weight: bold;
color: color.scale(defaults.$body-font-color, $alpha: -15%);
i.fa::after {
content: attr(title);
font-style: normal;
padding-left: defaults.$padding-24;
}
i.fa {
color: defaults.$black;
background-size: auto 90%;
background-repeat: no-repeat;
filter: invert(30%);
color: var(--body-font-color);
margin-left: -5px;
}
@each $name, $icon in defaults.$hint-icons {
i.fa.#{$name} {
background-image: url(img/geekdoc-stack.svg##{$icon});
width: defaults.$font-size-24;
height: defaults.$font-size-24;
mask-image: url(img/geekdoc-stack.svg##{$icon});
mask-repeat: no-repeat;
mask-size: contain;
background-color: var(--body-font-color);
}
}
.gdoc-icon {
width: defaults.$font-size-24;
height: defaults.$font-size-24;
margin-left: -5px;
}
}

View File

@ -31,7 +31,12 @@
background: var(--accent-color-lite);
}
.flex-gap {
.gap-8 {
flex-wrap: wrap;
gap: defaults.$padding-8;
}
.gap-16 {
flex-wrap: wrap;
gap: defaults.$padding-16;
}
@ -96,3 +101,7 @@
display: inline-block;
min-width: 4rem;
}
.w-full {
width: 100%;
}

View File

@ -87,7 +87,7 @@ var config = {
generate(seed, files) {
let manifest = {}
files.forEach(function (element, index) {
files.forEach(function (element) {
if (element.name.endsWith("VERSION")) return
if (element.name.endsWith(".svg")) return
if (element.name.startsWith("fonts/")) return