PhotoSwipe support
This commit is contained in:
parent
ee6246379b
commit
aae34f128c
11 changed files with 278 additions and 1 deletions
14
layouts/shortcodes/figure.html
Normal file
14
layouts/shortcodes/figure.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<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">© {{ .Get "copyright"}}</span>-->
|
||||
</figcaption>
|
||||
</figure>
|
||||
Loading…
Add table
Add a link
Reference in a new issue