aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/video-container.html
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-09-05 15:51:18 -0400
committertdro <tdro@noreply.example.com>2022-09-05 15:51:18 -0400
commit2d3bfb0ddc97bb6c147965bb1bb8a515c96f1192 (patch)
treef2e5a6a75b57dcd18067131458f9eca8771bf862 /themes/default/layouts/partials/video-container.html
parent04faae81db518593ad1b05559079f45c4c9c5ab0 (diff)
downloadcanory-2d3bfb0ddc97bb6c147965bb1bb8a515c96f1192.tar.gz
canory-2d3bfb0ddc97bb6c147965bb1bb8a515c96f1192.tar.bz2
canory-2d3bfb0ddc97bb6c147965bb1bb8a515c96f1192.zip
themes/default/layouts/shortcodes/video: Set orientation
Diffstat (limited to 'themes/default/layouts/partials/video-container.html')
-rw-r--r--themes/default/layouts/partials/video-container.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/themes/default/layouts/partials/video-container.html b/themes/default/layouts/partials/video-container.html
index d114332..cf5c20e 100644
--- a/themes/default/layouts/partials/video-container.html
+++ b/themes/default/layouts/partials/video-container.html
@@ -5,8 +5,9 @@
{{- $immutable := print (.RelURL | humanize | urlize) "-" (.Source | sha256 | truncate 8 "") -}}
{{- $extension := path.Ext .Source -}}
{{- $fileCache := print $.Author "/media/" $immutable $extension -}}
+{{- $notCached := not (fileExists (path.Join "public/" $fileCache)) -}}
-{{- if not (fileExists (path.Join "public/" $fileCache)) -}}
+{{- if $notCached -}}
{{- with $remote := resources.GetRemote .Source -}}
{{- with .Err -}}
{{- if fileExists $public -}}
@@ -30,6 +31,7 @@
<video
title="{{ .Title }}"
preload="{{ .Preload }}"
+ data-orientation="{{ .Orientation }}"
{{ with .Poster }} poster="{{ . }}" {{ end -}}
{{ with .Width }} width="{{ . }}" {{ end -}}
{{ with .Height }} height="{{ . }}" {{ end -}}