2023-05-03 10:27:19 +00:00
|
|
|
<div class='publishers social card' data-section="{{ .Section }}">
|
|
|
|
<article class="h-entry social">
|
|
|
|
<header>
|
|
|
|
{{ $postPermalink := .Permalink}}
|
|
|
|
<h2 class="p-name"><a href="{{ .Permalink }}" class="u-url">
|
2022-12-15 09:57:57 +00:00
|
|
|
{{ .Title }}
|
2023-05-03 10:27:19 +00:00
|
|
|
</a></h2>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
{{ with (index (.Resources.ByType "video") 0) }}
|
|
|
|
{{/* TODO this current logic does not suport video & image mixed */}}
|
2022-12-15 09:57:57 +00:00
|
|
|
<div class="p-summary">
|
2023-05-03 10:27:19 +00:00
|
|
|
<video controls width="540px" preload="none" poster="{{ $postPermalink }}/thumbnail.png">
|
|
|
|
<source src="{{.Permalink}}" type="video/mp4">
|
|
|
|
</video>
|
|
|
|
{{ else}}
|
|
|
|
{{ with (index (.Resources.ByType "image") 0) }}
|
|
|
|
{{ $height := add .Height 0.0}}
|
|
|
|
{{ $ratio := div $height .Width}}
|
|
|
|
{{ $thumb := .Fit "540x540 q80 webp"}}
|
|
|
|
<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>
|
|
|
|
{{ else }}
|
|
|
|
<div class="p-summary">
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
<div class="summary-text">
|
|
|
|
{{ .Summary }}
|
|
|
|
</div>
|
2022-12-15 09:57:57 +00:00
|
|
|
</div>
|
2023-05-03 10:27:19 +00:00
|
|
|
<div class="social-source"></div>
|
|
|
|
|
|
|
|
<footer class='post-footer'>
|
|
|
|
<div class='footer-metadata'>
|
|
|
|
<span class="from p-author">{{ if .Params.contributors }}From {{range .Params.contributors}}<b> <a href='{{ "/contributors/" | relLangURL }}{{ . | urlize }}/'> {{ . }}</a> {{end}}</b> on{{ end }}</span>
|
|
|
|
<time class="dt-published" datetime="{{ .Date.Format `Jan 02 2006` }}">{{ .Date.Format "Jan 02, 2006" }}</time>
|
|
|
|
</div>
|
|
|
|
{{ if .Truncated }}
|
|
|
|
<div class="footer-filler" style="border-color: transparent" ></div>
|
|
|
|
<div class='read-more'><a href="{{ .RelPermalink }}">Read More…</a></div>
|
|
|
|
{{ end }}
|
|
|
|
</footer>
|
2022-12-15 09:57:57 +00:00
|
|
|
</article>
|
2023-05-03 10:27:19 +00:00
|
|
|
</div>
|