Make photo preview a link

This commit is contained in:
JP Hastings-Spital 2024-05-23 15:38:53 +01:00
parent 20d773e08c
commit 1a3bf0c32b
2 changed files with 6 additions and 4 deletions

View file

@ -1,7 +1,8 @@
--- ---
date: 2024-05-21T12:05:36.779+01:00 date: 2024-05-21T12:05:36.779+01:00
publishDate: 2024-05-21T12:05:36.779+01:00 publishDate: 2024-05-21T12:05:36.779+01:00
slug: 3fwgt tags:
- EMFCamp
--- ---
This afternoon I am mostly writing layout algorithms for #EMFCamp gifts I'm hoping to make — let's hope I can figure out what I'm doing! This afternoon I am mostly writing layout algorithms for [EMFCamp](/tags/emfcamp) gifts I'm hoping to make — let's hope I can figure out what I'm doing!

View file

@ -59,9 +59,10 @@
<figure> <figure>
{{- $src := index $picPage.Params.Media 0 -}} {{- $src := index $picPage.Params.Media 0 -}}
<img src="{{ path.Join .RelPermalink $src.url }}" {{ with $src.alt }}alt="{{ . }}" {{ end }} /> <a href="{{ .RelPermalink }}"><img src="{{ path.Join .RelPermalink $src.url }}" {{ with $src.alt }}alt="{{ . }}" {{ end }} /></a>
<figcaption> <figcaption>
{{- index (split .Summary "\n") 0 | htmlUnescape }} {{- $shortSummary := index (split .Summary "\n") 0 -}}
{{- $shortSummary | htmlUnescape }}{{ if gt (len .Summary) (len $shortSummary) }}&nbsp;<a href="{{ .RelPermalink }}"></a>{{ end -}}
</figcaption> </figcaption>
</figure> </figure>
</div> </div>