44 lines
1.8 KiB
HTML
44 lines
1.8 KiB
HTML
{{ define "body-class" }}article-page keep-sidebar{{ end }}
|
|
{{ define "main" }}
|
|
{{ partial "article/article.html" . }}
|
|
|
|
<div class="article-list--compact links">
|
|
{{ $siteResources := resources }}
|
|
{{ range $i, $link := $.Site.Data.links }}
|
|
<article>
|
|
<a href="{{ $link.website }}" target="_blank" rel="noopener">
|
|
<div class="article-details">
|
|
<h2 class="article-title">
|
|
{{- $link.title -}}
|
|
</h2>
|
|
<footer class="article-time">
|
|
{{ with $link.description }}
|
|
{{ . }}
|
|
{{ else }}
|
|
{{ $link.website }}
|
|
{{ end }}
|
|
</footer>
|
|
</div>
|
|
|
|
{{ if $link.image }}
|
|
{{ $image := $siteResources.Get (delimit (slice "link-img/" $link.image) "") | resources.Fingerprint "md5" }}
|
|
{{ $imageResized := $image.Resize "120x120" }}
|
|
<div class="article-image">
|
|
<img src="{{ $imageResized.RelPermalink }}" width="{{ $imageResized.Width }}" height="{{ $imageResized.Height }}"
|
|
loading="lazy" data-key="links-{{ $link.website }}" data-hash="{{ $image.Data.Integrity }}">
|
|
</div>
|
|
{{ end }}
|
|
</a>
|
|
</article>
|
|
{{ end }}
|
|
</div>
|
|
|
|
{{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}}
|
|
{{ partial "comments/include" . }}
|
|
{{ end }}
|
|
|
|
{{ partialCached "footer/footer" . }}
|
|
|
|
{{ partialCached "article/components/photoswipe" . }}
|
|
{{ end }}
|