Commit 2cfabaf0 authored by Laura Kalbag's avatar Laura Kalbag
Browse files

Make thumbnails link to their posts

Closes #153
parent 6a94495e
......@@ -19,11 +19,18 @@
{{- /* get the image’s alt text from the post’s frontmatter */}}
{{- $alt := $.Params.altText }}
{{- /* pass all the variables above into the image partial */}}
{{ partial "image.html" ( dict "alt" $alt "class" $class "image" $image "original" $original "srcsetSizes" $srcsetSizes "widths" $widths ) }}
{{- /* use JS to link to post when you click on the image (so it doesn’t duplicate the title link) */}}
<span class='linkish' onclick="location.href='{{ $.RelPermalink }}'" aria-describedby='{{ .Title | urlize }}'>
{{- /* pass all the variables above into the image partial */}}
{{ partial "image.html" ( dict "alt" $alt "class" $class "image" $image "original" $original "srcsetSizes" $srcsetSizes "widths" $widths ) }}
</span>
{{- end }}
</span>
{{- end }}
{{- if .Summary }}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment