mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-11-24 16:55:07 +01:00
add local position var
This commit is contained in:
parent
51d17bbce6
commit
b7a187917b
@ -1,6 +1,7 @@
|
||||
{{ $original := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) }}
|
||||
{{ $command := .Get 1 }}
|
||||
{{ $options := .Get 2 }}
|
||||
{{ $position := .Get 3}}
|
||||
|
||||
{{ if eq $command "Fit"}}
|
||||
{{ .Scratch.Set "image" ($original.Fit $options) }}
|
||||
@ -14,7 +15,7 @@
|
||||
|
||||
{{ $image := .Scratch.Get "image" }}
|
||||
|
||||
<figure class="{{ with .Get 3}}{{ . }}{{ else -}} left {{- end }}" >
|
||||
<figure class="{{ with $position }}{{ . }}{{ else -}} left {{- end }}" >
|
||||
<img style="max-width: 100%; width: auto; height: auto; border-radius: 8px;" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}">
|
||||
{{ with .Inner }}
|
||||
<figcaption>
|
||||
|
Loading…
Reference in New Issue
Block a user