Add alt text to gallery

This commit is contained in:
Joshua Goins 2022-08-22 17:04:33 -04:00
parent 90e3e37adf
commit ca6ac17d06

View file

@ -10,20 +10,20 @@
<h3>{{ .year }}</h3> <h3>{{ .year }}</h3>
{{ range .pieces }} {{ range .pieces }}
<figure> <figure>
{{ $full := resources.Get (printf "%s/%s" ($.Param "json") .filename) }} {{ $full := resources.Get (printf "%s/%s" ($.Param "json") .filename) }}
<a href="{{ $full.Permalink }}"> <a href="{{ $full.Permalink }}">
{{ if $.Params.thumbnails }} {{ if $.Params.thumbnails }}
{{ $thumb := resources.Get (printf "%s-thumbs/%s" ($.Param "json") .filename) }} {{ $thumb := resources.Get (printf "%s-thumbs/%s" ($.Param "json") .filename) }}
<img width="128px" height="128px" src="{{ $thumb.Permalink }}"/> <img alt="{{ .title }}" width="128px" height="128px" src="{{ $thumb.Permalink }}"/>
{{ else }} {{ else }}
<img src="{{ $full.Permalink }}"/> <img alt="{{ .title }}" src="{{ $full.Permalink }}"/>
{{ end }} {{ end }}
</a> </a>
<figcaption>"{{ .title }}"</figcaption> <figcaption>"{{ .title }}"</figcaption>
</figure> </figure>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}