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:
@@ -1,7 +1,7 @@
|
||||
{{- $IsList := .IsList -}}
|
||||
{{- $Page := .Page -}}
|
||||
<header class="article-header">
|
||||
{{- $image := partial "helper/image" (dict "Image" $Page.Params.image "Resources" $Page.Resources) -}}
|
||||
{{- $image := partial "helper/image" (dict "Image" $Page.Params.image "Resources" $Page.Resources "Context" $Page) -}}
|
||||
{{ if $image }}
|
||||
<div class="article-image">
|
||||
<a href="{{ $Page.RelPermalink }}">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
{{- $image := partial "helper/image" (dict "Image" $link.image "Resources" $.Resources) -}}
|
||||
{{- $image := partial "helper/image" (dict "Image" $link.image "Resources" $.Resources "Context" .) -}}
|
||||
{{- with $image -}}
|
||||
<div class="article-image">
|
||||
{{ partial "helper/thumbnail-image" (dict
|
||||
|
||||
Reference in New Issue
Block a user