citra-web/site/themes/citra-bs-theme/layouts/shortcodes/figure.html
James Rowe 0dcfc5ba95 Feature Report: GLVTX (#77)
* Initial work on glvtx post

* Rough draft v2

* Add sidebyside layout. Add mp4 video support. Address review comments

* Update the graphic for GPU usage. Add a better break for the summary

* Add banner. Various small fixes. Removed GS section. Still no graphs >.<

* Address speeeeeling mistakes. Add missing graphs

* Update forum id
2018-03-10 12:03:45 -05:00

21 lines
964 B
HTML

{{ $type := index .Params "type" }}
<figure {{ if eq (.Get "size") "large" }}style="padding: 20px 0px;"{{ end }}>
{{ if eq $type "youtube" }}
{{/* copy pasted from hugo source code */}}
<div {{ if .Get "class" }}class="{{ .Get "class" }}"{{ else }}style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden;"{{ end }}>
<iframe src="//www.youtube.com/embed/{{ .Get "id" }}?{{ with .Get "autoplay" }}{{ if eq . "true" }}autoplay=1{{ end }}{{ end }}"
{{ if not (.Get "class") }}style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" {{ end }}allowfullscreen frameborder="0" title="YouTube Video"></iframe>
</div>
{{ else }}
<img src="{{.Get "src"}}" {{ with .Get "alt" }}alt="{{ . }}"{{ end }} />
{{ end }}
{{ with .Get "title" }}
<figcaption>
<h4>
{{ . }}
</h4>
</figcaption>
{{ end }}
</figure>