mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-27 12:03:49 +01:00
49e568faac
For the small title before the card Remove .widget-title, .archive-date, .taxonomy-type from SCSS, as they all share the same style.
37 lines
No EOL
1.4 KiB
HTML
37 lines
No EOL
1.4 KiB
HTML
{{ define "main" }}
|
|
<h3 class="taxonomy-type section-title">{{ .Type | singularize | humanize }}</h3>
|
|
<div class="taxonomy-card">
|
|
<div class="taxonomy-details">
|
|
<h3 class="taxonomy-count">{{ len .Pages }} post{{ if gt (len .Pages) 1 }}s{{ end }}</h3>
|
|
<h1 class="taxonomy-term">{{ .Title }}</h1>
|
|
{{ with .Params.description }}
|
|
<h2 class="taxonomy-description">{{ . }}</h2>
|
|
{{ end }}
|
|
</div>
|
|
|
|
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "taxonomy") .RelPermalink "taxonomy" -}}
|
|
{{ if $image.exists }}
|
|
<div class="taxonomy-image">
|
|
{{ if $image.resource }}
|
|
{{- $thumbnail := $image.resource.Fill "120x120" -}}
|
|
<img src="{{ $thumbnail.RelPermalink }}" width="{{ $thumbnail.Width }}"
|
|
height="{{ $thumbnail.Height }}" loading="lazy">
|
|
{{ else }}
|
|
<img src="{{ $image.permalink }}" loading="lazy">
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
|
|
<section class="article-list--compact">
|
|
{{ $v2 := where .Pages "Params.hidden" "!=" true }}
|
|
{{ $pag := .Paginate (.Pages) }}
|
|
{{ range $pag.Pages }}
|
|
{{ partial "article-list/compact" . }}
|
|
{{ end }}
|
|
</section>
|
|
|
|
{{- partial "pagination.html" . -}}
|
|
|
|
{{ partialCached "footer/footer" . }}
|
|
{{ end }} |