diff options
author | Shaform <shaform@gmail.com> | 2019-01-16 19:29:39 +0300 |
---|---|---|
committer | Shaform <shaform@gmail.com> | 2019-01-16 19:29:39 +0300 |
commit | f15e7c0c96feb9418f5883cc9592474d9b453cdb (patch) | |
tree | 970283d6c7a69d95481f26ca3dcb166a418e22df /layouts | |
parent | c8d49d763949fb38f19be9391a67ae1a22f0367a (diff) |
allow img classes
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/shortcodes/figure.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index 0774d13..176bcad 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -11,7 +11,7 @@ Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/ <div class="box{{ with .Get "caption-position" }} fancy-figure caption-position-{{.}}{{end}}{{ with .Get "caption-effect" }} caption-effect-{{.}}{{end}}{{ with .Get "align" }} {{.}}{{end}}"{{ with .Get "width" }} style="max-width:{{.}}{{ if eq (len (trim . "0123456789")) 0 }}px{{ end }};"{{end}}> <figure {{ with .Get "class" }}class="{{.}}"{{ end }} itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject"> <div class="img"{{ if .Parent }} style="background-image: url('{{ print .Site.BaseURL $thumb }}');"{{ end }}{{ with .Get "size" }} data-size="{{.}}"{{ end }}> - <img itemprop="thumbnail" src="{{ $thumb }}" {{ with .Get "alt" | default (.Get "caption") }}alt="{{.}}"{{ end }}{{ with .Get "height" }} style="max-height:{{.}}{{ if eq (len (trim . "0123456789")) 0 }}px{{ end }};"{{end}} /><!-- <img> hidden if in .gallery --> + <img {{ with .Get "img-class" }}class="{{.}}"{{ end }} itemprop="thumbnail" src="{{ $thumb }}" {{ with .Get "alt" | default (.Get "caption") }}alt="{{.}}"{{ end }}{{ with .Get "height" }} style="max-height:{{.}}{{ if eq (len (trim . "0123456789")) 0 }}px{{ end }};"{{end}} /><!-- <img> hidden if in .gallery --> </div> {{ with .Get "link" }}<a href="{{.}}" itemprop="contentUrl"></a>{{ end }} {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr")}} |