From 79b038fea309fa79ef2335731549276133d69291 Mon Sep 17 00:00:00 2001 From: rra Date: Fri, 9 Sep 2022 13:23:33 +0200 Subject: [PATCH] add support for videos in posts from social --- .../layouts/partials/shout_card.html | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/themes/lumbung-theme/layouts/partials/shout_card.html b/themes/lumbung-theme/layouts/partials/shout_card.html index 653412b..625164e 100644 --- a/themes/lumbung-theme/layouts/partials/shout_card.html +++ b/themes/lumbung-theme/layouts/partials/shout_card.html @@ -10,6 +10,13 @@ + {{ with (index (.Resources.ByType "video") 0) }} + {{/* TODO this current logic does not suport video & image mixed */}} +
+ + {{ else}} {{ with (index (.Resources.ByType "image") 0) }} {{ $height := add .Height 0.0}} {{ $ratio := div $height .Width}} @@ -18,9 +25,10 @@ - {{ else }} + {{ else }}
- {{ end }} + {{ end }} + {{ end }}
{{ .Summary }}
@@ -32,10 +40,10 @@ {{ if .Params.authors }}From {{range .Params.authors}} {{ . }} {{end}} on{{ end }}
- {{ if .Truncated }} + {{ if .Truncated }} {{ end }} - +