Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Cai <jimmehcai@gmail.com>2020-10-17 11:34:36 +0300
committerJimmy Cai <jimmehcai@gmail.com>2020-10-17 11:34:36 +0300
commit5c55bd2d3380108c649cb4f824060cfd2fd2fca1 (patch)
tree802ca096f77383d185fc98af595c082ac4195b28 /layouts
parent34cd7852bc115f926b131e99c6384609d048f28f (diff)
feat(widget): new archive widget style
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/widget/archives.html32
1 files changed, 17 insertions, 15 deletions
diff --git a/layouts/partials/widget/archives.html b/layouts/partials/widget/archives.html
index d6950a4..038b669 100644
--- a/layouts/partials/widget/archives.html
+++ b/layouts/partials/widget/archives.html
@@ -8,18 +8,20 @@
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
{{ $filtered := ($pages | intersect $notHidden) }}
{{ $archives := $filtered.GroupByDate "2006" }}
-
- {{ range $index, $item := first (add .Site.Params.widgets.archives.limit 1) ($archives) }}
- {{- $id := lower (replace $item.Key " " "-") -}}
- <div class="archives-year">
- <a href="{{ $.Site.Params.widgets.archives.path | relLangURL }}#{{ $id }}">
- {{ if eq $index $.Site.Params.widgets.archives.limit }}
- <span class="year">{{ T "widgetArchivesMore" }}</span>
- {{ else }}
- <span class="year">{{ .Key }}</span>
- <span class="count">{{ len $item.Pages }}</span>
- {{ end }}
- </a>
- </div>
- {{ end }}
-</section>
+
+ <div class="widget-archive--list">
+ {{ range $index, $item := first (add .Site.Params.widgets.archives.limit 1) ($archives) }}
+ {{- $id := lower (replace $item.Key " " "-") -}}
+ <div class="archives-year">
+ <a href="{{ $.Site.Params.widgets.archives.path | relLangURL }}#{{ $id }}">
+ {{ if eq $index $.Site.Params.widgets.archives.limit }}
+ <span class="year">{{ T "widgetArchivesMore" }}</span>
+ {{ else }}
+ <span class="year">{{ .Key }}</span>
+ <span class="count">{{ len $item.Pages }}</span>
+ {{ end }}
+ </a>
+ </div>
+ {{ end }}
+ </div>
+</section> \ No newline at end of file