Skip to content

Commit

Permalink
fix: revert removal of alt tag to display captions again #59
Browse files Browse the repository at this point in the history
This reverts commit 338f126.
The initial "fix" prevented captions to be displayed.
  • Loading branch information
nicokaiser committed Apr 28, 2024
1 parent 5e4747d commit c1cf42d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layouts/partials/album-card.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ $gallery := partial "get-gallery.html" . }}
{{ with $gallery }}
<a class="card" href="{{ .page.RelPermalink }}" title="{{ .page.Title }}">
<img loading="lazy" width="{{ .thumbnail.Width }}" height="{{ .thumbnail.Height }}" src="{{ .thumbnail.RelPermalink }}" style="background-color: {{ .color }}" />
<img loading="lazy" width="{{ .thumbnail.Width }}" height="{{ .thumbnail.Height }}" src="{{ .thumbnail.RelPermalink }}" style="background-color: {{ .color }}" alt="{{ .page.Title }}" />
<div>
<h2>{{ .page.Title }}</h2>
<p>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/gallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{{ $full := $image.Filter (slice images.AutoOrient (images.Process "fit 1600x1600")) }}
{{ $color := index $thumbnail.Colors 0 | default "transparent" }}
<a class="gallery-item" href="{{ $image.RelPermalink }}" data-pswp-src="{{ $full.RelPermalink }}" data-pswp-width="{{ $full.Width }}" data-pswp-height="{{ $full.Height }}" title="{{ .Title }}" itemscope itemtype="https://schema.org/ImageObject" style="aspect-ratio: {{ $thumbnail.Width }} / {{ $thumbnail.Height }}">
<img loading="lazy" width="{{ $thumbnail.Width }}" height="{{ $thumbnail.Height }}" src="{{ $thumbnail.RelPermalink }}" style="background-color: {{ $color }}" />
<img loading="lazy" width="{{ $thumbnail.Width }}" height="{{ $thumbnail.Height }}" src="{{ $thumbnail.RelPermalink }}" style="background-color: {{ $color }}" alt="{{ .Title }}" />
<meta itemprop="contentUrl" content="{{ $image.RelPermalink }}" />
{{ with site.Params.Author }}
<span itemprop="creator" itemtype="https://schema.org/Person" itemscope>
Expand Down

0 comments on commit c1cf42d

Please sign in to comment.