diff --git a/content/events/2025/lettura-ada-zangemann-bergamo-tiraboschi/index.en.md b/content/events/2025/lettura-ada-zangemann-bergamo-tiraboschi/index.en.md index 57b108b..150fe15 100644 --- a/content/events/2025/lettura-ada-zangemann-bergamo-tiraboschi/index.en.md +++ b/content/events/2025/lettura-ada-zangemann-bergamo-tiraboschi/index.en.md @@ -54,7 +54,7 @@ The library does not have an internal car park. Click below on the openstreetmap 🪧 **Official poster** -![Official event poster](locandina-evento-2025-02-15.png) +{{< img src="locandina-evento-2025-02-15.png" alt="Official event poster" author="Tiraboschi Library" license-text="CC0" license-url="creativecommons.org/publicdomain/zero/1.0/deed.en" >}} [Also in PDF format](locandina-evento-2025-02-15.pdf) 📒 **Contacts** diff --git a/content/events/2025/lettura-ada-zangemann-bergamo-tiraboschi/index.it.md b/content/events/2025/lettura-ada-zangemann-bergamo-tiraboschi/index.it.md index 1a91395..86839e4 100644 --- a/content/events/2025/lettura-ada-zangemann-bergamo-tiraboschi/index.it.md +++ b/content/events/2025/lettura-ada-zangemann-bergamo-tiraboschi/index.it.md @@ -52,7 +52,7 @@ La biblioteca non dispone di un parcheggio interno. Clicca qui sotto la mappa di 🪧 **Locandina ufficiale** -![Locandina ufficiale dell'evento](locandina-evento-2025-02-15.png) +{{< img src="locandina-evento-2025-02-15.png" alt="Locandina ufficiale dell'evento" author="Biblioteca Tiraboschi" license-text="CC0" license-url="creativecommons.org/publicdomain/zero/1.0/deed.it" >}} [Anche in formato PDF](locandina-evento-2025-02-15.pdf) 📒 **Contatti** diff --git a/i18n/en.yaml b/i18n/en.yaml index 77de4f7..1b68c31 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -11,3 +11,5 @@ come_and_see_us: Come and see us where: Where more_tags: "...more" editions: Editions +source: Source +author: Author \ No newline at end of file diff --git a/i18n/it.yaml b/i18n/it.yaml index 46104af..e75651e 100644 --- a/i18n/it.yaml +++ b/i18n/it.yaml @@ -11,3 +11,5 @@ come_and_see_us: Vieni a trovarci where: Dove siamo more_tags: "...altro" editions: Edizioni +source: Fonte +author: Autore \ No newline at end of file diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html new file mode 100644 index 0000000..332cd1c --- /dev/null +++ b/layouts/shortcodes/img.html @@ -0,0 +1,26 @@ +
+ + {{- $imgsrc := .Page.Resources.GetMatch (.Get "src") -}} + {{ .Get + +
+ {{ if strings.HasPrefix (.Get "source") "http" }} + 🛈 {{ T "source" }}: {{ .Get "source" }} + {{ else if ne (.Get "source") "" }} + 🛈 {{ T "source" }}: {{ .Get "source" }} + {{ end }} + + {{ if ne (.Get "author") "" }} + 🧑‍🎨 {{ T "author" }}: {{ .Get "author" }} + {{ end }} + + + {{ if ne (.Get "license-text") "" }} + {{ if strings.HasPrefix (.Get "license-url") "http" }} + 📄 {{ T "license" }}: {{ .Get "license-text" }} + {{ else }} + 📄 {{ T "license" }}: {{ .Get "license-text" }} + {{ end }} + {{ end }} +
+
\ No newline at end of file