From 047bb517cbee2427b63e35c733becd1430d62206 Mon Sep 17 00:00:00 2001 From: Andrea Maiani Date: Thu, 19 Dec 2024 09:24:52 +0100 Subject: [PATCH] Adapt publication card to handle missing URLs (#1017) * Allow for personalized titles for Blog and Note pages * Adapt publication card to handle better the case when URL in authors, publication and paper are not used. --- assets/styles/sections/publications.scss | 8 ++++++++ layouts/partials/cards/publication.html | 14 +++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/assets/styles/sections/publications.scss b/assets/styles/sections/publications.scss index ae76079..e666b3a 100644 --- a/assets/styles/sections/publications.scss +++ b/assets/styles/sections/publications.scss @@ -24,6 +24,14 @@ float: right !important; } } + + a[href] { + text-decoration: underline; /* Underline only when href is present */ + } + + a:not([href]) { + text-decoration: none; /* No underline when href is absent */ + } } .card-body { diff --git a/layouts/partials/cards/publication.html b/layouts/partials/cards/publication.html index 2c238e1..6bf3b89 100644 --- a/layouts/partials/cards/publication.html +++ b/layouts/partials/cards/publication.html @@ -11,12 +11,22 @@
{{ .title }}
- {{ .publishedIn.name }} + + {{ if .publishedIn.url }} + {{ .publishedIn.name }} + {{ else }} + {{ .publishedIn.name }} + {{ end }} + {{ .publishedIn.date }}
{{ range $index,$author:= .authors }} + {{if .url}} {{ .name }} + {{ else }} + {{ .name }} + {{ end }} {{ end }}
@@ -31,9 +41,11 @@ {{ end }} + {{ if .paper.url }}
{{ i18n "project_details"}}
+ {{ end }}