mirror of
https://github.com/nikdoof/website-hugo.git
synced 2025-12-14 16:12:16 +00:00
Add retro theme
This commit is contained in:
7
themes/lhs-retro/layouts/shortcodes/image.html
Normal file
7
themes/lhs-retro/layouts/shortcodes/image.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{{ $img := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
|
||||
{{ $width := .Get "width" }}
|
||||
{{ $img = $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 }}>
|
||||
Reference in New Issue
Block a user