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 +++++-------------------------------- layouts/go/list.html | 49 ---------------------------------- layouts/go/single.html | 46 ++++++++------------------------ layouts/index.html | 27 +++++++++++++++++++ layouts/partials/comments.html | 11 +++----- layouts/partials/footer.html | 29 ++++++++++++--------- layouts/partials/head.html | 5 ++-- layouts/partials/head/css.html | 11 +------- layouts/partials/head/js.html | 5 +--- layouts/partials/header.html | 18 ++++++++----- layouts/partials/hmenu.html | 47 ++------------------------------- layouts/partials/list.html | 51 ++++++++++++++++++------------------ layouts/partials/pagination.html | 2 +- layouts/partials/single/footer.html | 12 +++++++++ layouts/partials/single/header.html | 15 +++++++++++ layouts/partials/walk.html | 29 +++++++++++++++++++++ layouts/pico8/list.html | 50 ----------------------------------- layouts/pico8/single.html | 32 +++++------------------ 22 files changed, 194 insertions(+), 382 deletions(-) delete mode 100644 layouts/_default/home.html create mode 100644 layouts/_default/index.json delete mode 100644 layouts/go/list.html create mode 100644 layouts/index.html create mode 100644 layouts/partials/single/footer.html create mode 100644 layouts/partials/single/header.html create mode 100644 layouts/partials/walk.html delete mode 100644 layouts/pico8/list.html (limited to 'layouts') 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 }} diff --git a/layouts/go/list.html b/layouts/go/list.html deleted file mode 100644 index c8562e7..0000000 --- a/layouts/go/list.html +++ /dev/null @@ -1,49 +0,0 @@ -{{ define "main" }} -
- -
- {{ if .Title }} - - {{ end }} - {{ $paginator := .Paginate .Pages 7 }} - {{ range $paginator.Pages }} -
-
- -
- {{ if .Params.Image }} - - {{ end }} - {{ if .Description }} - {{ .Description }} - {{ else }} - {{ .Summary }} - {{ if .Truncated }} - Далее... - {{ end }} - {{ end }} -
-
go get -u neonxp.ru/go/{{ .Params.Name }}@latest
-
-
- {{ end }} - -
-
- -{{ end }} diff --git a/layouts/go/single.html b/layouts/go/single.html index e7c1c90..ca30873 100644 --- a/layouts/go/single.html +++ b/layouts/go/single.html @@ -1,37 +1,13 @@ {{ define "main" }} -
- +{{ end }} \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..88e4bb8 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,27 @@ +{{ define "main" }} +
+
+
+ {{ if .Title }} +

+ {{ .Title }} +

+ {{ .Content }} + {{ partial "icon.html" "rss" }} Пописка + {{ end }} +
+
+ {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} + {{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }} + {{ $filtered := ($pages | intersect $notHidden) }} + {{ $pag := .Paginate ($filtered) }} + + {{ $paginator := .Paginate .Pages 7 }} + {{ range $paginator.Pages }} + {{ partial "list.html" . }} + {{ end }} + +
+
+
+{{ end }} diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index 77b4410..f23437f 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -1,8 +1,6 @@ {{- with .Site.Params.comments -}} -
-
Комментарии
-
-
+

Комментарии

