From f342af9d192ff8d3524624fa35e74de97f63b2f8 Mon Sep 17 00:00:00 2001 From: Aurelien Froger <aurelien.froger@inria.fr> Date: Mon, 10 Mar 2025 12:29:45 +0100 Subject: [PATCH] Fix display of summary for news --- .../beautifulhugotier/layouts/partials/post_preview.html | 8 ++++---- .../beautifulhugotier/layouts/shortcodes/latest-news.html | 2 +- .../layouts/shortcodes/upcoming-seminars.html | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/themes/beautifulhugotier/layouts/partials/post_preview.html b/themes/beautifulhugotier/layouts/partials/post_preview.html index 801826e..541746b 100644 --- a/themes/beautifulhugotier/layouts/partials/post_preview.html +++ b/themes/beautifulhugotier/layouts/partials/post_preview.html @@ -53,23 +53,23 @@ <div class="post-entry"> {{ if in .context.Params.tags "paper" }} <strong>Authors</strong>: {{ .context.Params.authors }} <br/> - {{ if .showSummary }} + {{ if not .hideSummary }} <strong>Abstract</strong>: {{ (substr .context.Params.abstract 0 250) }} {{ end }} <a href="{{ .context.Permalink }}" class="post-read-more">[{{ i18n "readMore" }}]</a> {{ else }} {{ if .context.Truncated }} - {{ if .showSummary }} + {{ if not .hideSummary }} {{ .context.Summary }} {{ end }} <a href="{{ .context.Permalink }}" class="post-read-more">[{{ i18n "readMore" }}]</a> {{ else if .context.Params.summary }} - {{ if .showSummary }} + {{ if not .hideSummary }} {{ .context.Summary }}<br/> {{end}} <a href="{{ .context.Permalink }}" class="post-read-more">[{{ i18n "readMore" }}]</a> {{ else }} - {{ if .showSummary }} + {{ if not .hideSummary }} {{ .context.Content }} {{ end }} {{ end }} diff --git a/themes/beautifulhugotier/layouts/shortcodes/latest-news.html b/themes/beautifulhugotier/layouts/shortcodes/latest-news.html index b5c4e23..64808ff 100644 --- a/themes/beautifulhugotier/layouts/shortcodes/latest-news.html +++ b/themes/beautifulhugotier/layouts/shortcodes/latest-news.html @@ -10,7 +10,7 @@ <div class="posts-list"> <h5 style='font-weight: bold;'>Latest News</h5> {{ range first 2 $news }} - {{ partial "post_preview.html" (dict "context" .) }} + {{ partial "post_preview.html" (dict "context" . "hideSummary" true) }} {{ end }} </div> </div> diff --git a/themes/beautifulhugotier/layouts/shortcodes/upcoming-seminars.html b/themes/beautifulhugotier/layouts/shortcodes/upcoming-seminars.html index fb9f27e..00f902a 100644 --- a/themes/beautifulhugotier/layouts/shortcodes/upcoming-seminars.html +++ b/themes/beautifulhugotier/layouts/shortcodes/upcoming-seminars.html @@ -8,7 +8,7 @@ <div class="posts-list"> <h5 style='font-weight: bold;'>Upcoming Seminars</h5> {{ range first 2 $seminars }} - {{ partial "post_preview.html" (dict "context" . ) }} + {{ partial "post_preview.html" (dict "context" . "hideSummary" true) }} {{ end }} </div> </div> -- GitLab