From 5de16a03ce74089532e86b6e2b7c53aaa14416bf Mon Sep 17 00:00:00 2001 From: Gabriele Musco Date: Thu, 10 Mar 2022 10:36:40 +0100 Subject: [PATCH] article image click links to article --- layouts/partials/article_card.html | 4 +++- layouts/partials/js_paginator.html | 18 +++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/layouts/partials/article_card.html b/layouts/partials/article_card.html index 0dcafd0..e263f1f 100644 --- a/layouts/partials/article_card.html +++ b/layouts/partials/article_card.html @@ -16,7 +16,9 @@

{{ if .Site.Params.imageInArticlePreview }} {{ if .Params.Image }} - + + + {{ end }} {{end}} {{ if (site.Params.articleSummary | default true) }} diff --git a/layouts/partials/js_paginator.html b/layouts/partials/js_paginator.html index 4ad83a7..81dfda4 100644 --- a/layouts/partials/js_paginator.html +++ b/layouts/partials/js_paginator.html @@ -8,9 +8,9 @@ } return res; } - function renderImage(image) { + function renderImage(image, link) { if (!image) return ''; - return `` + return ``; } function renderSingleArticle(article) { return ` @@ -20,15 +20,15 @@ ${article.title}

- - ${article.date} - {{ if (.Site.Params.tagsInArticlePreview | default true) }} - ${renderTags(article.tags)} - {{ end }} + + ${article.date} + {{ if (.Site.Params.tagsInArticlePreview | default true) }} + ${renderTags(article.tags)} + {{ end }}

{{ if .Site.Params.imageInArticlePreview }} - ${renderImage(article.image)} - {{end}} + ${renderImage(article.image, article.link)} + {{ end }} {{ if (site.Params.articleSummary | default true) }}

${article.summary}