🎉 Initial commit

This commit is contained in:
Jimmy Cai
2020-08-22 13:20:08 +02:00
commit c698d944e6
69 changed files with 3781 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
<section class="widget archive">
<div class="widget-icon">
{{ (resources.Get "icons/infinity.svg").Content | safeHTML }}
</div>
<h1 class="widget-title">Archive</h1>
{{ $v1 := where .Site.RegularPages "Section" "post" }}
{{ $v2 := where .Site.RegularPages "Params.hidden" "!=" true }}
{{ $filtered := $v1 | intersect $v2 }}
{{ range $filtered.GroupByDate "2006" }}
{{ $id := lower (replace .Key " " "-") }}
<div class="archive-year">
<a href="{{ $.Site.BaseURL }}/archive#{{ $id }}">
<span class="year">{{ .Key }}</span>
<span class="count">{{ len .Pages }}</span>
</a>
</div>
{{ end }}
</section>
+17
View File
@@ -0,0 +1,17 @@
{{ $tags := .Site.Taxonomies.tags.ByCount }}
{{ $v2 := where $tags "Term" "not in" (slice "hugo" "tag" "rss") }}
<section class="widget tagCloud">
<div class="widget-icon">
{{ (resources.Get "icons/tag.svg").Content | safeHTML }}
</div>
<h1 class="widget-title">Tags</h1>
<div class="tagCloud-tags">
{{ range first .Site.Params.widgets.tagCloud.limit $v2 }}
<a href="{{ $.Site.BaseURL }}tags/{{ .Term | urlize }}/" class="font_size_{{ .Count }}">
{{ .Term | humanize }}
</a>
{{ end }}
</div>
</section>