From a9168e6f04f766f7d88bc1b24aaa81336098b2fc Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Sun, 15 Dec 2024 03:56:47 +0300 Subject: Auto-commit 2024-12-15 --- layouts/_default/baseof.html | 6 +---- layouts/_default/home.html | 31 -------------------------- layouts/_default/index.json | 5 +++++ layouts/_default/list.html | 43 +++++++++++++++--------------------- layouts/_default/single.html | 52 +++++--------------------------------------- 5 files changed, 30 insertions(+), 107 deletions(-) delete mode 100644 layouts/_default/home.html create mode 100644 layouts/_default/index.json (limited to 'layouts/_default') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index e2e4362..a984f1c 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -4,14 +4,10 @@ {{ partial "head.html" . }} -
{{ partial "header.html" . }}
{{ block "main" . }}{{ end }} -
- {{ partial "footer.html" . }} -
-
+ {{ partial "footer.html" . }} diff --git a/layouts/_default/home.html b/layouts/_default/home.html deleted file mode 100644 index b160025..0000000 --- a/layouts/_default/home.html +++ /dev/null @@ -1,31 +0,0 @@ -{{ define "main" }} -
- -
- - {{ $pages := where site.RegularPages "Type" "posts" }} - {{ $paginator := .Paginate $pages 7 }} - {{ range $paginator.Pages }} - {{ partial "list.html" . }} - {{ end }} - -
-
-{{ end }} diff --git a/layouts/_default/index.json b/layouts/_default/index.json new file mode 100644 index 0000000..c93f805 --- /dev/null +++ b/layouts/_default/index.json @@ -0,0 +1,5 @@ +{{- $.Scratch.Add "index" slice -}} +{{- range .Site.RegularPages -}} + {{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "categories" .Params.categories "contents" .Plain "permalink" .Permalink) -}} +{{- end -}} +{{- $.Scratch.Get "index" | jsonify -}} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 860fd5c..365d386 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,29 +1,22 @@ {{ define "main" }} -
- -
- {{ if .Title }} - - {{ end }} - {{ $paginator := .Paginate .Pages 7 }} - {{ range $paginator.Pages }} - {{ partial "list.html" . }} - {{ end }} - +
+
+
+ {{ if .Title }} +

+ {{ .Title }} +

+ {{ .Content }} + {{ partial "icon.html" "rss" }} Пописка + {{ end }} +
+
+ {{ $paginator := .Paginate .Pages 7 }} + {{ range $paginator.Pages }} + {{ partial "list.html" . }} + {{ end }} + +
- {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 2bc6870..15d4f05 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,49 +1,9 @@ {{ define "main" }} -
- {{ end }} -- cgit v1.2.3