New post about blåhaj
This commit is contained in:
10
layouts/shortcodes/img.html
Normal file
10
layouts/shortcodes/img.html
Normal file
@ -0,0 +1,10 @@
|
||||
{{ $imageName := .Get "img" }}
|
||||
{{ $images := .Page.Resources.Match $imageName }}
|
||||
{{ $image := index $images 0 }}
|
||||
{{ $fill := .Get "fill" }}
|
||||
{{ if $fill }}{{ $image = $image.Fill $fill }}{{ end }}
|
||||
{{ $fit := .Get "fit" }}
|
||||
{{ if $fit }}{{ $image = $image.Fit $fit }}{{ end }}
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $style := .Get "style" }}
|
||||
{{ print "<img class='" $class "' style='" $style "' src='" $image.RelPermalink "'>" | markdownify}}
|
Reference in New Issue
Block a user