Conditionals

This commit is contained in:
Gabriel 2022-09-18 16:27:59 -04:00
parent f6bb19177e
commit f0bb4e6cdc

View file

@ -2,8 +2,8 @@
<a href='{{.Get "href"}}'>
{{end}}
<video autoplay muted loop preload="true">
<source src='{{.Site.BaseURL}}{{.Get "src" }}'>
<source src='{{.Site.BaseURL}}{{.Get 0 }}'>
{{if .Get 0}}<source src='{{.Site.BaseURL}}{{.Get 0 }}'>{{end}}
{{if .Get "src"}}<source src='{{.Site.BaseURL}}{{.Get "src" }}'>{{end}}
</video>
{{ if .Get "href"}}
</a>