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 --- .../layouts/_default/_markup/render-heading.html | 6 -- .../layouts/_default/_markup/render-image.html | 41 ----------- .../layouts/_default/_markup/render-link.html | 3 - .../layouts/_default/archives.html | 35 --------- .../hugo-theme-stack/layouts/_default/baseof.html | 28 ------- themes/hugo-theme-stack/layouts/_default/list.html | 85 ---------------------- themes/hugo-theme-stack/layouts/_default/rss.xml | 48 ------------ .../hugo-theme-stack/layouts/_default/single.html | 46 ------------ 8 files changed, 292 deletions(-) delete mode 100644 themes/hugo-theme-stack/layouts/_default/_markup/render-heading.html delete mode 100644 themes/hugo-theme-stack/layouts/_default/_markup/render-image.html delete mode 100644 themes/hugo-theme-stack/layouts/_default/_markup/render-link.html delete mode 100644 themes/hugo-theme-stack/layouts/_default/archives.html delete mode 100644 themes/hugo-theme-stack/layouts/_default/baseof.html delete mode 100644 themes/hugo-theme-stack/layouts/_default/list.html delete mode 100644 themes/hugo-theme-stack/layouts/_default/rss.xml delete mode 100644 themes/hugo-theme-stack/layouts/_default/single.html (limited to 'themes/hugo-theme-stack/layouts/_default') diff --git a/themes/hugo-theme-stack/layouts/_default/_markup/render-heading.html b/themes/hugo-theme-stack/layouts/_default/_markup/render-heading.html deleted file mode 100644 index f79308a..0000000 --- a/themes/hugo-theme-stack/layouts/_default/_markup/render-heading.html +++ /dev/null @@ -1,6 +0,0 @@ - - {{- if site.Params.Article.HeadingAnchor -}} - - {{- end -}} - {{ .Text | safeHTML }} - \ No newline at end of file diff --git a/themes/hugo-theme-stack/layouts/_default/_markup/render-image.html b/themes/hugo-theme-stack/layouts/_default/_markup/render-image.html deleted file mode 100644 index 0ed5584..0000000 --- a/themes/hugo-theme-stack/layouts/_default/_markup/render-image.html +++ /dev/null @@ -1,41 +0,0 @@ -{{- $image := .Page.Resources.GetMatch (printf "%s" (.Destination | safeURL)) -}} -{{- $Permalink := .Destination | relURL | safeURL -}} -{{- $alt := .PlainText | safeHTML -}} -{{- $Width := 0 -}} -{{- $Height := 0 -}} -{{- $Srcset := "" -}} - -{{/* SVG and external images won't work with gallery layout, because their width and height attributes are unknown */}} -{{- $galleryImage := false -}} - -{{- if $image -}} - {{- $notSVG := ne (path.Ext .Destination) ".svg" -}} - {{- $Permalink = $image.RelPermalink -}} - - {{- if $notSVG -}} - {{- $Width = $image.Width -}} - {{- $Height = $image.Height -}} - {{- $galleryImage = true -}} - - {{- if (default true .Page.Site.Params.imageProcessing.content.enabled) -}} - {{- $small := $image.Resize `480x` -}} - {{- $big := $image.Resize `1024x` -}} - {{- $Srcset = printf `%s 480w, %s 1024w` $small.RelPermalink $big.RelPermalink -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{ . }} \ No newline at end of file diff --git a/themes/hugo-theme-stack/layouts/_default/_markup/render-link.html b/themes/hugo-theme-stack/layouts/_default/_markup/render-link.html deleted file mode 100644 index 843854d..0000000 --- a/themes/hugo-theme-stack/layouts/_default/_markup/render-link.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ .Text | safeHTML }} \ No newline at end of file diff --git a/themes/hugo-theme-stack/layouts/_default/archives.html b/themes/hugo-theme-stack/layouts/_default/archives.html deleted file mode 100644 index 5d5243c..0000000 --- a/themes/hugo-theme-stack/layouts/_default/archives.html +++ /dev/null @@ -1,35 +0,0 @@ -{{ define "body-class" }}template-archives{{ end }} -{{ define "main" }} -
- {{- $taxonomy := $.Site.GetPage "taxonomyTerm" "categories" -}} - {{- $terms := $taxonomy.Pages -}} - {{ if $terms }} -

{{ $taxonomy.Title }}

-
-
- {{ range $terms }} - {{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "taxonomy") }} - {{ end }} -
-
- {{ end }} -
- - {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} - {{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }} - {{ $filtered := ($pages | intersect $notHidden) }} - - {{ range $filtered.GroupByDate "2006" }} - {{ $id := lower (replace .Key " " "-") }} -
-

{{ .Key }}

