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/partials/widget/archives.html | 35 ---------------------- .../layouts/partials/widget/categories.html | 16 ---------- .../layouts/partials/widget/search.html | 16 ---------- .../layouts/partials/widget/tag-cloud.html | 16 ---------- .../layouts/partials/widget/toc.html | 12 -------- 5 files changed, 95 deletions(-) delete mode 100644 themes/hugo-theme-stack/layouts/partials/widget/archives.html delete mode 100644 themes/hugo-theme-stack/layouts/partials/widget/categories.html delete mode 100644 themes/hugo-theme-stack/layouts/partials/widget/search.html delete mode 100644 themes/hugo-theme-stack/layouts/partials/widget/tag-cloud.html delete mode 100644 themes/hugo-theme-stack/layouts/partials/widget/toc.html (limited to 'themes/hugo-theme-stack/layouts/partials/widget') diff --git a/themes/hugo-theme-stack/layouts/partials/widget/archives.html b/themes/hugo-theme-stack/layouts/partials/widget/archives.html deleted file mode 100644 index 1f2abc5..0000000 --- a/themes/hugo-theme-stack/layouts/partials/widget/archives.html +++ /dev/null @@ -1,35 +0,0 @@ -{{- $query := first 1 (where .Context.Site.Pages "Layout" "==" "archives") -}} -{{- $context := .Context -}} -{{- $limit := default 5 .Params.limit -}} -{{- if $query -}} - {{- $archivesPage := index $query 0 -}} -
-
- {{ partial "helper/icon" "infinity" }} -
-

{{ T "widget.archives.title" }}

- - {{ $pages := where $context.Site.RegularPages "Type" "in" $context.Site.Params.mainSections }} - {{ $notHidden := where $context.Site.RegularPages "Params.hidden" "!=" true }} - {{ $filtered := ($pages | intersect $notHidden) }} - {{ $archives := $filtered.GroupByDate "2006" }} - -
- {{ range $index, $item := first (add $limit 1) ($archives) }} - {{- $id := lower (replace $item.Key " " "-") -}} - - {{ end }} -
-
-{{- else -}} - {{- warnf "Archives page not found. Create a page with layout: archives." -}} -{{- end -}} \ No newline at end of file diff --git a/themes/hugo-theme-stack/layouts/partials/widget/categories.html b/themes/hugo-theme-stack/layouts/partials/widget/categories.html deleted file mode 100644 index 10c8a35..0000000 --- a/themes/hugo-theme-stack/layouts/partials/widget/categories.html +++ /dev/null @@ -1,16 +0,0 @@ -{{- $context := .Context -}} -{{- $limit := default 10 .Params.limit -}} -
-
- {{ partial "helper/icon" "categories" }} -
-

{{ T "widget.categoriesCloud.title" }}

- -
- {{ range first $limit $context.Site.Taxonomies.categories.ByCount }} - - {{ .Page.Title }} - - {{ end }} -
-
diff --git a/themes/hugo-theme-stack/layouts/partials/widget/search.html b/themes/hugo-theme-stack/layouts/partials/widget/search.html deleted file mode 100644 index 7b0fc73..0000000 --- a/themes/hugo-theme-stack/layouts/partials/widget/search.html +++ /dev/null @@ -1,16 +0,0 @@ -{{- $query := first 1 (where .Context.Site.Pages "Layout" "==" "search") -}} -{{- if $query -}} - {{- $searchPage := index $query 0 -}} -
-

- - - - -

-
-{{- else -}} - {{- warnf "Search page not found. Create a page with layout: search." -}} -{{- end -}} \ No newline at end of file diff --git a/themes/hugo-theme-stack/layouts/partials/widget/tag-cloud.html b/themes/hugo-theme-stack/layouts/partials/widget/tag-cloud.html deleted file mode 100644 index e64e5e2..0000000 --- a/themes/hugo-theme-stack/layouts/partials/widget/tag-cloud.html +++ /dev/null @@ -1,16 +0,0 @@ -{{- $context := .Context -}} -{{- $limit := default 10 .Params.limit -}} -
-
- {{ partial "helper/icon" "tag" }} -
-

{{ T "widget.tagCloud.title" }}

- -
- {{ range first $limit $context.Site.Taxonomies.tags.ByCount }} - - {{ .Page.Title }} - - {{ end }} -
-
\ No newline at end of file diff --git a/themes/hugo-theme-stack/layouts/partials/widget/toc.html b/themes/hugo-theme-stack/layouts/partials/widget/toc.html deleted file mode 100644 index e311de3..0000000 --- a/themes/hugo-theme-stack/layouts/partials/widget/toc.html +++ /dev/null @@ -1,12 +0,0 @@ -{{ if (.Context.Scratch.Get "TOCEnabled") }} -
-
- {{ partial "helper/icon" "hash" }} -
-

{{ T "article.tableOfContents" }}

- -
- {{ .Context.TableOfContents }} -
-
-{{ end }} \ No newline at end of file -- cgit v1.2.3