use get-image
partial
This commit is contained in:
parent
ed9e769b2d
commit
edba5d203e
8 changed files with 94 additions and 47 deletions
|
@ -19,8 +19,8 @@
|
|||
class="u-photo"
|
||||
style="display: none;"
|
||||
src="
|
||||
{{- with ( $.pc.Resources.GetMatch . ) -}}
|
||||
{{ partialCached "images/get-image.html" ( dict "img" . ) . }}
|
||||
{{- with ( $.pc.Resources.GetMatch . ) -}}
|
||||
{{- partialCached "images/get-image.html" ( dict "img" . ) .Title -}}
|
||||
{{- else -}}
|
||||
{{- . -}}
|
||||
{{- end -}}
|
||||
|
@ -37,7 +37,7 @@
|
|||
class="article-header__featured-image"
|
||||
{{ with .pc.Params.featured_image }}
|
||||
{{ with ( $.pc.Resources.GetMatch . ) }}
|
||||
style="background-image: url({{ partial "images/get-image.html" ( dict "img" . ) }})"
|
||||
style="background-image: url({{- partialCached "images/get-image.html" ( dict "img" . ) .Title -}})"
|
||||
{{ else }}
|
||||
{{- if $.pc.Page.Resources -}}
|
||||
{{- errorf "No Page Resource found for src '%q' (%q).\n\n\tAvailable Page Resources are:\n\t\t%v" . $.pc.Page.File.Path $.pc.Page.Resources -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue