2022-10-11 17:34:41 +08:00
|
|
|
<div class="article-list--compact links">
|
|
|
|
{{ range $i, $link := .Params.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>
|
|
|
|
|
|
|
|
{{ with $link.image }}
|
2024-07-31 17:10:56 +08:00
|
|
|
{{ $permalink := . }}
|
|
|
|
{{ with ($.Resources.GetMatch (printf "%s" (. | safeURL))) }}
|
|
|
|
{{ $permalink = .RelPermalink }}
|
|
|
|
{{ end }}
|
2022-10-11 17:34:41 +08:00
|
|
|
<div class="article-image">
|
2024-07-31 17:10:56 +08:00
|
|
|
<img src="{{ $permalink }}" loading="lazy">
|
2022-10-11 17:34:41 +08:00
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</a>
|
|
|
|
</article>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|