add class parameter to iimg shortcode
This commit is contained in:
parent
edfaa990f1
commit
605e251a32
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
{{- $ref := .Get "ref" -}}
|
||||
{{- $scale := .Get "scale" -}}
|
||||
{{- $alt := or (.Get "alt") (.Get "title") -}}
|
||||
{{- $class := .Get "class" -}}
|
||||
{{- $refImg := "" -}}
|
||||
{{- $refPage := "" -}}
|
||||
{{- if $ref -}}
|
||||
|
@ -22,6 +23,6 @@
|
|||
<a href="{{ $refPage.Permalink }}"><img
|
||||
src="{{ $image.RelPermalink }}" alt="{{ or $alt $refPage.Title }}"></a>
|
||||
{{- else -}}
|
||||
<img src="{{ $image.RelPermalink }}" alt="{{ $alt }}">
|
||||
<img src="{{ $image.RelPermalink }}" alt="{{ $alt }}" class="{{ $class }}">
|
||||
{{- end -}}
|
||||
</p>
|
Loading…
Add table
Reference in a new issue