-
- {{ range .Pages }} - {{ partial "article-list/compact" . }} - {{ end }} -
-
- {{ end }} - - {{ partialCached "footer/footer" . }} -{{ end }} diff --git a/themes/hugo-theme-stack/layouts/_default/baseof.html b/themes/hugo-theme-stack/layouts/_default/baseof.html deleted file mode 100644 index 83fdaa3..0000000 --- a/themes/hugo-theme-stack/layouts/_default/baseof.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - {{- partial "head/head.html" . -}} - {{- block "head" . -}}{{ end }} - - - {{- partial "head/colorScheme" . -}} - - {{/* The container is wider when there's any activated widget */}} - {{- $hasWidget := false -}} - {{- range .Site.Params.widgets -}} - {{- if gt (len .) 0 -}} - {{- $hasWidget = true -}} - {{- end -}} - {{- end -}} -
- {{- block "left-sidebar" . -}} - {{ partial "sidebar/left.html" . }} - {{- end -}} - {{- block "right-sidebar" . -}}{{ end }} -
- {{- block "main" . }}{{- end }} -
-
- {{ partial "footer/include.html" . }} - - diff --git a/themes/hugo-theme-stack/layouts/_default/list.html b/themes/hugo-theme-stack/layouts/_default/list.html deleted file mode 100644 index 9bc618d..0000000 --- a/themes/hugo-theme-stack/layouts/_default/list.html +++ /dev/null @@ -1,85 +0,0 @@ -{{ define "main" }} -
-

- {{ if eq .Parent (.GetPage "/") }} - {{ T "list.section" }} - {{ else }} - {{ .Parent.Title }} - {{ end }} -

- -
-
-

{{ T "list.page" (len .Pages) }}

-

{{ .Title }}

- {{ with .Params.description }} -

{{ . }}

- {{ end }} -
- - {{- $image := partialCached "helper/image" (dict "Context" . "Type" "section") .RelPermalink "section" -}} - {{ if $image.exists }} -
- {{ if $image.resource }} - {{- $Permalink := $image.resource.RelPermalink -}} - {{- $Width := $image.resource.Width -}} - {{- $Height := $image.resource.Height -}} - - {{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}} - {{- $thumbnail := $image.resource.Fill "120x120" -}} - {{- $Permalink = $thumbnail.RelPermalink -}} - {{- $Width = $thumbnail.Width -}} - {{- $Height = $thumbnail.Height -}} - {{- end -}} - - - {{ else }} - - {{ end }} -
- {{ end }} -
-
- - {{- $subsections := .Sections -}} - {{- $pages := .Pages | complement $subsections -}} - - {{- if eq (len $pages) 0 -}} - {{/* If there are no normal pages, display subsections in list style, with pagination */}} - {{/* This happens with taxonomies like categories or tags */}} - {{- $pages = $subsections -}} - {{- $subsections = slice -}} - {{- end -}} - - {{- with $subsections -}} - - {{- end -}} - - {{/* List only pages that are not a subsection */}} - {{ $paginator := .Paginate $pages }} -
- {{ range $paginator.Pages }} - {{ partial "article-list/compact" . }} - {{ end }} -
- - {{- partial "pagination.html" . -}} - - {{ partialCached "footer/footer" . }} -{{ end }} - -{{ define "right-sidebar" }} - {{ partial "sidebar/right.html" (dict "Context" . "Scope" "homepage") }} -{{ end }} \ No newline at end of file diff --git a/themes/hugo-theme-stack/layouts/_default/rss.xml b/themes/hugo-theme-stack/layouts/_default/rss.xml deleted file mode 100644 index 3d2e592..0000000 --- a/themes/hugo-theme-stack/layouts/_default/rss.xml +++ /dev/null @@ -1,48 +0,0 @@ -{{- $pctx := . -}} -{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} -{{- $pages := slice -}} -{{- if or $.IsHome $.IsSection -}} -{{- $pages = $pctx.RegularPages -}} -{{- else -}} -{{- $pages = $pctx.Pages -}} -{{- end -}} -{{- $pages := where $pages "Params.hidden" "!=" true -}} -{{- $limit := .Site.Config.Services.RSS.Limit -}} -{{- if ge $limit 1 -}} -{{- $pages = $pages | first $limit -}} -{{- end -}} -{{- printf "" | safeHTML }} - - - {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} - {{ .Permalink }} - Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} - Hugo -- gohugo.io{{ with .Site.LanguageCode }} - {{.}}{{end}}{{ with .Site.Params.Author.email }} - {{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Params.Author.email }} - {{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} - {{.}}{{end}}{{ if not .Date.IsZero }} - {{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} - {{- with .OutputFormats.Get "RSS" -}} - {{ printf "" .Permalink .MediaType | safeHTML }} - {{- end -}} - {{ range $pages }} - {{- $content := safeHTML (.Summary | html) -}} - {{- if .Site.Params.rssFullContent -}} - {{- $content = safeHTML (.Content | html) -}} - {{- end -}} - - {{ .Title }} - {{ .Permalink }} - {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{ with .Site.Params.Author.email }}{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}} - {{ .Permalink }} - - {{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}} - {{- if $image.exists -}} - {{ "<" | html }}img src="{{ $image.permalink | absURL }}" alt="Featured image of post {{ .Title }}" {{ "/>" | html}} - {{- end -}}{{ $content }} - - {{ end }} - - 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