add local position var
This commit is contained in:
parent
51d17bbce6
commit
b7a187917b
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue