use get-image
partial
This commit is contained in:
parent
ed9e769b2d
commit
edba5d203e
8 changed files with 94 additions and 47 deletions
|
@ -16,9 +16,7 @@
|
|||
poster="
|
||||
{{- if $src.Params.poster -}}
|
||||
{{- $posterSrc := $.Page.Resources.GetMatch ( .Get $src.Params.poster ) -}}
|
||||
{{- with $posterSrc.Resize "1200x webp" -}}
|
||||
{{- .RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- partialCached "images/get-image.html" ( dict "img" $posterSrc ) $posterSrc.Title -}}
|
||||
{{- else -}}
|
||||
{{- erroridf "a11y-video-poster" "No poster defined for resource %q (%q)" $src.RelPermalink .page_file_path -}}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue