mirror of
https://github.com/nikdoof/website-hugo.git
synced 2025-12-13 12:12:18 +00:00
Link to full size images
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
{{ $img := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
|
||||
{{ $width := .Get "width" }}
|
||||
{{ $img = $img.Resize (print (default "640x" $width) " jpeg picture") }}
|
||||
{{ $rimg := $img.Resize (print (default "640x" $width) " jpeg picture") }}
|
||||
{{ $title := .Get "title" }}
|
||||
{{ $class := .Get "class" }}
|
||||
<img src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}" {{ if $title }}
|
||||
alt="{{ $title }}" {{ end }}>
|
||||
<a href="{{ $img.RelPermalink }}"><img src="{{ $rimg.RelPermalink }}" width="{{ $rimg.Width }}" height="{{ $rimg.Height }}"{{ if $title }} alt="{{ $title }}"{{ end }}></a>
|
||||
Reference in New Issue
Block a user