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 ---------------------- 1 file changed, 35 deletions(-) delete mode 100644 themes/hugo-theme-stack/layouts/partials/widget/archives.html (limited to 'themes/hugo-theme-stack/layouts/partials/widget/archives.html') 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 -- cgit v1.2.3