From 0b0ea5239fea4785cae66adfaa0161b6eef9ad60 Mon Sep 17 00:00:00 2001 From: MoritzWeber Date: Mon, 25 May 2026 17:18:22 +0200 Subject: [PATCH 1/2] feat: Properly show updates to news articles --- assets/sass/booking.scss | 6 ++++++ assets/sass/content.scss | 4 ++++ assets/sass/contentNavigation.scss | 7 +++++-- assets/sass/tag.scss | 8 ++++++-- assets/sass/teaser.scss | 14 +++++++++----- assets/sass/trainCategory.scss | 6 ++++++ content/news/1/index.de.md | 1 + content/news/1/index.en.md | 1 + content/news/1/index.fr.md | 1 + content/news/10/index.de.md | 5 +++-- content/news/10/index.en.md | 5 +++-- content/news/10/index.fr.md | 5 +++-- content/news/2/index.de.md | 1 + content/news/2/index.en.md | 1 + content/news/2/index.fr.md | 1 + content/news/4/index.de.md | 3 ++- content/news/4/index.en.md | 3 ++- content/news/4/index.fr.md | 3 ++- layouts/news/single.html | 11 ++++++++--- layouts/partials/related.html | 11 ++++++++--- layouts/partials/teaser.html | 9 ++++++--- layouts/partials/updateDate.html | 3 +++ 22 files changed, 82 insertions(+), 27 deletions(-) diff --git a/assets/sass/booking.scss b/assets/sass/booking.scss index 25ef3ff65..a11924da1 100644 --- a/assets/sass/booking.scss +++ b/assets/sass/booking.scss @@ -101,3 +101,9 @@ .o-booking__info { margin-bottom: 1.5rem; } + +details.o-expander--booking { + .a-tag { + font-size: 0.7em; + } +} diff --git a/assets/sass/content.scss b/assets/sass/content.scss index 404403a2c..162d804be 100644 --- a/assets/sass/content.scss +++ b/assets/sass/content.scss @@ -1,5 +1,9 @@ .o-last-updated { font-size: 1.3rem; + display: flex; + align-items: center; + gap: 0.8rem; + flex-wrap: wrap; } .o-last-updated > .a-icon { diff --git a/assets/sass/contentNavigation.scss b/assets/sass/contentNavigation.scss index 057d445b0..ff2b57b93 100644 --- a/assets/sass/contentNavigation.scss +++ b/assets/sass/contentNavigation.scss @@ -118,9 +118,12 @@ } } - &__date { + &__meta { + display: flex; + align-items: center; + gap: 0.6rem; + flex-wrap: wrap; margin-left: 2.8rem; - position: relative; } p { diff --git a/assets/sass/tag.scss b/assets/sass/tag.scss index fd7051a8b..26f558949 100644 --- a/assets/sass/tag.scss +++ b/assets/sass/tag.scss @@ -2,9 +2,9 @@ display: flex; align-items: flex-start; gap: 0.4rem; - padding: 0.4rem 0.8rem; + padding: 0.4rem 0.6rem; border-radius: var(--border-radius-s); - font-size: 0.7em; + font-size: 0.9em; font-weight: 500; @each $name, $color in $tag-colors { @@ -14,4 +14,8 @@ border: 0.1rem solid var(--tag-#{$name}-color); } } + + &__text { + align-self: center; + } } diff --git a/assets/sass/teaser.scss b/assets/sass/teaser.scss index 7428948b1..a65823407 100644 --- a/assets/sass/teaser.scss +++ b/assets/sass/teaser.scss @@ -23,11 +23,6 @@ @include focus-indicator(0.3rem); - .a-icon { - font-size: 2.4rem; - margin-top: 1rem; - } - @media print { box-shadow: none; border: 1px solid black; @@ -98,6 +93,11 @@ .m-teaser__dateline { font-size: 1.4rem; color: var(--link-special); + display: flex; + align-items: center; + gap: 1rem; + flex-wrap: wrap; + margin-bottom: 0.4rem; } .m-teaser__headline { @@ -106,11 +106,15 @@ .m-teaser__content { padding: 1.4rem; + padding-top: 1rem; display: flex; flex-direction: column; justify-content: space-between; > .a-icon { + font-size: 2.4rem; + margin-top: 1rem; + @media print { display: none; } diff --git a/assets/sass/trainCategory.scss b/assets/sass/trainCategory.scss index d6b5ed183..432c5c50b 100644 --- a/assets/sass/trainCategory.scss +++ b/assets/sass/trainCategory.scss @@ -27,6 +27,12 @@ details.o-expander__summary--train-category { } } +details.o-expander--train-category { + .a-tag { + font-size: 0.7em; + } +} + details.o-expander--train-category:not([open]) { @media (max-width: $breakpoint-md) { .a-tag__text { diff --git a/content/news/1/index.de.md b/content/news/1/index.de.md index 98a6ff0e6..751909c26 100644 --- a/content/news/1/index.de.md +++ b/content/news/1/index.de.md @@ -1,5 +1,6 @@ --- date: "2025-01-01" +updated: "2026-01-08" draft: false author: "Lennart" title: "Neues FIP Mitglied: LTG Link (Litauen)" diff --git a/content/news/1/index.en.md b/content/news/1/index.en.md index 931546390..7c59d62e7 100644 --- a/content/news/1/index.en.md +++ b/content/news/1/index.en.md @@ -1,5 +1,6 @@ --- date: "2025-01-01" +updated: "2026-01-08" draft: false author: "Lennart" title: "New FIP Member: LTG Link (Lithuania)" diff --git a/content/news/1/index.fr.md b/content/news/1/index.fr.md index 62c92a306..a68d0b4f4 100644 --- a/content/news/1/index.fr.md +++ b/content/news/1/index.fr.md @@ -1,5 +1,6 @@ --- date: "2025-01-01" +updated: "2026-01-08" draft: false author: "Lennart" title: "Nouveau membre FIP : LTG Link (Lituanie)" diff --git a/content/news/10/index.de.md b/content/news/10/index.de.md index 3b4905013..e19fa5393 100644 --- a/content/news/10/index.de.md +++ b/content/news/10/index.de.md @@ -1,7 +1,8 @@ --- -date: "2026-05-02" +date: "2026-04-09" +updated: "2026-05-02" draft: false -title: "Update: Belgien: SNCB beendet Ticketverkauf im Zug ab 1. Juli 2026" +title: "Belgien: SNCB beendet Ticketverkauf im Zug ab 1. Juli 2026" description: "Ab dem 1. Juli 2026 werden bei der SNCB keine Tickets mehr im Zug verkauft. Das betrifft auch den Kauf von FIP reduzierten Tickets." country: - belgium diff --git a/content/news/10/index.en.md b/content/news/10/index.en.md index 4e6b17ad7..551e65e18 100644 --- a/content/news/10/index.en.md +++ b/content/news/10/index.en.md @@ -1,7 +1,8 @@ --- -date: "2026-05-02" +date: "2026-04-09" +updated: "2026-05-02" draft: false -title: "Update: Belgium: SNCB Ends On-Board Ticket Sales from 1 July 2026" +title: "Belgium: SNCB Ends On-Board Ticket Sales from 1 July 2026" description: "Starting 1 July 2026, SNCB will no longer sell any tickets on board their trains. This also affects the purchase of FIP discounted tickets." country: - belgium diff --git a/content/news/10/index.fr.md b/content/news/10/index.fr.md index 365cf5702..4de0af037 100644 --- a/content/news/10/index.fr.md +++ b/content/news/10/index.fr.md @@ -1,7 +1,8 @@ --- -date: "2026-05-02" +date: "2026-04-09" +updated: "2026-05-02" draft: false -title: "Mise à jour : Belgique : la SNCB met fin à la vente de billets à bord à partir du 1er juillet 2026" +title: "Belgique : la SNCB met fin à la vente de billets à bord à partir du 1er juillet 2026" description: "À partir du 1er juillet 2026, la SNCB ne vendra plus de billets à bord de ses trains. Cela concerne également l’achat de billets FIP à tarif réduit." country: - belgium diff --git a/content/news/2/index.de.md b/content/news/2/index.de.md index c8545d670..adca593f9 100644 --- a/content/news/2/index.de.md +++ b/content/news/2/index.de.md @@ -1,5 +1,6 @@ --- date: "2025-02-16" +updated: "2025-11-05" draft: false author: "Willy" title: "Grenzüberschreitende FIP Tickets der SNCB" diff --git a/content/news/2/index.en.md b/content/news/2/index.en.md index cf63a1d88..857a28b97 100644 --- a/content/news/2/index.en.md +++ b/content/news/2/index.en.md @@ -1,5 +1,6 @@ --- date: "2025-02-16" +updated: "2025-11-05" draft: false author: "Willy" title: "Cross-border FIP Tickets of SNCB" diff --git a/content/news/2/index.fr.md b/content/news/2/index.fr.md index b237e767d..1a6f635aa 100644 --- a/content/news/2/index.fr.md +++ b/content/news/2/index.fr.md @@ -1,5 +1,6 @@ --- date: "2025-02-16" +updated: "2025-11-05" draft: false author: "Willy" title: "Billets FIP transfrontaliers de la SNCB" diff --git a/content/news/4/index.de.md b/content/news/4/index.de.md index dbec9d8df..e66fbc0d4 100644 --- a/content/news/4/index.de.md +++ b/content/news/4/index.de.md @@ -1,7 +1,8 @@ --- date: "2025-05-16" +updated: "2025-06-17" draft: false -title: "Update: Eurostar Preiserhöhung" +title: "Eurostar Preiserhöhung" description: "Eurostar erhöht ab 1. Mai 2025 die Preise für FIP-Fahrkarten um 5 €. Unklar ist, ob die Änderung dauerhaft bleibt – aktuelle Infos im Überblick." country: - belgium diff --git a/content/news/4/index.en.md b/content/news/4/index.en.md index 9bee74330..2c966ca3a 100644 --- a/content/news/4/index.en.md +++ b/content/news/4/index.en.md @@ -1,7 +1,8 @@ --- date: "2025-05-16" +updated: "2025-06-17" draft: false -title: "Update: Eurostar Price Increase" +title: "Eurostar Price Increase" description: "From May 1, 2025, Eurostar increases FIP Ticket prices by €5/£5. It's unclear if the change is permanent—stay updated with the latest info." country: - belgium diff --git a/content/news/4/index.fr.md b/content/news/4/index.fr.md index 0130bd5d5..36deac65c 100644 --- a/content/news/4/index.fr.md +++ b/content/news/4/index.fr.md @@ -1,7 +1,8 @@ --- date: "2025-05-16" +updated: "2025-06-17" draft: false -title: "Mise à jour : Augmentation des prix Eurostar" +title: "Augmentation des prix Eurostar" description: "À partir du 1er mai 2025, Eurostar augmente les prix des Billets FIP de 5 €/£5. On ne sait pas si le changement est permanent – restez informé." country: - belgium diff --git a/layouts/news/single.html b/layouts/news/single.html index b4ea98bd6..ebbfb18c9 100644 --- a/layouts/news/single.html +++ b/layouts/news/single.html @@ -15,9 +15,14 @@ ) }} {{ if eq .Page.Type "news" }} - - {{ .Date | time.Format ":date_long" }} - + {{ end }} {{ end }} diff --git a/layouts/partials/related.html b/layouts/partials/related.html index 309c38d95..8a77c6e75 100644 --- a/layouts/partials/related.html +++ b/layouts/partials/related.html @@ -37,9 +37,14 @@ }} {{ if eq .Page.Type "news" }} - {{ .Date | time.Format ":date_long" }} + {{ end }} {{ end }} diff --git a/layouts/partials/teaser.html b/layouts/partials/teaser.html index b8772fac2..97e22e19f 100644 --- a/layouts/partials/teaser.html +++ b/layouts/partials/teaser.html @@ -12,9 +12,12 @@ {{ end }}
- + {{ if $listview }}

{{ $page.Title }}

{{ else }} diff --git a/layouts/partials/updateDate.html b/layouts/partials/updateDate.html index 20ad13fb5..520577d2a 100644 --- a/layouts/partials/updateDate.html +++ b/layouts/partials/updateDate.html @@ -4,6 +4,9 @@ {{ if eq .Type "news" }}
+ {{- with .Params.updated }} + {{ partial "tag" (dict "Type" "info" "Icon" "update" "RawText" (. | time.Format ":date_long")) }} + {{- end }}
{{ else if .GitInfo }} {{ $href := print .Site.Params.gitHubUrl "/commits/" .GitInfo.Hash "/content/" .File.Path }} From 5ac0a3ffa0bd0974080bf1b64f2ebdbb73720e8f Mon Sep 17 00:00:00 2001 From: MoritzWeber Date: Mon, 25 May 2026 17:33:39 +0200 Subject: [PATCH 2/2] feat: Add update shortcode --- content/news/1/index.de.md | 3 ++- content/news/1/index.en.md | 3 ++- content/news/1/index.fr.md | 3 ++- content/news/10/index.de.md | 3 ++- content/news/10/index.en.md | 3 ++- content/news/10/index.fr.md | 3 ++- content/news/2/index.de.md | 3 ++- content/news/2/index.en.md | 3 ++- content/news/2/index.fr.md | 3 ++- content/news/4/index.de.md | 3 ++- content/news/4/index.en.md | 3 ++- content/news/4/index.fr.md | 3 ++- i18n/de.yaml | 1 + i18n/en.yaml | 1 + i18n/fr.yaml | 1 + layouts/news/single.html | 2 +- layouts/partials/related.html | 2 +- layouts/partials/tag.html | 2 +- layouts/partials/teaser.html | 2 +- layouts/partials/updateDate.html | 2 +- layouts/shortcodes/update.html | 10 ++++++++++ 21 files changed, 42 insertions(+), 17 deletions(-) create mode 100644 layouts/shortcodes/update.html diff --git a/content/news/1/index.de.md b/content/news/1/index.de.md index 751909c26..ba851034d 100644 --- a/content/news/1/index.de.md +++ b/content/news/1/index.de.md @@ -21,5 +21,6 @@ Mit dem Beitritt zur FIP setzt LTG ein Zeichen für die Integration in das inter Informationen zur Nutzung von Fahrvergünstigungen mit FIP in Litauen sind in Kürze hier auf der Seite zu finden. -**Update 08.01.2026:** \ +{{% update date="2026-01-08" %}} Informationen zur Nutzung von Fahrvergünstigungen mit FIP in [Litauen](/country/lithuania) und [LTG-Link](/operator/ltg) sind jetzt hier im FIP Guide verfügbar. +{{% /update %}} diff --git a/content/news/1/index.en.md b/content/news/1/index.en.md index 7c59d62e7..0db8d2feb 100644 --- a/content/news/1/index.en.md +++ b/content/news/1/index.en.md @@ -21,5 +21,6 @@ By joining FIP, LTG is signaling its integration into the international rail net Information on the use of travel discounts with FIP in Lithuania will be available here on the site shortly. -**Update 08.01.2026:** \ +{{% update date="2026-01-08" %}} Information on using FIP travel discounts in [Lithuania](/country/lithuania) and with [LTG Link](/operator/ltg) is now available here in the FIP Guide. +{{% /update %}} diff --git a/content/news/1/index.fr.md b/content/news/1/index.fr.md index a68d0b4f4..5f704d49d 100644 --- a/content/news/1/index.fr.md +++ b/content/news/1/index.fr.md @@ -21,5 +21,6 @@ L’adhésion au FIP marque l’intégration de LTG dans le réseau ferroviaire Les informations sur l’utilisation des réductions FIP en Lituanie seront bientôt disponibles sur ce site. -**Mise à jour 17.06.2025 :** \ +{{% update date="2026-01-08" %}} Des informations sur l’utilisation des avantages de voyage FIP en [Lituanie](/country/lithuania) et avec [LTG Link](/operator/ltg) sont désormais disponibles ici dans le FIP Guide. +{{% /update %}} diff --git a/content/news/10/index.de.md b/content/news/10/index.de.md index e19fa5393..d31c98b85 100644 --- a/content/news/10/index.de.md +++ b/content/news/10/index.de.md @@ -22,8 +22,9 @@ Es ist geplant, Tickets mit 50% Rabatt am SNCB Fahrkartenautomat für SNCB-Perso Wir informieren, sobald weitere Details bekannt werden. In der Zwischenzeit findest du auf der [SNCB](/operator/sncb) Seite die aktuellsten Informationen zu den Kaufmöglichkeiten. -**Update 02.05.2026:** \ +{{% update date="2026-05-02" %}} Es wurde bestätigt, dass weder FIP 50 noch FIP 75 Tickets am SNCB Fahrkartenautomaten erhältlich sein werden. +{{% /update %}} ### Weitere Informationen: diff --git a/content/news/10/index.en.md b/content/news/10/index.en.md index 551e65e18..f851c54af 100644 --- a/content/news/10/index.en.md +++ b/content/news/10/index.en.md @@ -22,8 +22,9 @@ There are plans to make tickets with a 50% discount available at SNCB ticket mac We will keep you informed as more details become available. In the meantime, check the [SNCB](/operator/sncb) page for the latest information on ticket purchase options. -**Update 02.05.2026:** \ +{{% update date="2026-05-02" %}} It has been confirmed that neither FIP 50 nor FIP 75 Tickets will be available from SNCB ticket machines. +{{% /update %}} ### Further Information: diff --git a/content/news/10/index.fr.md b/content/news/10/index.fr.md index 4de0af037..1645169da 100644 --- a/content/news/10/index.fr.md +++ b/content/news/10/index.fr.md @@ -22,8 +22,9 @@ Il est prévu de rendre disponibles des billets avec une réduction de 50 % aux Nous vous tiendrons informés dès que de plus amples détails seront disponibles. En attendant, consultez la page [SNCB](/operator/sncb) pour les dernières informations sur les options d’achat de billets. -**Mise à jour 02.05.2026 :** \ +{{% update date="2026-05-02" %}} Il a été confirmé que ni les Billets FIP 50 ni les Billets FIP 75 ne seront disponibles aux distributeurs automatiques de la SNCB. +{{% /update %}} ### Informations complémentaires : diff --git a/content/news/2/index.de.md b/content/news/2/index.de.md index adca593f9..d99fcc0a7 100644 --- a/content/news/2/index.de.md +++ b/content/news/2/index.de.md @@ -26,5 +26,6 @@ Das Angebot umfasst folgende Möglichkeiten: Schreibt uns gerne über unser Kontaktformular, wenn ihr Erfahrungen mit den Vergünstigungen über die Website gemacht habt. -**Update 05.11.2025:** \ +{{% update date="2025-11-05" %}} Die Funktion zum Buchen von FIP 50 Tickets wurde mittlerweile wieder entfernt. Nur noch die Buchung von Tickets mit Berücksichtigung der Freifahrt ist möglich. +{{% /update %}} diff --git a/content/news/2/index.en.md b/content/news/2/index.en.md index 857a28b97..b0cd71456 100644 --- a/content/news/2/index.en.md +++ b/content/news/2/index.en.md @@ -26,5 +26,6 @@ The offer includes the following options: Feel free to write to us via our contact form if you have any experiences with the discounts on the website. -**Update 05.11.2025:** \ +{{% update date="2025-11-05" %}} The option to book FIP 50 Tickets has since been removed. It is now only possible to book tickets that take the FIP Coupon into account. +{{% /update %}} diff --git a/content/news/2/index.fr.md b/content/news/2/index.fr.md index 1a6f635aa..14852b9ce 100644 --- a/content/news/2/index.fr.md +++ b/content/news/2/index.fr.md @@ -26,5 +26,6 @@ L’offre comprend les options suivantes : N’hésitez pas à nous écrire via notre formulaire de contact si vous avez des retours sur les réductions proposées sur le site. -**Mise à jour 05.11.2025 :** \ +{{% update date="2025-11-05" %}} L’option de réservation des billets FIP 50 a depuis été supprimée. Il est désormais uniquement possible de réserver des billets prenant en compte le Coupon FIP. +{{% /update %}} diff --git a/content/news/4/index.de.md b/content/news/4/index.de.md index e66fbc0d4..7bfa85476 100644 --- a/content/news/4/index.de.md +++ b/content/news/4/index.de.md @@ -15,7 +15,8 @@ operator: Ab dem 1. Mai 2025 erhöht Eurostar die Preise auf alle FIP Fahrkarten um 5€ bzw. 5 £. Die Preiserhöhung betrifft alle FIP Globalpreise bei Eurostar Blue und Eurostar Red (Thalys) in allen Klassen. Die neuen Preise gelten für alle Buchungen, die ab dem 1. Mai 2025 getätigt werden. [^1] -**Update 17.06.2025:** \ +{{% update date="2025-06-17" %}} Die Ankündingung ist inzwischen von der Seite der Rail Delivery Group entfernt worden. Es ist unklar, ob die Preiserhöhung noch in Kraft tritt oder ob sie zurückgezogen wurde. Wir werden die Situation weiter beobachten und informieren, sobald es Neuigkeiten gibt. Aktuell ist eine Buchung zu den alten Preisen weiterhin möglich. +{{% /update %}} [^1]: [Rail Delivery Group News](https://www.raildeliverygroup.com/rst/stop-press.html#Surchares) diff --git a/content/news/4/index.en.md b/content/news/4/index.en.md index 2c966ca3a..67b7e3fdd 100644 --- a/content/news/4/index.en.md +++ b/content/news/4/index.en.md @@ -15,7 +15,8 @@ operator: Starting May 1, 2025, Eurostar will increase prices on all FIP Tickets by €5 or £5. The price increase applies to all FIP Global Fares for Eurostar Blue and Eurostar Red (Thalys) in all classes. The new prices apply to all bookings made from May 1, 2025 onwards. [^1] -**Update 17.06.2025:** \ +{{% update date="2025-06-17" %}} The announcement has since been removed from the Rail Delivery Group's website. It is unclear whether the price increase will still take effect or if it has been withdrawn. We will continue to monitor the situation and provide updates as soon as there is news. Currently, bookings at the old prices are still possible. +{{% /update %}} [^1]: [Rail Delivery Group News](https://www.raildeliverygroup.com/rst/stop-press.html#Surchares) diff --git a/content/news/4/index.fr.md b/content/news/4/index.fr.md index 36deac65c..8c6ce3b99 100644 --- a/content/news/4/index.fr.md +++ b/content/news/4/index.fr.md @@ -15,7 +15,8 @@ operator: À partir du 1er mai 2025, Eurostar augmentera les prix de tous les Billets FIP de 5 € ou 5 £. Cette augmentation concerne tous les tarifs FIP Global pour Eurostar Blue et Eurostar Red (Thalys) dans toutes les classes. Les nouveaux prix s’appliquent à toutes les réservations effectuées à partir du 1er mai 2025. [^1] -**Mise à jour 17.06.2025 :** \ +{{% update date="2025-06-17" %}} L’annonce a depuis été retirée du site de la Rail Delivery Group. Il n’est pas clair si l’augmentation de prix sera maintenue ou annulée. Nous continuerons à suivre la situation et à fournir des mises à jour dès qu’il y aura des nouvelles. Actuellement, il est encore possible de réserver aux anciens tarifs. +{{% /update %}} [^1]: [Rail Delivery Group News](https://www.raildeliverygroup.com/rst/stop-press.html#Surchares) diff --git a/i18n/de.yaml b/i18n/de.yaml index 4d34eba30..0da226c22 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -208,6 +208,7 @@ news: all: Alle News further: Weitere News headline: Was gibt's Neues? + updated: Aktualisiert am operators: descriptionTemplate: >- Informationen über die FIP-Bedingungen bei %s: Gültigkeit, Ticket- und diff --git a/i18n/en.yaml b/i18n/en.yaml index 976af2d84..1c0a75bf9 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -204,6 +204,7 @@ news: all: All News further: Other News headline: What's new? + updated: Updated on operators: descriptionTemplate: >- Information about FIP conditions at %s: validity, ticket and reservation diff --git a/i18n/fr.yaml b/i18n/fr.yaml index 2139514c5..959d7ee03 100644 --- a/i18n/fr.yaml +++ b/i18n/fr.yaml @@ -213,6 +213,7 @@ news: all: Toutes les actualités further: Autres actualités headline: Quoi de neuf ? + updated: Mis à jour le operators: descriptionTemplate: >- Informations sur les conditions FIP chez %s : Validité, Achat de billets et diff --git a/layouts/news/single.html b/layouts/news/single.html index ebbfb18c9..8feed8597 100644 --- a/layouts/news/single.html +++ b/layouts/news/single.html @@ -20,7 +20,7 @@ {{ .Date | time.Format ":date_long" }} {{- with .Params.updated }} - {{ partial "tag" (dict "Type" "info" "Icon" "update" "RawText" (. | time.Format ":date_long")) }} + {{ partial "tag" (dict "Type" "info" "RawText" (print (i18n "news.updated") " " (. | time.Format ":date_long"))) }} {{- end }}
{{ end }} diff --git a/layouts/partials/related.html b/layouts/partials/related.html index 8a77c6e75..02aa7888a 100644 --- a/layouts/partials/related.html +++ b/layouts/partials/related.html @@ -42,7 +42,7 @@ >{{ .Date | time.Format ":date_long" }} {{- with .Params.updated }} - {{ partial "tag" (dict "Type" "info" "Icon" "update" "RawText" (. | time.Format ":date_long")) }} + {{ partial "tag" (dict "Type" "info" "RawText" (print (i18n "news.updated") " " (. | time.Format ":date_long"))) }} {{- end }} {{ end }} diff --git a/layouts/partials/tag.html b/layouts/partials/tag.html index 755f1b87e..98f6d4be4 100644 --- a/layouts/partials/tag.html +++ b/layouts/partials/tag.html @@ -1,5 +1,5 @@ - {{ partial "icon" .Icon }} + {{ if .Icon }}{{ partial "icon" .Icon }}{{ end }} {{ if .RawText }}{{ .RawText }}{{ else }}{{ i18n .Text }}{{ end }} diff --git a/layouts/partials/teaser.html b/layouts/partials/teaser.html index 97e22e19f..0a8487afb 100644 --- a/layouts/partials/teaser.html +++ b/layouts/partials/teaser.html @@ -15,7 +15,7 @@ {{ if $listview }} diff --git a/layouts/partials/updateDate.html b/layouts/partials/updateDate.html index 520577d2a..8989fcd08 100644 --- a/layouts/partials/updateDate.html +++ b/layouts/partials/updateDate.html @@ -5,7 +5,7 @@
{{- with .Params.updated }} - {{ partial "tag" (dict "Type" "info" "Icon" "update" "RawText" (. | time.Format ":date_long")) }} + {{ partial "tag" (dict "Type" "info" "RawText" (print (i18n "news.updated") " " (. | time.Format ":date_long"))) }} {{- end }}
{{ else if .GitInfo }} diff --git a/layouts/shortcodes/update.html b/layouts/shortcodes/update.html new file mode 100644 index 000000000..f6400a7b4 --- /dev/null +++ b/layouts/shortcodes/update.html @@ -0,0 +1,10 @@ +{{ $date := .Get "date" | time.AsTime }} +
+
+ {{- partial "icon" "update" -}} + {{ T "news.updated" }} {{ $date | time.Format ":date_long" }} +
+
+ {{ .Inner }} +
+