From 74a333879db5de069af7c102ba8e3f3d62036174 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 21 Nov 2025 23:15:51 +0300 Subject: [PATCH] upd for hugo v0.152.2 --- layouts/_default/single.html | 91 ++++---- layouts/_internal/disqus.html | 0 layouts/_internal/google_analytics_async.html | 0 layouts/partials/footer.html | 214 ++++++++---------- layouts/partials/header.html | 177 ++++++++------- layouts/partials/nav.html | 96 ++++++++ themes/beautifulhugo | 2 +- 7 files changed, 323 insertions(+), 257 deletions(-) create mode 100644 layouts/_internal/disqus.html create mode 100644 layouts/_internal/google_analytics_async.html create mode 100644 layouts/partials/nav.html diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 9c02bc4..f8dfb86 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -8,51 +8,55 @@ {{ if .Params.tags }}
{{ range .Params.tags }} - {{ . }}  + + {{ . }}  {{ end }}
{{ end }} - {{ if $.Param "socialShare" }} -
-
- -
+ {{ if $.Param "socialShare" }} +
+
+ +
{{ end }} - {{ if .Site.Params.showRelatedPosts }} - {{ range first 1 (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }} - {{ $.Scratch.Set "has_related" true }} - {{ end }} - - {{ if $.Scratch.Get "has_related" }} -

{{ i18n "seeAlso" }}

- - - {{ end }} + {{ if .Site.Params.showRelatedPosts }} + {{ range first 1 (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }} + {{ $.Scratch.Set "has_related" true }} + {{ end }} + + {{ if $.Scratch.Get "has_related" }} +

{{ i18n "seeAlso" }}

+ + + {{ end }} {{ end }} - {{ if ne .Type "page" }} - + {{ if ne .Type "page" }} + {{ end }} @@ -60,21 +64,6 @@ {{ partial "remark42.html" . }} {{ if .Site.Config.Services.Disqus.Shortname }} {{ if .Site.Params.delayDisqus }} -
- -
- - -
- {{ else }} -
- {{ template "_internal/disqus.html" . }} -
{{ end }} {{ end }} {{ if .Site.Params.staticman }} diff --git a/layouts/_internal/disqus.html b/layouts/_internal/disqus.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/_internal/google_analytics_async.html b/layouts/_internal/google_analytics_async.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 3ef0291..747471f 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -3,16 +3,16 @@ {{ end }} -{{- if .Site.Params.selfHosted -}} - - - - -{{- else -}} - - - - -{{- end }} - - -{{- if .Site.Params.staticman }} - -{{- end }} -{{- if .Site.Params.useHLJS }} - - - -{{- end -}} - - -{{- if .Site.Params.selfHosted -}} - - -{{- else -}} - - -{{- end -}} - - - -{{ if .Site.Params.gcse }} - -{{ end }} - -{{ if .Site.Params.piwik }} - - - - +{{- if .Site.Params.selfHosted -}} + + + + +{{- else -}} + + + + +{{- end }} + + +{{- if .Site.Params.staticman }} + +{{- end }} +{{- if .Site.Params.useHLJS }} + + + +{{- end -}} + +{{- if .Site.Params.selfHosted -}} + + +{{- else -}} + + +{{- end -}} + + + +{{ if .Site.Params.gcse }} + +{{ end }} + +{{ if .Site.Params.piwik }} + + + + {{ end }} {{ if and .Site.Params.delayDisqus .Site.Config.Services.Disqus.Shortname }} - - - - {{ end }} {{- partial "footer_custom.html" . }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index edbef63..4433791 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,87 +1,90 @@ -{{- partial "load-photoswipe-theme.html" . }} - -{{ if .IsHome }} - {{ if .Site.Params.homeTitle }}{{ $.Scratch.Set "title" .Site.Params.homeTitle }}{{ else }}{{ $.Scratch.Set "title" .Site.Title }}{{ end }} - {{ if .Site.Params.subtitle }}{{ $.Scratch.Set "subtitle" .Site.Params.subtitle }}{{ end }} - {{ if .Site.Params.bigimg }}{{ $.Scratch.Set "bigimg" .Site.Params.bigimg }}{{ end }} -{{ else }} - {{ if (i18n .Title) }}{{ $.Scratch.Set "title" (i18n .Title) }}{{ else }}{{ $.Scratch.Set "title" .Title }}{{ end }} - {{ if .Params.subtitle }}{{ $.Scratch.Set "subtitle" .Params.subtitle }}{{ end }} - {{ if .Params.bigimg }}{{ $.Scratch.Set "bigimg" .Params.bigimg }}{{ end }} -{{ end }} -{{ $bigimg := $.Scratch.Get "bigimg" }} -{{ $title := $.Scratch.Get "title" }} -{{ $subtitle := $.Scratch.Get "subtitle" }} - -{{ if or $bigimg $title }} - {{ if $bigimg }} -
- {{ end }} - -
- {{ if $bigimg }} -
- {{ $subtitle := $.Scratch.Get "subtitle" }} -
-
-
-
-

{{ with $.Scratch.Get "title" }}{{.}}{{ else }}
{{ end }}

- {{ if $subtitle }} - {{ if eq .Type "page" }} -
- {{ $subtitle }} - {{ else }} -

{{ $subtitle }}

- {{ end }} - {{ end }} - {{ if eq .Type "post" }} - {{ partial "post_meta.html" . }} - {{ end }} -
-
-
-
- -
- {{end}} -
-
-
-
-
- {{ if eq .Type "list" }} -

{{ if .Data.Singular }}#{{ end }}{{ .Title }}

- {{ else }} -

{{ with $title }}{{.}}{{ else }}
{{ end }}

- {{ end }} - {{ if ne .Type "post" }} -
- {{ end }} - {{ if $subtitle }} - {{ if eq .Type "page" }} - {{ $subtitle }} - {{ else }} -

{{ $subtitle }}

- {{ end }} - {{ end }} - {{ if eq .Type "post" }} - {{ partial "post_meta.html" . }} - {{ end }} -
-
-
-
-
-
-{{ else }} -
-{{ end }} +{{- partial "load-photoswipe-theme.html" . }} + +{{ if .IsHome }} + {{ if .Site.Params.homeTitle }}{{ $.Scratch.Set "title" .Site.Params.homeTitle }}{{ else }}{{ $.Scratch.Set "title" .Site.Title }}{{ end }} + {{ if .Site.Params.subtitle }}{{ $.Scratch.Set "subtitle" .Site.Params.subtitle }}{{ end }} + {{ if .Site.Params.bigimg }}{{ $.Scratch.Set "bigimg" .Site.Params.bigimg }}{{ end }} +{{ else }} + {{ $.Scratch.Set "title" .Title }} + {{ if .Params.subtitle }}{{ $.Scratch.Set "subtitle" .Params.subtitle }}{{ end }} + {{ if .Params.bigimg }}{{ $.Scratch.Set "bigimg" .Params.bigimg }}{{ end }} +{{ end }} +{{ $bigimg := $.Scratch.Get "bigimg" }} +{{ $title := $.Scratch.Get "title" }} +{{ $subtitle := $.Scratch.Get "subtitle" }} + +{{ if or $bigimg $title }} + {{ if $bigimg }} +
+ {{ end }} + +
+ {{ if $bigimg }} + {{ $firstimg := index $bigimg 0 }} +
+ {{ $subtitle := $.Scratch.Get "subtitle" }} +
+
+
+
+

{{ with $.Scratch.Get "title" }}{{.}}{{ else }}
{{ end }}

+ {{ if $subtitle }} + {{ if eq .Type "page" }} +
+ {{ $subtitle }} + {{ else }} +

{{ $subtitle }}

+ {{ end }} + {{ end }} + {{ if eq .Type "post" }} + {{ partial "post_meta.html" . }} + {{ end }} +
+
+
+
+ {{$firstimg.desc}} +
+ {{end}} + {{ if $title }} +
+
+
+
+
+ {{ if eq .Type "list" }} +

{{ if .Data.Singular }}#{{ end }}{{ .Title }}

+ {{ else }} +

{{ with $title }}{{.}}{{ else }}
{{ end }}

+ {{ end }} + {{ if ne .Type "post" }} +
+ {{ end }} + {{ if $subtitle }} + {{ if eq .Type "page" }} + {{ $subtitle }} + {{ else }} +

{{ $subtitle }}

+ {{ end }} + {{ end }} + {{ if eq .Type "post" }} + {{ partial "post_meta.html" . }} + {{ end }} +
+
+
+
+
+ {{ end }} +
+{{ else }} +
+{{ end }} \ No newline at end of file diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html new file mode 100644 index 0000000..dc34058 --- /dev/null +++ b/layouts/partials/nav.html @@ -0,0 +1,96 @@ + + + +{{ if isset .Site.Params "gcse" }} + +{{ end }} diff --git a/themes/beautifulhugo b/themes/beautifulhugo index fd74af4..99ca240 160000 --- a/themes/beautifulhugo +++ b/themes/beautifulhugo @@ -1 +1 @@ -Subproject commit fd74af48c3bb5e51187ca350324d2291de65f283 +Subproject commit 99ca240e9977196207da2e09c3804d3e98c14e57