uci-hugo-landingpage/layouts/shortcodes/embed.html

24 lines
708 B
HTML

<!-- Used for embedding iframes from sites like youtube and google -->
{{ if .IsNamedParams }}
<div class="box box--embed box--{{ .Get "type" }}">
{{ with .Get "title" }}
<div class="box__title">{{ . }}</div>
{{ end }}
<div
{{ with .Get "type" }} class="embed--{{ . }}"{{end}}
{{ with .Get "id" }} id="{{ . }}"{{end}}
{{ with .Get "maxwidth"}} maxWidth="{{ . }}"{{ end }}
{{ with .Get "wpad"}} wPad="{{ . }}"{{ end }}
>
{{ .Inner }}
</div>
{{ with .Get "caption"}}
<div class="box__caption">{{ . }}</div>
{{ end }}
</div>
{{ else }}
<div class="box box--embed {{ with .Get 0 }}embed--{{ . }}{{ end }}">
{{ .Inner }}
</div>
{{ end }}