From e1fec9e84d4cff66e6182c13f3cb9f157f8ad70f Mon Sep 17 00:00:00 2001 From: eltrac Date: Sun, 8 Mar 2026 16:08:21 +0800 Subject: refactor: move fiction layouts --- layouts/fiction/page.html | 22 ++++++++++++++++++++++ layouts/fiction/section.html | 32 ++++++++++++++++++++++++++++++++ layouts/fictions/page.html | 22 ---------------------- layouts/fictions/section.html | 32 -------------------------------- 4 files changed, 54 insertions(+), 54 deletions(-) create mode 100644 layouts/fiction/page.html create mode 100644 layouts/fiction/section.html delete mode 100644 layouts/fictions/page.html delete mode 100644 layouts/fictions/section.html diff --git a/layouts/fiction/page.html b/layouts/fiction/page.html new file mode 100644 index 00000000..1b5b400d --- /dev/null +++ b/layouts/fiction/page.html @@ -0,0 +1,22 @@ +{{ define "main" }} +
+
+ {{ partial "components/logo" (dict + "link" "fictions/" + "src" "/img/potted-skeleton.svg" + "ctx" . + "imageClass" "block w-[10rem]" + "class" "flex justify-center" + ) }} +

{{ .Title }}

+
{{ partial "components/date" . }}
+
+ + {{ partial "content" . }} + {{ partial "posts/action-menu.html" . }} + {{ partial "components/back-to-top.html" . }} +
+{{ end }} diff --git a/layouts/fiction/section.html b/layouts/fiction/section.html new file mode 100644 index 00000000..997613e4 --- /dev/null +++ b/layouts/fiction/section.html @@ -0,0 +1,32 @@ +{{ define "main" }} +
+ {{ partial "header.html" . }} + {{ partial "home/home-nav" . }} +
{{ .Content }}
+
+
+ {{- range .Pages }} + + {{ $rotationDeg := add (math.Floor (mul (math.Rand) 7)) -4 }} + {{- $deg := int $rotationDeg -}} + {{- $rotateClass := cond (ge $deg 0) + (printf "rotate-%d" $deg) + (printf "-rotate-%d" (mul -1 $deg)) + -}} + + {{ $steps := slice 60 70 80 90 100 }} + {{ $opacity := index $steps (int (math.Floor (mul (math.Rand) 5))) }} + {{ $opacityClass := printf "opacity-%d" $opacity }} + + + {{- end }} +
+
+
+ {{ partial "footer.html" . }} +{{ end }} diff --git a/layouts/fictions/page.html b/layouts/fictions/page.html deleted file mode 100644 index 1b5b400d..00000000 --- a/layouts/fictions/page.html +++ /dev/null @@ -1,22 +0,0 @@ -{{ define "main" }} -
-
- {{ partial "components/logo" (dict - "link" "fictions/" - "src" "/img/potted-skeleton.svg" - "ctx" . - "imageClass" "block w-[10rem]" - "class" "flex justify-center" - ) }} -

{{ .Title }}

-
{{ partial "components/date" . }}
-
- - {{ partial "content" . }} - {{ partial "posts/action-menu.html" . }} - {{ partial "components/back-to-top.html" . }} -
-{{ end }} diff --git a/layouts/fictions/section.html b/layouts/fictions/section.html deleted file mode 100644 index 997613e4..00000000 --- a/layouts/fictions/section.html +++ /dev/null @@ -1,32 +0,0 @@ -{{ define "main" }} -
- {{ partial "header.html" . }} - {{ partial "home/home-nav" . }} -
{{ .Content }}
-
-
- {{- range .Pages }} - - {{ $rotationDeg := add (math.Floor (mul (math.Rand) 7)) -4 }} - {{- $deg := int $rotationDeg -}} - {{- $rotateClass := cond (ge $deg 0) - (printf "rotate-%d" $deg) - (printf "-rotate-%d" (mul -1 $deg)) - -}} - - {{ $steps := slice 60 70 80 90 100 }} - {{ $opacity := index $steps (int (math.Floor (mul (math.Rand) 5))) }} - {{ $opacityClass := printf "opacity-%d" $opacity }} - - - {{- end }} -
-
-
- {{ partial "footer.html" . }} -{{ end }} -- cgit v1.2.3