Skip to content

Commit

Permalink
adapt resizing of news images to landscape ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmehl committed Sep 17, 2024
1 parent bc87093 commit 174480b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion themes/openrail/layouts/news/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
</div>
{{ if .Params.image }}
<div class="image">
{{- with (resources.Get .Params.image.src).Resize "300x" }}
{{- with (resources.Get .Params.image.src).Resize "x300" }}
<img src="{{ .RelPermalink }}" alt="{{ .Params.image.alt }}" />
{{- end }}
</div>
Expand Down
2 changes: 1 addition & 1 deletion themes/openrail/layouts/news/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h2>{{ .Title }}</h2>
</div>
{{ if .Params.image }}
<div class="image">
{{- with (resources.Get .Params.image.src).Resize "600x" }}
{{- with (resources.Get .Params.image.src).Resize "x600" }}
<img src="{{ .RelPermalink }}" alt="{{ .Params.image.alt }}" />
{{- end }}
</div>
Expand Down

0 comments on commit 174480b

Please sign in to comment.