img: add link to the original
This commit is contained in:
@@ -29,7 +29,7 @@ care about is 700*4=2800px.
|
|||||||
{{ $w2800 := $src.Resize (print "2800x webp " $hint ) }}
|
{{ $w2800 := $src.Resize (print "2800x webp " $hint ) }}
|
||||||
|
|
||||||
<figure {{ with .Get "class" }}class="{{.}}"{{ end }}>
|
<figure {{ with .Get "class" }}class="{{.}}"{{ end }}>
|
||||||
{{ with .Get "link" }}<a href="{{ . }}">{{ end }}
|
<a href="{{ $jmax.RelPermalink }}">
|
||||||
<picture>
|
<picture>
|
||||||
<source type="image/webp"
|
<source type="image/webp"
|
||||||
sizes="(max-width: 600px) 350px, {{ $width }}"
|
sizes="(max-width: 600px) 350px, {{ $width }}"
|
||||||
@@ -74,7 +74,7 @@ care about is 700*4=2800px.
|
|||||||
{{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" }}{{ end }}"{{ end }}
|
{{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" }}{{ end }}"{{ end }}
|
||||||
/>
|
/>
|
||||||
</picture>
|
</picture>
|
||||||
{{ if .Get "link" }}</a>{{ end }}
|
</a>
|
||||||
{{ if or (or (.Get "title") (.Get "caption")) (.Get "attr") }}
|
{{ if or (or (.Get "title") (.Get "caption")) (.Get "attr") }}
|
||||||
<figcaption>{{ if isset .Params "title" }}
|
<figcaption>{{ if isset .Params "title" }}
|
||||||
<h4>{{ .Get "title" }}</h4>{{ end }}
|
<h4>{{ .Get "title" }}</h4>{{ end }}
|
||||||
|
|||||||
Reference in New Issue
Block a user