odysee, only print the fields if they have a proper value set.
This commit is contained in:
1 parent
ada2c63bcc
commit
b7f8e4e3d2
1 file changed
+4
@@ -2,8 +2,11 @@
|
|||||||
}}{{ $width := .Param "video_width" | default (.Param "odyseeVideoWidthPercentage")
|
}}{{ $width := .Param "video_width" | default (.Param "odyseeVideoWidthPercentage")
|
||||||
}}{{ $url := .Param "video_page"
|
}}{{ $url := .Param "video_page"
|
||||||
}}
|
}}
|
||||||
|
{{ if $url }}
|
||||||
<p><a href="{{ $url }}" target="_blank" rel="noopener noreferrer">{{ $url | markdownify }}</a></p>
|
<p><a href="{{ $url }}" target="_blank" rel="noopener noreferrer">{{ $url | markdownify }}</a></p>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if $src }}
|
||||||
<iframe
|
<iframe
|
||||||
id="odysee-iframe"
|
id="odysee-iframe"
|
||||||
style="width:{{ $width }}%; aspect-ratio:16 / 9;"
|
style="width:{{ $width }}%; aspect-ratio:16 / 9;"
|
||||||
@@ -11,6 +14,7 @@
|
|||||||
allowfullscreen>
|
allowfullscreen>
|
||||||
</iframe>
|
</iframe>
|
||||||
<br/>
|
<br/>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ with .Params.video_desc }}
|
{{ with .Params.video_desc }}
|
||||||
{{ range . -}}
|
{{ range . -}}
|
||||||
|
|||||||
Reference in new issue
Block a user