From 1da07b0b4a337342cc48627d9af78e7fd20a45cf Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Sat, 14 Jun 2025 22:49:26 +0800 Subject: www: move layout files for new version of hugo and fix nested shortcodes. --- www/assets/res/css/todos.css | 25 +++---- www/config/_default/hugo.yaml | 4 ++ www/content/notes/_index.md | 15 +++- www/content/notes/cheat-sheet.md | 5 +- www/content/notes/hurd.md | 106 ----------------------------- www/content/notes/hurd/_index.md | 15 ++++ www/content/notes/hurd/cheat-sheet.md | 5 +- www/content/notes/hurd/links.md | 88 ++++++++++++++++++++++++ www/content/notes/hurd/todos.md | 18 +++-- www/content/notes/todos.md | 7 -- www/layouts/_default/baseof.html | 49 ------------- www/layouts/_default/list.html | 17 ----- www/layouts/_default/single.html | 23 ------- www/layouts/_partials/css-res.html | 9 +++ www/layouts/_partials/css.html | 1 + www/layouts/_partials/date.html | 1 + www/layouts/_partials/highlight.html | 6 ++ www/layouts/_partials/js.html | 11 +++ www/layouts/_partials/nav.html | 6 ++ www/layouts/_partials/preview/article.html | 10 +++ www/layouts/_partials/preview/post.html | 7 ++ www/layouts/_partials/preview/posts.html | 7 ++ www/layouts/_shortcodes/link-group.html | 25 +++++++ www/layouts/baseof.html | 49 +++++++++++++ www/layouts/home.html | 78 +++++++++++++++++++++ www/layouts/index.html | 78 --------------------- www/layouts/list.html | 13 ++++ www/layouts/partials/css-res.html | 9 --- www/layouts/partials/css.html | 1 - www/layouts/partials/date.html | 1 - www/layouts/partials/highlight.html | 6 -- www/layouts/partials/js.html | 11 --- www/layouts/partials/nav.html | 6 -- www/layouts/partials/preview/article.html | 10 --- www/layouts/partials/preview/post.html | 7 -- www/layouts/partials/preview/posts.html | 7 -- www/layouts/shortcodes/link-group.html | 25 ------- www/layouts/shortcodes/mono.html | 3 - www/layouts/shortcodes/todo.html | 5 -- www/layouts/single.html | 23 +++++++ 40 files changed, 388 insertions(+), 404 deletions(-) delete mode 100644 www/content/notes/hurd.md create mode 100644 www/content/notes/hurd/_index.md create mode 100644 www/content/notes/hurd/links.md delete mode 100644 www/content/notes/todos.md delete mode 100644 www/layouts/_default/baseof.html delete mode 100644 www/layouts/_default/list.html delete mode 100644 www/layouts/_default/single.html create mode 100644 www/layouts/_partials/css-res.html create mode 100644 www/layouts/_partials/css.html create mode 100644 www/layouts/_partials/date.html create mode 100644 www/layouts/_partials/highlight.html create mode 100644 www/layouts/_partials/js.html create mode 100644 www/layouts/_partials/nav.html create mode 100644 www/layouts/_partials/preview/article.html create mode 100644 www/layouts/_partials/preview/post.html create mode 100644 www/layouts/_partials/preview/posts.html create mode 100644 www/layouts/_shortcodes/link-group.html create mode 100644 www/layouts/baseof.html create mode 100644 www/layouts/home.html delete mode 100644 www/layouts/index.html create mode 100644 www/layouts/list.html delete mode 100644 www/layouts/partials/css-res.html delete mode 100644 www/layouts/partials/css.html delete mode 100644 www/layouts/partials/date.html delete mode 100644 www/layouts/partials/highlight.html delete mode 100644 www/layouts/partials/js.html delete mode 100644 www/layouts/partials/nav.html delete mode 100644 www/layouts/partials/preview/article.html delete mode 100644 www/layouts/partials/preview/post.html delete mode 100644 www/layouts/partials/preview/posts.html delete mode 100644 www/layouts/shortcodes/link-group.html delete mode 100644 www/layouts/shortcodes/mono.html delete mode 100644 www/layouts/shortcodes/todo.html create mode 100644 www/layouts/single.html (limited to 'www') diff --git a/www/assets/res/css/todos.css b/www/assets/res/css/todos.css index 7802812..f9aa23b 100644 --- a/www/assets/res/css/todos.css +++ b/www/assets/res/css/todos.css @@ -1,24 +1,17 @@ -.todo { - h3::before { - font-family: monospace; +h3.todo { + &::before { + font-size: small; } - &.working h3::before { - content: "* "; + &.working::before { + content: "(working) "; } - &.done h3::before { - content: "✓ "; + &.done::before { + content: "(done) "; } - &.give-up { - &, a:link, a:visited { - color: grey; - } - - h3:before { - content: "orz ✖ "; - } + &.give-up::before { + content: "(give up) "; } } - diff --git a/www/config/_default/hugo.yaml b/www/config/_default/hugo.yaml index b913177..289b0b4 100644 --- a/www/config/_default/hugo.yaml +++ b/www/config/_default/hugo.yaml @@ -18,6 +18,10 @@ frontmatter: markup: goldmark: + parser: + attribute: + block: true + title: true extensions: table: true highlight: diff --git a/www/content/notes/_index.md b/www/content/notes/_index.md index 3c736ed..3f96f73 100644 --- a/www/content/notes/_index.md +++ b/www/content/notes/_index.md @@ -1,5 +1,16 @@ --- title: "Notes" -params: - recursive: true +date: 2025-06-14T21:24:00+08:00 +lastmod: 2025-06-14T21:24:00+08:00 +layout: single --- + +- [Cheat Sheet](/notes/cheat-sheet) + +- [Hurd](/notes/hurd) + + - [Cheat Sheet](/notes/hurd/cheat-sheet) + + - [Todos](/notes/hurd/todos) + + - [Useful Links](/notes/hurd/links) diff --git a/www/content/notes/cheat-sheet.md b/www/content/notes/cheat-sheet.md index 56bc92a..9f90f08 100644 --- a/www/content/notes/cheat-sheet.md +++ b/www/content/notes/cheat-sheet.md @@ -4,11 +4,8 @@ date: 2025-04-01T23:09:53+08:00 lastmod: 2025-06-12T01:09:39+08:00 --- -{{< mono >}} - goto: [Hurd Cheat Sheet (in a separated page)](/notes/hurd/cheat-sheet) - -{{< /mono >}} +{class="mono"} ## GRUB diff --git a/www/content/notes/hurd.md b/www/content/notes/hurd.md deleted file mode 100644 index aeb9b15..0000000 --- a/www/content/notes/hurd.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: "Hurd" -date: 2025-03-03T15:34:41+08:00 -lastmod: 2025-06-12T01:09:39+08:00 ---- - -{{< mono >}} - -goto: [Cheat Sheet](/notes/hurd/cheat-sheet) | [Todos](/notes/hurd/todos) - -{{< /mono >}} - -## links - -{{< mono >}} - -| name | link | -| --- | --- | -| kernel-list-archive | | -| debian-list-archive | | -| irc-archive | | -| kernel-home | | -| debian-home | | - -{{< /mono >}} - -refs: - -{{< mono >}} - -| name | link | -| --- | --- | -| c | | -| posix latest | | -| posix 2013 | | -| posix 2008 | | -| glibc | | - -{{< /mono >}} - -## mailing lists / irc - -{{< mono >}} - -| name | address | -| --- | --- | -| hurd | | -| debian | | -| irc | librechat #hurd | - -{{< /mono >}} - -## *_MAX patch - -See [this](posts/c-func-ext.md) - -## git repos - -Clone all at once: - -```sh -# glibc is too big, so not clone here. -for repo in hurd gnumach mig web; do - if [ ! -d $repo ]; then - git clone "https://crupest.life/git/hurd/$repo.git" - pushd $repo - git remote add upstream "https://git.savannah.gnu.org/git/hurd/$repo.git" - popd - fi -done -``` - -{{< link-group >}} -hurd -cru: -upstream: -debian: -{{< /link-group >}} - -{{< link-group >}} -gnumach -cru: -upstream: -debian: -{{< /link-group >}} - -{{< link-group >}} -mig -cru: -upstream: -debian: -{{< /link-group >}} - -{{< link-group >}} -glibc -cru: -upstream: -debian: -mirror: -{{< /link-group >}} - -{{< link-group >}} -web -cru: -upstream: -{{< /link-group >}} diff --git a/www/content/notes/hurd/_index.md b/www/content/notes/hurd/_index.md new file mode 100644 index 0000000..8faf70b --- /dev/null +++ b/www/content/notes/hurd/_index.md @@ -0,0 +1,15 @@ +--- +title: "Hurd" +date: 2025-03-03T15:34:41+08:00 +lastmod: 2025-06-12T01:09:39+08:00 +layout: single +--- + +This is the gateway page for various notes about +[GNU/Hurd](https://www.gnu.org/software/hurd/) written by me. + +- [Cheat Sheet](/notes/hurd/cheat-sheet) + +- [Todos](/notes/hurd/todos) + +- [Useful Links](/notes/hurd/links) diff --git a/www/content/notes/hurd/cheat-sheet.md b/www/content/notes/hurd/cheat-sheet.md index f48e943..6fe5ccd 100644 --- a/www/content/notes/hurd/cheat-sheet.md +++ b/www/content/notes/hurd/cheat-sheet.md @@ -1,7 +1,7 @@ --- title: "Hurd Cheat Sheet" date: 2025-06-12T00:59:16+08:00 -lastmod: 2025-06-12T00:59:16+08:00 +lastmod: 2025-06-14T20:34:06+08:00 --- ## Mirrors @@ -45,6 +45,9 @@ boot on. QEMU cli arguments `-machine q35` enables AHCI and SATA, and is **required for official x86_64 image to boot**. As for i386, I haven't checked now. +There is [a Deno script](https://github.com/crupest/crupest/blob/dev/deno/tools/manage-vm.ts) +written by me to help define and build QEMU cli arguments of VMs. + ## Inside Hurd Configure/Setup network diff --git a/www/content/notes/hurd/links.md b/www/content/notes/hurd/links.md new file mode 100644 index 0000000..1e966d4 --- /dev/null +++ b/www/content/notes/hurd/links.md @@ -0,0 +1,88 @@ +--- +title: "Hurd Useful Links" +date: 2025-06-14T20:34:06+08:00 +lastmod: 2025-06-14T20:34:06+08:00 +--- + +## links + +| name | link | +| --- | --- | +| kernel-list-archive | | +| debian-list-archive | | +| irc-archive | | +| kernel-home | | +| debian-home | | + +refs: + +| name | link | +| --- | --- | +| c | | +| posix latest | | +| posix 2013 | | +| posix 2008 | | +| glibc | | + +## mailing lists / irc + +| name | address | +| --- | --- | +| hurd | | +| debian | | +| irc | librechat #hurd | + +## *_MAX patch + +See [this](posts/c-func-ext.md) + +## git repos + +Clone all at once: + +```sh +# glibc is too big, so not clone here. +for repo in hurd gnumach mig web; do + if [ ! -d $repo ]; then + git clone "https://crupest.life/git/hurd/$repo.git" + pushd $repo + git remote add upstream "https://git.savannah.gnu.org/git/hurd/$repo.git" + popd + fi +done +``` + +{{< link-group >}} +hurd +cru: +upstream: +debian: +{{< /link-group >}} + +{{< link-group >}} +gnumach +cru: +upstream: +debian: +{{< /link-group >}} + +{{< link-group >}} +mig +cru: +upstream: +debian: +{{< /link-group >}} + +{{< link-group >}} +glibc +cru: +upstream: +debian: +mirror: +{{< /link-group >}} + +{{< link-group >}} +web +cru: +upstream: +{{< /link-group >}} diff --git a/www/content/notes/hurd/todos.md b/www/content/notes/hurd/todos.md index 8fe068b..2dbded3 100644 --- a/www/content/notes/hurd/todos.md +++ b/www/content/notes/hurd/todos.md @@ -1,7 +1,7 @@ --- title: "Hurd Todos" date: 2025-03-03T21:22:35+08:00 -lastmod: 2025-03-03T23:28:46+08:00 +lastmod: 2025-06-14T20:34:06+08:00 params: css: - todos @@ -9,7 +9,11 @@ params: ## Porting -{{< todo name=pam state=give-up >}} +### hurd-fs4 {class="todo working"} + + + +### pam {class="todo give-up"} {{< link-group >}} git @@ -23,9 +27,7 @@ mail {{< /link-group >}} -{{< /todo >}} - -{{< todo name=abseil state=working >}} +### abseil {class="todo working"} {{< link-group >}} git @@ -40,9 +42,7 @@ mail {{< /link-group >}} -{{< /todo >}} - -{{< todo name=libgav1 state=done >}} +### libgav1 {class="todo done"} {{< link-group >}} git @@ -56,5 +56,3 @@ misc mail: gerrit: {{< /link-group >}} - -{{< /todo >}} diff --git a/www/content/notes/todos.md b/www/content/notes/todos.md deleted file mode 100644 index 1625362..0000000 --- a/www/content/notes/todos.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: "Todos" -date: 2025-03-03T15:34:53+08:00 -lastmod: 2025-03-03T23:28:46+08:00 ---- - -[Hurd](/notes/hurd/todos) diff --git a/www/layouts/_default/baseof.html b/www/layouts/_default/baseof.html deleted file mode 100644 index 6d00be5..0000000 --- a/www/layouts/_default/baseof.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - {{ block "title" . }} - {{ .Site.Title }} - {{ end }} - {{ partial "js.html" "res/js/color-scheme.ts" }} - {{ partial "css-res.html" (partial "highlight.html" dict) }} - {{ partial "css.html" "res/css/base.css" }} - {{ block "head" . }} - {{ end }} - {{ range .Params.css }} - {{ partial "css.html" (printf "res/css/%s.css" .) }} - {{ end }} - - - {{ block "pre-article" .}} - {{ end }} - - - {{ block "scripts" . }} - {{ end }} - - diff --git a/www/layouts/_default/list.html b/www/layouts/_default/list.html deleted file mode 100644 index 5bb0b5e..0000000 --- a/www/layouts/_default/list.html +++ /dev/null @@ -1,17 +0,0 @@ -{{ define "head"}} - {{ partial "css.html" "res/css/article.css" }} -{{ end }} - -{{ define "content" }} - {{ partial "nav.html" . }} -

{{ .Title }}

- {{ $pages := .RegularPages }} - {{ if .Param "recursive" }} - {{ $pages = .RegularPagesRecursive }} - {{ end }} - {{ partial "preview/posts.html" (dict - "h" "h3" - "pages" $pages - ) - }} -{{ end }} diff --git a/www/layouts/_default/single.html b/www/layouts/_default/single.html deleted file mode 100644 index cd0e9c5..0000000 --- a/www/layouts/_default/single.html +++ /dev/null @@ -1,23 +0,0 @@ -{{ define "head"}} - {{ partial "css.html" "res/css/single.css" }} -{{ end }} - -{{ define "title" }} - {{ .Title }} -{{ end }} - -{{ define "content" }} - {{ partial "nav.html" . }} -

{{ .Title }}

-
- - {{ .Content }} -
- {{ partial "nav.html" . }} -{{ end }} diff --git a/www/layouts/_partials/css-res.html b/www/layouts/_partials/css-res.html new file mode 100644 index 0000000..6fabf67 --- /dev/null +++ b/www/layouts/_partials/css-res.html @@ -0,0 +1,9 @@ +{{ with . | minify }} + {{ if hugo.IsProduction }} + {{ with . | fingerprint }} + + {{ end }} + {{ else }} + + {{ end }} +{{ end }} diff --git a/www/layouts/_partials/css.html b/www/layouts/_partials/css.html new file mode 100644 index 0000000..12d3353 --- /dev/null +++ b/www/layouts/_partials/css.html @@ -0,0 +1 @@ +{{ partial "css-res.html" (resources.Get .) }} \ No newline at end of file diff --git a/www/layouts/_partials/date.html b/www/layouts/_partials/date.html new file mode 100644 index 0000000..9769e4e --- /dev/null +++ b/www/layouts/_partials/date.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/www/layouts/_partials/highlight.html b/www/layouts/_partials/highlight.html new file mode 100644 index 0000000..28c510e --- /dev/null +++ b/www/layouts/_partials/highlight.html @@ -0,0 +1,6 @@ +{{ $light := resources.Get "res/css/catppuccin-latte.css" }} +{{ $dark := resources.Get "res/css/catppuccin-mocha.css" }} +{{ $dark_wrapper_before := resources.FromString "highlight-dark-wapper-before.css" `html[data-theme="dark"] {`}}} +{{ $dark_wrapper_after := resources.FromString "highlight-dark-wapper-after.css" "}"}} +{{ $highlight := slice $light $dark_wrapper_before $dark $dark_wrapper_after | resources.Concat "res/css/highlight.css" }} +{{ return $highlight }} diff --git a/www/layouts/_partials/js.html b/www/layouts/_partials/js.html new file mode 100644 index 0000000..16dafa4 --- /dev/null +++ b/www/layouts/_partials/js.html @@ -0,0 +1,11 @@ +{{ with resources.Get . }} + {{ if hugo.IsProduction }} + {{ with . | js.Build (dict "minify" true "sourceMap" "external") | fingerprint }} + + {{ end }} + {{ else }} + {{ with . | js.Build }} + + {{ end }} + {{ end }} +{{ end }} diff --git a/www/layouts/_partials/nav.html b/www/layouts/_partials/nav.html new file mode 100644 index 0000000..42c9ad1 --- /dev/null +++ b/www/layouts/_partials/nav.html @@ -0,0 +1,6 @@ + diff --git a/www/layouts/_partials/preview/article.html b/www/layouts/_partials/preview/article.html new file mode 100644 index 0000000..6245434 --- /dev/null +++ b/www/layouts/_partials/preview/article.html @@ -0,0 +1,10 @@ +
+ {{ .date | time.Format ":date_medium" }} + {{ (printf `<%[1]s class="title">%s` .h .link .title) | safeHTML }} +

+ {{ range split .content "\n" | first 5 }} + {{ . | htmlUnescape }}
+ {{ end }} +

+

... Read more

+
diff --git a/www/layouts/_partials/preview/post.html b/www/layouts/_partials/preview/post.html new file mode 100644 index 0000000..f0c6fb5 --- /dev/null +++ b/www/layouts/_partials/preview/post.html @@ -0,0 +1,7 @@ +{{ partial "preview/article.html" (dict + "h" .h + "title" .page.Title + "link" .page.RelPermalink + "content" .page.Plain + "date" .page.Date) +}} diff --git a/www/layouts/_partials/preview/posts.html b/www/layouts/_partials/preview/posts.html new file mode 100644 index 0000000..f2cb640 --- /dev/null +++ b/www/layouts/_partials/preview/posts.html @@ -0,0 +1,7 @@ +{{ $h := .h }} +{{ range .pages }} + {{ partial "preview/post.html" (dict + "h" $h + "page" .) + }} +{{ end }} \ No newline at end of file diff --git a/www/layouts/_shortcodes/link-group.html b/www/layouts/_shortcodes/link-group.html new file mode 100644 index 0000000..b16c2bc --- /dev/null +++ b/www/layouts/_shortcodes/link-group.html @@ -0,0 +1,25 @@ + diff --git a/www/layouts/baseof.html b/www/layouts/baseof.html new file mode 100644 index 0000000..6d00be5 --- /dev/null +++ b/www/layouts/baseof.html @@ -0,0 +1,49 @@ + + + + + + + + + {{ block "title" . }} + {{ .Site.Title }} + {{ end }} + {{ partial "js.html" "res/js/color-scheme.ts" }} + {{ partial "css-res.html" (partial "highlight.html" dict) }} + {{ partial "css.html" "res/css/base.css" }} + {{ block "head" . }} + {{ end }} + {{ range .Params.css }} + {{ partial "css.html" (printf "res/css/%s.css" .) }} + {{ end }} + + + {{ block "pre-article" .}} + {{ end }} + + + {{ block "scripts" . }} + {{ end }} + + diff --git a/www/layouts/home.html b/www/layouts/home.html new file mode 100644 index 0000000..3cfc455 --- /dev/null +++ b/www/layouts/home.html @@ -0,0 +1,78 @@ +{{ define "head"}} + {{ partial "css.html" "res/css/home.css" }} + {{ partial "css.html" "res/css/article.css" }} +{{ end }} + +{{ define "friend" }} + {{ $gh_url := printf "https://github.com/%s" .github}} + +{{ end }} + +{{ define "content"}} + My avatar +

Hello! This is crupest !

+
+
+

Welcome to my home page! Nice to meet you here! 🥰

+

Feel free to contact me via my email address crupest@crupest.life, + or just create an issue in any of my GitHub + repos. I love talking with people a lot.

+ +
+
+ {{ with .GetPage "/posts" }} +
+

Recent Posts (all)

+ {{ partial "preview/posts.html" (dict + "h" "h3" + "pages" (.RegularPages.ByDate.Reverse.Limit 3)) + }} +
+ {{ end }} +
+
+

My Friends (more links are being collected ...)

+
+ {{ block "friend" dict + "name" "wsm" + "avatar" "https://avatars.githubusercontent.com/u/74699943?v=4" + "github" "wushuming666" + }} + {{ end }} + {{ block "friend" dict + "name" "hsz" + "url" "https://www.hszsoft.com" + "avatar" "https://avatars.githubusercontent.com/u/63097618?v=4" + "github" "hszSoft" + "tag" "随性の程序员" + }} + {{ end }} +
+
+{{ end }} diff --git a/www/layouts/index.html b/www/layouts/index.html deleted file mode 100644 index af3e11d..0000000 --- a/www/layouts/index.html +++ /dev/null @@ -1,78 +0,0 @@ -{{ define "head"}} - {{ partial "css.html" "res/css/home.css" }} - {{ partial "css.html" "res/css/article.css" }} -{{ end }} - -{{ define "friend" }} - {{ $gh_url := printf "https://github.com/%s" .github}} - -{{ end }} - -{{ define "content"}} - My avatar -

Hello! This is crupest !

-
-
-

Welcome to my home page! Nice to meet you here! 🥰

-

Feel free to contact me via my email address crupest@crupest.life, - or just create an issue in any of my GitHub - repos. I love talking with people a lot.

- -
-
- {{ with .GetPage "/posts" }} -
-

Recent Posts (all)

- {{ partial "preview/posts.html" (dict - "h" "h3" - "pages" (.RegularPages.ByDate.Reverse.Limit 3)) - }} -
- {{ end }} -
-
-

My Friends (more links are being collected ...)

-
- {{ block "friend" dict - "name" "wsm" - "avatar" "https://avatars.githubusercontent.com/u/74699943?v=4" - "github" "wushuming666" - }} - {{ end }} - {{ block "friend" dict - "name" "hsz" - "url" "https://www.hszsoft.com" - "avatar" "https://avatars.githubusercontent.com/u/63097618?v=4" - "github" "hszSoft" - "tag" "随性の程序员" - }} - {{ end }} -
-
-{{ end }} diff --git a/www/layouts/list.html b/www/layouts/list.html new file mode 100644 index 0000000..be33d10 --- /dev/null +++ b/www/layouts/list.html @@ -0,0 +1,13 @@ +{{ define "head"}} + {{ partial "css.html" "res/css/article.css" }} +{{ end }} + +{{ define "content" }} + {{ partial "nav.html" . }} +

{{ .Title }}

+ {{ partial "preview/posts.html" (dict + "h" "h3" + "pages" .RegularPages + ) + }} +{{ end }} diff --git a/www/layouts/partials/css-res.html b/www/layouts/partials/css-res.html deleted file mode 100644 index 6fabf67..0000000 --- a/www/layouts/partials/css-res.html +++ /dev/null @@ -1,9 +0,0 @@ -{{ with . | minify }} - {{ if hugo.IsProduction }} - {{ with . | fingerprint }} - - {{ end }} - {{ else }} - - {{ end }} -{{ end }} diff --git a/www/layouts/partials/css.html b/www/layouts/partials/css.html deleted file mode 100644 index 12d3353..0000000 --- a/www/layouts/partials/css.html +++ /dev/null @@ -1 +0,0 @@ -{{ partial "css-res.html" (resources.Get .) }} \ No newline at end of file diff --git a/www/layouts/partials/date.html b/www/layouts/partials/date.html deleted file mode 100644 index 9769e4e..0000000 --- a/www/layouts/partials/date.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/www/layouts/partials/highlight.html b/www/layouts/partials/highlight.html deleted file mode 100644 index 28c510e..0000000 --- a/www/layouts/partials/highlight.html +++ /dev/null @@ -1,6 +0,0 @@ -{{ $light := resources.Get "res/css/catppuccin-latte.css" }} -{{ $dark := resources.Get "res/css/catppuccin-mocha.css" }} -{{ $dark_wrapper_before := resources.FromString "highlight-dark-wapper-before.css" `html[data-theme="dark"] {`}}} -{{ $dark_wrapper_after := resources.FromString "highlight-dark-wapper-after.css" "}"}} -{{ $highlight := slice $light $dark_wrapper_before $dark $dark_wrapper_after | resources.Concat "res/css/highlight.css" }} -{{ return $highlight }} diff --git a/www/layouts/partials/js.html b/www/layouts/partials/js.html deleted file mode 100644 index 16dafa4..0000000 --- a/www/layouts/partials/js.html +++ /dev/null @@ -1,11 +0,0 @@ -{{ with resources.Get . }} - {{ if hugo.IsProduction }} - {{ with . | js.Build (dict "minify" true "sourceMap" "external") | fingerprint }} - - {{ end }} - {{ else }} - {{ with . | js.Build }} - - {{ end }} - {{ end }} -{{ end }} diff --git a/www/layouts/partials/nav.html b/www/layouts/partials/nav.html deleted file mode 100644 index 42c9ad1..0000000 --- a/www/layouts/partials/nav.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/www/layouts/partials/preview/article.html b/www/layouts/partials/preview/article.html deleted file mode 100644 index 6245434..0000000 --- a/www/layouts/partials/preview/article.html +++ /dev/null @@ -1,10 +0,0 @@ -
- {{ .date | time.Format ":date_medium" }} - {{ (printf `<%[1]s class="title">%s` .h .link .title) | safeHTML }} -

- {{ range split .content "\n" | first 5 }} - {{ . | htmlUnescape }}
- {{ end }} -

-

... Read more

-
diff --git a/www/layouts/partials/preview/post.html b/www/layouts/partials/preview/post.html deleted file mode 100644 index f0c6fb5..0000000 --- a/www/layouts/partials/preview/post.html +++ /dev/null @@ -1,7 +0,0 @@ -{{ partial "preview/article.html" (dict - "h" .h - "title" .page.Title - "link" .page.RelPermalink - "content" .page.Plain - "date" .page.Date) -}} diff --git a/www/layouts/partials/preview/posts.html b/www/layouts/partials/preview/posts.html deleted file mode 100644 index f2cb640..0000000 --- a/www/layouts/partials/preview/posts.html +++ /dev/null @@ -1,7 +0,0 @@ -{{ $h := .h }} -{{ range .pages }} - {{ partial "preview/post.html" (dict - "h" $h - "page" .) - }} -{{ end }} \ No newline at end of file diff --git a/www/layouts/shortcodes/link-group.html b/www/layouts/shortcodes/link-group.html deleted file mode 100644 index b16c2bc..0000000 --- a/www/layouts/shortcodes/link-group.html +++ /dev/null @@ -1,25 +0,0 @@ - diff --git a/www/layouts/shortcodes/mono.html b/www/layouts/shortcodes/mono.html deleted file mode 100644 index ab183a5..0000000 --- a/www/layouts/shortcodes/mono.html +++ /dev/null @@ -1,3 +0,0 @@ -
- {{ .Inner | .Page.RenderString }} -
diff --git a/www/layouts/shortcodes/todo.html b/www/layouts/shortcodes/todo.html deleted file mode 100644 index b4fc680..0000000 --- a/www/layouts/shortcodes/todo.html +++ /dev/null @@ -1,5 +0,0 @@ -
-

{{ .Get "name" }}

- {{ .Inner }} -
- diff --git a/www/layouts/single.html b/www/layouts/single.html new file mode 100644 index 0000000..cd0e9c5 --- /dev/null +++ b/www/layouts/single.html @@ -0,0 +1,23 @@ +{{ define "head"}} + {{ partial "css.html" "res/css/single.css" }} +{{ end }} + +{{ define "title" }} + {{ .Title }} +{{ end }} + +{{ define "content" }} + {{ partial "nav.html" . }} +

{{ .Title }}

+
+ + {{ .Content }} +
+ {{ partial "nav.html" . }} +{{ end }} -- cgit v1.2.3