feat: use images.AutoOrient in helper/image (#1294)
* feat: use images.AutoOrient in `helper/image` closes https://github.com/CaiJimmy/hugo-theme-stack/issues/1292 * fix: check if IsImageResourceProcessable before using filter * remove local field * feat: add configurable image auto-orientation via a new `autoOrient` parameter in site configuration
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
{{- $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources) -}}
|
||||
{{- $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources "Context" .) -}}
|
||||
{{ if $image }}
|
||||
<div class="article-image">
|
||||
{{ partial "helper/thumbnail-image" (dict
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{ $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources) }}
|
||||
{{ $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources "Context" .) }}
|
||||
<article class="{{ if $image }}has-image{{ end }}">
|
||||
{{ partial "article/components/header" (dict "Page" . "IsList" true) }}
|
||||
</article>
|
||||
@@ -1,4 +1,4 @@
|
||||
{{ $image := partial "helper/image" (dict "Image" .context.Params.image "Resources" .context.Resources) }}
|
||||
{{ $image := partial "helper/image" (dict "Image" .context.Params.image "Resources" .context.Resources "Context" .context) }}
|
||||
<article class="{{ if $image }}has-image{{ end }}">
|
||||
<a href="{{ .context.RelPermalink }}">
|
||||
{{ if $image }}
|
||||
|
||||
Reference in New Issue
Block a user