From 8f3f58e3010fa7c923b77b7d2050175890b58f9b Mon Sep 17 00:00:00 2001 From: erdgeist Date: Tue, 21 Jul 2026 23:17:56 +0200 Subject: Render PDF headlines as document cards, not lightbox images A starred PDF previously ran through the same crop-and-lightbox path a photo does -- exactly the awkward treatment explicit headline designation was meant to avoid. _headline_image.html.erb now branches on @headline_asset.pdf?: a PDF renders as a linked card (a :medium thumbnail, a file icon, its name), no gallery participation at all. The existing image-headline and gallery-fallback logic is otherwise unchanged, now scoped to an image-specific headline only. Other attached PDFs -- headlined or not -- list below as plain links, same reasoning as why non-headline photos still get a gallery trigger: an attached document shouldn't go invisible just because nothing's been starred yet. headline_image's own render guard needed widening to cover a page with PDFs attached but no images and no headline at all -- the one case none of the existing conditions accounted for. --- config/locales/de.yml | 2 ++ config/locales/en.yml | 2 ++ 2 files changed, 4 insertions(+) (limited to 'config') diff --git a/config/locales/de.yml b/config/locales/de.yml index 21c8ebf8..dd22cef7 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -130,3 +130,5 @@ de: photo: "Foto %{name}" by: "von %{creator}" licensed_under: "Lizenziert unter %{license}" + + related_documents: "Weitere Dokumente" diff --git a/config/locales/en.yml b/config/locales/en.yml index 1afcf219..9be01524 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -82,3 +82,5 @@ en: photo: "Photo %{name}" by: "by %{creator}" licensed_under: "Licensed under %{license}" + + related_documents: "Related documents" -- cgit v1.3