nemhugo/layouts/shortcodes/figure.html
2017-03-20 21:45:55 -07:00

14 lines
No EOL
853 B
HTML

<figure {{ with .Get "class" }}class="{{.}}"{{ end }} itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
<a class="rig-cell" href="{{ with .Get "link" }}{{.}}{{ else }}{{ .Get "src" }}{{ end }}" {{ with .Get "size" }}data-size="{{.}}"{{ end }} itemprop="contentUrl">
<img class="rig-img" itemprop="thumbnail"
src="{{ with .Get "src" }}{{.}}{{ else }}{{ printf "%s." (.Get "thumb") | replace (.Get "link") "." }}{{ end }}"
{{ with .Get "alt" }}alt="{{.}}"{{ end }}
{{ with .Get "width" }}width="{{.}}"{{ end }}/>
<span class="rig-overlay"></span>
<span class="rig-text">{{ .Get "alt"}}</span>
</a>
<figcaption itemprop="caption description">
{{ .Get "caption"}}
<!--<span itemprop="copyrightHolder">&#169; {{ .Get "copyright"}}</span>-->
</figcaption>
</figure>