This repository has been archived on 2023-08-03. You can view files and clone it, but cannot push or open issues or pull requests.
sito-web/layouts/novita/list.html

69 lines
2.5 KiB
HTML
Raw Normal View History

2022-12-19 22:37:47 +01:00
{{ define "title" }}
2023-05-21 16:16:12 +02:00
{{ title (i18n (lower .Title)) | default .Title }} · {{ .Site.Title }}
2022-12-19 22:37:47 +01:00
{{ end }}
{{ define "content" }}
2023-05-21 16:16:12 +02:00
<section class="container list">
2022-12-19 22:37:47 +01:00
<h1 class="title">
2023-05-21 16:16:12 +02:00
<a class="title-link" href="{{ .Permalink | safeURL }}">
{{- if eq .Kind "term" -}}
{{- i18n .Data.Plural 1 | title -}}
{{- print ": " -}}
{{- end -}}
{{- i18n (lower .Title) | default .Title | title -}}
</a>
2022-12-19 22:37:47 +01:00
</h1>
{{ .Content }}
<ul class="news-list">
2023-05-21 16:16:12 +02:00
{{ range .Paginator.Pages }}
2022-12-19 22:37:47 +01:00
{{ if .Params.images }}
2023-05-21 16:16:12 +02:00
{{ $image := .Resources.GetMatch (index (.Params.images) 0) }}
{{ if $image }}
<li>
{{ $image := $image.Resize "x350" }}
{{ $image := $image.Crop "480x350" }}
<div class="news-image">
<a href="{{ .Params.externalLink | default .RelPermalink }}">
2022-12-19 22:37:47 +01:00
<img src="{{ $image.RelPermalink }}">
2023-05-21 16:16:12 +02:00
</a>
</div>
2022-12-19 22:37:47 +01:00
2023-05-21 16:16:12 +02:00
<div class="date">
<span class="posted-on">
2022-12-19 22:37:47 +01:00
<i class="fa fa-calendar" aria-hidden="true"></i>
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
2023-05-21 16:16:12 +02:00
{{ .Date | time.Format (.Site.Params.dateFormat | default "2 January 2006" ) }}
2022-12-19 22:37:47 +01:00
</time>
2023-05-21 16:16:12 +02:00
</span>
<span class="reading-time">
2022-12-19 22:37:47 +01:00
<i class="fa fa-clock-o" aria-hidden="true"></i>
{{ i18n "reading_time" .ReadingTime }}
2023-05-21 16:16:12 +02:00
</span>
</div>
<hr class="light">
2022-12-19 22:37:47 +01:00
2023-05-21 16:16:12 +02:00
<a class="title" href="{{ .Params.externalLink | default .RelPermalink }}">{{ .Title }}</a><br>
<span class="description">{{ .Params.description }}.</span>
<br><br>
2022-12-19 22:37:47 +01:00
2023-05-21 16:16:12 +02:00
{{ if .Params.tags }}
<div class="tags">
<i class="fa fa-tag" aria-hidden="true"></i>
{{- range $index, $el := .Params.tags -}}
{{- if gt $index 0 }}
<span class="separator"></span>
{{- end }}
<span class="tag">
<a href="{{ ( printf "tags/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a>
</span>
{{- end -}}
</div>
{{ end }}
<div style="clear:both;"></div>
</li>
{{ end }}
{{ end }}
2022-12-19 22:37:47 +01:00
{{ end }}
</ul>
{{ partial "pagination.html" . }}
2023-05-21 16:16:12 +02:00
</section>
{{ end }}