hugo-theme-stack/layouts/_default/term.html
Victor Lourme 3423a92749 i18n: added missing translations
* Note for term.html: I had to remove the "humanize" and "singularize" operators because this seems to work only for English. Exemple with French: Catégories was transforming to Catégory (accent was kept but "y" was added). So categories we're splited in 2 translations : one for singular, one for plurial.
2020-11-18 17:38:23 +01:00

37 lines
1.5 KiB
HTML

{{ define "main" }}
<h3 class="taxonomy-type section-title">{{ T "category" }}</h3>
<div class="taxonomy-card">
<div class="taxonomy-details">
<h3 class="taxonomy-count">{{ len .Pages }} {{ T "searchResultPost" }}{{ 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 }}