mirror of
https://github.com/danbee/danbarber.me.hugo.git
synced 2025-03-04 08:59:18 +00:00
27 lines
872 B
HTML
27 lines
872 B
HTML
<div class="picture">
|
|
{{ if .Get "caption"}}
|
|
<figure>
|
|
{{ end }}
|
|
<picture>
|
|
<!-- Large screens -->
|
|
<source
|
|
media="(min-width: 535px)"
|
|
data-original-set="{{ .Get "src" }}.{{ .Get "type" }} 1x,
|
|
{{ .Get "src" }}@2x.{{ .Get "type" }} 2x">
|
|
<!-- Small screens -->
|
|
<source
|
|
media="(max-width: 534px)"
|
|
data-original-set="{{ .Get "src" }}-sm.{{ .Get "type" }} 1x,
|
|
{{ .Get "src" }}-sm@2x.{{ .Get "type" }} 2x">
|
|
<!-- Fallback -->
|
|
<img
|
|
data-original="{{ .Get "src" }}.{{ .Get "type" }}"
|
|
data-original-set="{{ .Get "src" }}@2x.{{ .Get "type" }} 2x"
|
|
alt="{{ .Get "alt" }}"{{ if .Get "caption"}} class="img-fluid figure-img"{{ end }}>
|
|
</picture>
|
|
{{ if .Get "caption"}}
|
|
<figcaption>{{ .Get "caption" }}</figcaption>
|
|
</figure>
|
|
{{ end }}
|
|
</div>
|