We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 801d3d4 commit ba7dd06Copy full SHA for ba7dd06
themes/openrail/layouts/shortcodes/people/person.html
@@ -1,6 +1,11 @@
1
{{ $data := (index .Site.Data.people .Params.id) -}}
2
<section class="person" id="{{ .Params.id }}">
3
- <img src="/images/people/{{ with $data.img }}{{ . }}{{ else }}default.jpg{{ end }}" alt="Picture of {{ $data.name }}">
+ {{- $img := "images/people/default.jpg" }}
4
+ {{- with $data.img }}
5
+ {{- $img = path.Join "images/people" . }}
6
+ {{- end }}
7
+ {{- $img_resized := (resources.Get $img).Fill "300x300 Center" }}
8
+ <img src="{{ $img_resized.RelPermalink }}" alt="Picture of {{ $data.name }}">
9
<h5>{{ $data.name }}</h5>
10
{{ with $data.openrail_role -}}
11
<p><em>{{ . }}</em></p>
0 commit comments