From 6c889c658ed71bdc18e5b767053530618dcf1759 Mon Sep 17 00:00:00 2001 From: tdro Date: Sun, 22 Jan 2023 02:42:39 -0500 Subject: themes/default/layouts: Tighten up the markup Might be able to get free computation.. --- themes/default/layouts/shortcodes/abbr.html | 2 +- themes/default/layouts/shortcodes/animate.html | 2 +- themes/default/layouts/shortcodes/odysee.html | 3 ++- themes/default/layouts/shortcodes/spoiler.html | 2 +- themes/default/layouts/shortcodes/youtube.html | 13 +++++++++---- 5 files changed, 14 insertions(+), 8 deletions(-) (limited to 'themes/default/layouts/shortcodes') diff --git a/themes/default/layouts/shortcodes/abbr.html b/themes/default/layouts/shortcodes/abbr.html index bad8895..2a87233 100644 --- a/themes/default/layouts/shortcodes/abbr.html +++ b/themes/default/layouts/shortcodes/abbr.html @@ -2,7 +2,7 @@ {{- $title := default "Too long, didn't read" (.Get "title" | default (.Get 1)) -}} {{- $hash := print (truncate 8 "" (sha256 $abbr)) .Ordinal -}} - + {{- /* This comment removes trailing newlines and white spaces. */ -}} {{- /* This comment removes trailing newlines and white spaces. */ -}} diff --git a/themes/default/layouts/shortcodes/animate.html b/themes/default/layouts/shortcodes/animate.html index 5d72671..b245596 100644 --- a/themes/default/layouts/shortcodes/animate.html +++ b/themes/default/layouts/shortcodes/animate.html @@ -3,7 +3,7 @@ {{- $letters := split $text "" -}} - + {{- range $value, $letter := $letters -}} {{ $letter }} {{- end -}} diff --git a/themes/default/layouts/shortcodes/odysee.html b/themes/default/layouts/shortcodes/odysee.html index 0f2899e..cca7e9c 100644 --- a/themes/default/layouts/shortcodes/odysee.html +++ b/themes/default/layouts/shortcodes/odysee.html @@ -8,7 +8,8 @@ id="odysee-iframe" src="{{ $url }}" title="{{ $title }}" - allowfullscreen> + allowfullscreen="" + >
{{ $caption | markdownify }}
diff --git a/themes/default/layouts/shortcodes/spoiler.html b/themes/default/layouts/shortcodes/spoiler.html index ebc3643..5a9462d 100644 --- a/themes/default/layouts/shortcodes/spoiler.html +++ b/themes/default/layouts/shortcodes/spoiler.html @@ -6,7 +6,7 @@ {{- $text = .Inner -}} {{- end -}} - + diff --git a/themes/default/layouts/shortcodes/youtube.html b/themes/default/layouts/shortcodes/youtube.html index 99612ed..9ec1cfb 100644 --- a/themes/default/layouts/shortcodes/youtube.html +++ b/themes/default/layouts/shortcodes/youtube.html @@ -1,10 +1,12 @@ -{{- $url := "www.youtube-nocookie.com" -}} {{- $id := default "aqz-KE-bpKQ" (.Get "id" | default (.Get 0)) -}} {{- $title := default "YouTube Video" (.Get "title" | default (.Get 1)) -}} {{- $start := default "" (.Get "start" | default (.Get 2)) -}} {{- $end := default "" (.Get "end" | default (.Get 3)) -}} {{- $muted := default "" (.Get "muted" | default (.Get 4)) -}} +{{- $url := "www.youtube-nocookie.com" -}} +{{- $controls := "?controls=1" -}} + {{- if (and $start $end) -}} {{ $start = print "&start=" $start }} {{ $end = print "&end=" $end }} @@ -15,11 +17,14 @@ {{- end -}} -