+
{{- end -}} \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 226a448..1917788 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,12 +1,17 @@ - + +{{ partialCached "head/js.html" . }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 5cd3afc..c0ee0a8 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -5,9 +5,8 @@ {{end}} - + {{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }} {{ partialCached "head/css.html" . }} -{{ partialCached "head/js.html" . }} diff --git a/layouts/partials/head/css.html b/layouts/partials/head/css.html index c0dc59e..a9fbbeb 100644 --- a/layouts/partials/head/css.html +++ b/layouts/partials/head/css.html @@ -1,13 +1,4 @@ -{{- with resources.Get "css/pico.min.css" }} - {{- if eq hugo.Environment "development" }} - - {{- else }} - {{- with . | minify | fingerprint }} - - {{- end }} - {{- end }} -{{- end }} -{{- with resources.Get "css/flexboxgrid.min.css" }} +{{- with resources.Get "css/bootstrap.min.css" }} {{- if eq hugo.Environment "development" }} {{- else }} diff --git a/layouts/partials/head/js.html b/layouts/partials/head/js.html index 7e1c81d..f4dc60e 100644 --- a/layouts/partials/head/js.html +++ b/layouts/partials/head/js.html @@ -10,7 +10,4 @@ {{- end }} {{- end }} {{- end }} - \ No newline at end of file + \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index c9b4934..e477a29 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,8 +1,12 @@ -
\ No newline at end of file diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html index ee7a171..f30e72c 100644 --- a/layouts/partials/pagination.html +++ b/layouts/partials/pagination.html @@ -64,7 +64,7 @@ {{- range $k := seq $start $end }} {{- if eq $.Paginator.PageNumber $k }}
  • - [{{ $k }}] + {{ $k }}
  • {{- else }}
  • diff --git a/layouts/partials/single/footer.html b/layouts/partials/single/footer.html new file mode 100644 index 0000000..5c53001 --- /dev/null +++ b/layouts/partials/single/footer.html @@ -0,0 +1,12 @@ +
    +
    + + {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} + + + {{ if .Params.Location }} + @ {{.Params.Location}} + {{ end }} +
    +
    +{{ if .Params.comments }} {{ partial "comments.html" . }} {{ end }} diff --git a/layouts/partials/single/header.html b/layouts/partials/single/header.html new file mode 100644 index 0000000..7b40390 --- /dev/null +++ b/layouts/partials/single/header.html @@ -0,0 +1,15 @@ +

    {{ .LinkTitle }}

    +{{ if .Date }} +
    + + + + + + {{- .Date | time.Format (or .Site.Params.dateFormat.published "02 Jan 2006") -}} + +
    +{{ end }} +{{ if .Params.Image }} + +{{ end }} \ No newline at end of file diff --git a/layouts/partials/walk.html b/layouts/partials/walk.html new file mode 100644 index 0000000..e115d6f --- /dev/null +++ b/layouts/partials/walk.html @@ -0,0 +1,29 @@ +{{- $page := .page }} +{{- range .menuEntries }} + {{- $attrs := dict "href" .URL }} + {{- if $page.IsMenuCurrent .Menu . }} + {{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }} + {{- else if $page.HasMenuCurrent .Menu .}} + {{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }} + {{- end }} + {{- $name := .Name }} + {{- with .Identifier }} + {{- with T . }} + {{- $name = . }} + {{- end }} + {{- end }} +
  • +{{- end }} \ No newline at end of file diff --git a/layouts/pico8/list.html b/layouts/pico8/list.html deleted file mode 100644 index 7158b4a..0000000 --- a/layouts/pico8/list.html +++ /dev/null @@ -1,50 +0,0 @@ -{{ define "main" }} -
    - -
    - {{ if .Title }} -
    -
    -
    - {{ .Title }} -
    -
    - {{ .Content }} -
    - {{ end }} - {{ $paginator := .Paginate .Pages 7 }} - {{ range $paginator.Pages }} -
    -
    -
    - {{ .LinkTitle }} - {{ if .Date }} - - {{- .Date | time.Format (or .Site.Params.dateFormat.published "02 Jan 2006") -}} - - {{ end }} -
    -
    - {{ if .Description }} - {{ .Description }} - {{ else }} - {{ .Summary }} - {{ end }} - - - - -
    - {{ end }} - -
    -
    - -{{ end }} diff --git a/layouts/pico8/single.html b/layouts/pico8/single.html index 8d63215..a35f9c0 100644 --- a/layouts/pico8/single.html +++ b/layouts/pico8/single.html @@ -1,26 +1,7 @@ {{ define "main" }} -
    - -
    -
    -
    -
    - {{ .Title }} -
    -
    +
    +
    + {{ partial "single/header.html" . }}