Skip to content

Commit

Permalink
use smaller image sizes for people
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmehl committed Sep 17, 2024
1 parent 801d3d4 commit ba7dd06
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion themes/openrail/layouts/shortcodes/people/person.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{{ $data := (index .Site.Data.people .Params.id) -}}
<section class="person" id="{{ .Params.id }}">
<img src="/images/people/{{ with $data.img }}{{ . }}{{ else }}default.jpg{{ end }}" alt="Picture of {{ $data.name }}">
{{- $img := "images/people/default.jpg" }}
{{- with $data.img }}
{{- $img = path.Join "images/people" . }}
{{- end }}
{{- $img_resized := (resources.Get $img).Fill "300x300 Center" }}
<img src="{{ $img_resized.RelPermalink }}" alt="Picture of {{ $data.name }}">
<h5>{{ $data.name }}</h5>
{{ with $data.openrail_role -}}
<p><em>{{ . }}</em></p>
Expand Down

0 comments on commit ba7dd06

Please sign in to comment.