diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html index 02cae79..f7259bf 100644 --- a/layouts/shortcodes/img.html +++ b/layouts/shortcodes/img.html @@ -1,10 +1,11 @@ +{{ $base := (findRE "/[a-zA-Z0-9_]+/" .Site.BaseURL | default "/") }} +{{ if .Get "lazy" }}
{{ with .Get "link"}}{{ end }} - {{ $base := (findRE "/[a-zA-Z0-9_]+/" .Site.BaseURL | default "/") }} - + {{ if .Get "link"}}{{ end }} {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}} -
{{ if isset .Params "title" }} +
{{ if isset .Params "title" }} {{ .Get "title" }}:{{ end }} {{ if or (.Get "caption") (.Get "attr")}} {{ .Get "caption" }} @@ -14,4 +15,22 @@ {{ end }}
{{ end }} -
\ No newline at end of file + +{{ else }} +
+ {{ with .Get "link"}}{{ end }} + + {{ if .Get "link"}}{{ end }} + {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}} +
{{ if isset .Params "title" }} + {{ .Get "title" }}:{{ end }} + {{ if or (.Get "caption") (.Get "attr")}} + {{ .Get "caption" }} + {{ with .Get "attrlink"}} {{ end }} + {{ .Get "attr" }} + {{ if .Get "attrlink"}} {{ end }} + {{ end }} +
+ {{ end }} +
+{{ end }} \ No newline at end of file