2022-02-16 14:48:12 +00:00
|
|
|
<div class='shout card {{ .Params.feed_name }}'>
|
2021-12-15 10:09:08 +00:00
|
|
|
<article class="h-entry shout">
|
|
|
|
<header>
|
|
|
|
{{ $postPermalink := .Permalink}}
|
2022-01-13 10:43:19 +00:00
|
|
|
<h2 class="p-name"><a href="{{ .Permalink }}" class="u-url">
|
|
|
|
{{ range $i, $e := .Params.tags -}}
|
2022-01-13 11:36:38 +00:00
|
|
|
{{- if $i -}} {{ end -}}
|
2022-01-17 11:43:02 +00:00
|
|
|
<a href='{{ "/tags/" | relLangURL }}{{ . | urlize }}'>#{{ $e | humanize | lower }}</a>
|
2022-01-13 10:43:19 +00:00
|
|
|
{{- end -}}
|
|
|
|
</a></h2>
|
2021-12-15 10:09:08 +00:00
|
|
|
</header>
|
|
|
|
|
2022-09-09 11:23:33 +00:00
|
|
|
{{ with (index (.Resources.ByType "video") 0) }}
|
|
|
|
{{/* TODO this current logic does not suport video & image mixed */}}
|
|
|
|
<div class="p-summary">
|
|
|
|
<video controls width="540px" preload="none" poster="{{ $postPermalink }}/thumbnail.png">
|
|
|
|
<source src="{{.Permalink}}" type="video/mp4">
|
|
|
|
</video>
|
|
|
|
{{ else}}
|
2021-12-15 10:09:08 +00:00
|
|
|
{{ with (index (.Resources.ByType "image") 0) }}
|
|
|
|
{{ $height := add .Height 0.0}}
|
|
|
|
{{ $ratio := div $height .Width}}
|
2022-03-03 06:19:19 +00:00
|
|
|
{{ $thumb := .Fit "540x540 q80 webp"}}
|
2021-12-15 10:09:08 +00:00
|
|
|
<div class="p-summary{{if gt $ratio 1 }} portrait {{else}} landscape {{end}}">
|
|
|
|
<div class="summary-image {{if gt $ratio 1 }} portrait {{else}} landscape {{end}}">
|
|
|
|
<a href="{{ $postPermalink }}"><img src="{{ $thumb.Permalink }}" alt="{{ .Title }}"> </a>
|
|
|
|
</div>
|
2022-09-09 11:23:33 +00:00
|
|
|
{{ else }}
|
2021-12-15 10:09:08 +00:00
|
|
|
<div class="p-summary">
|
2022-09-09 11:23:33 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2021-12-15 10:09:08 +00:00
|
|
|
<div class="summary-text">
|
|
|
|
{{ .Summary }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="shout-source"></div>
|
|
|
|
|
|
|
|
<footer class='post-footer'>
|
|
|
|
<div class='footer-metadata'>
|
2022-05-31 16:59:25 +00:00
|
|
|
<span class="from p-author">{{ if .Params.authors }}From {{range .Params.authors}}<b> <a href='{{ "/authors/" | relLangURL }}{{ . | urlize }}/'> {{ . }}</a> {{end}}</b> on{{ end }}</span>
|
2021-12-15 10:09:08 +00:00
|
|
|
<time class="dt-published" datetime="{{ .Date.Format `Jan 02 2006` }}">{{ .Date.Format "Jan 02, 2006" }}</time>
|
|
|
|
</div>
|
2022-09-09 11:23:33 +00:00
|
|
|
{{ if .Truncated }}
|
2021-12-15 10:09:08 +00:00
|
|
|
<div class="footer-filler"></div>
|
|
|
|
<div class='read-more'><a href="{{ .RelPermalink }}">Read More…</a></div>
|
|
|
|
{{ end }}
|
2022-09-09 11:23:33 +00:00
|
|
|
</footer>
|
2021-12-15 10:09:08 +00:00
|
|
|
</article>
|
2022-01-17 11:43:02 +00:00
|
|
|
</div>
|