From 239d68f94c6250276850fbe95eaa6cdd5c38fb26 Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Sat, 16 Nov 2024 19:32:18 +0300 Subject: Своя тема, полностью всё переделал MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hugo-theme-stack/layouts/_default/single.html | 46 ---------------------- 1 file changed, 46 deletions(-) delete mode 100644 themes/hugo-theme-stack/layouts/_default/single.html (limited to 'themes/hugo-theme-stack/layouts/_default/single.html') diff --git a/themes/hugo-theme-stack/layouts/_default/single.html b/themes/hugo-theme-stack/layouts/_default/single.html deleted file mode 100644 index 5f300bf..0000000 --- a/themes/hugo-theme-stack/layouts/_default/single.html +++ /dev/null @@ -1,46 +0,0 @@ -{{ define "body-class" }} - article-page - {{/* - Enable the right sidebar if - - Widget different from 'TOC' is enabled - - TOC is enabled and not empty - */}} - {{- $HasWidgetNotTOC := false -}} - {{- $TOCWidgetEnabled := false -}} - {{- range .Site.Params.widgets.page -}} - {{- if ne .type "toc" -}} - {{ $HasWidgetNotTOC = true -}} - {{- else -}} - {{ $TOCWidgetEnabled = true -}} - {{- end -}} - {{- end -}} - - {{- $TOCManuallyDisabled := eq .Params.toc false -}} - {{- $TOCEnabled := and (not $TOCManuallyDisabled) $TOCWidgetEnabled -}} - {{- $hasTOC := ge (len .TableOfContents) 100 -}} - {{- .Scratch.Set "TOCEnabled" (and $TOCEnabled $hasTOC) -}} - - {{- .Scratch.Set "hasWidget" (or $HasWidgetNotTOC (and $TOCEnabled $hasTOC)) -}} -{{ end }} - -{{ define "main" }} - {{ partial "article/article.html" . }} - - {{ if .Params.links }} - {{ partial "article/components/links" . }} - {{ end }} - - {{ partial "article/components/related-content" . }} - - {{ if not (eq .Params.comments false) }} - {{ partial "comments/include" . }} - {{ end }} - - {{ partialCached "footer/footer" . }} - - {{ partialCached "article/components/photoswipe" . }} -{{ end }} - -{{ define "right-sidebar" }} - {{ if .Scratch.Get "hasWidget" }}{{ partial "sidebar/right.html" (dict "Context" . "Scope" "page") }}{{ end}} -{{ end }} -- cgit v1.2.3