summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-21 23:17:56 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-21 23:17:56 +0200
commit8f3f58e3010fa7c923b77b7d2050175890b58f9b (patch)
treeece76f69129b8b6c3c59b0b71f69e9fc59950d30 /public
parent18114a978b7c037da5194c48f860435e261f9a0b (diff)
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.
Diffstat (limited to 'public')
-rw-r--r--public/stylesheets/ccc.css57
1 files changed, 57 insertions, 0 deletions
diff --git a/public/stylesheets/ccc.css b/public/stylesheets/ccc.css
index 9654594..91f7a06 100644
--- a/public/stylesheets/ccc.css
+++ b/public/stylesheets/ccc.css
@@ -775,3 +775,60 @@ div.teaser_ruler {
775.glightbox-clean .gslide-desc { 775.glightbox-clean .gslide-desc {
776 color: CanvasText !important; 776 color: CanvasText !important;
777} 777}
778
779.headline_document_card {
780 display: flex;
781 gap: 1rem;
782 align-items: flex-start;
783 border: 1px solid color-mix(in srgb, CanvasText, #808080 25%);
784 border-radius: 6px;
785 padding: 1rem;
786 text-decoration: none;
787 color: inherit;
788}
789
790.headline_document_card:hover {
791 border-color: CanvasText;
792}
793
794.headline_document_card_thumb {
795 max-width: 120px;
796 max-height: 160px;
797 border: 1px solid color-mix(in srgb, CanvasText, #808080 25%);
798 flex-shrink: 0;
799}
800
801.headline_document_card_info {
802 display: flex;
803 align-items: center;
804 gap: 0.5rem;
805}
806
807.headline_document_card_title {
808 font-weight: bold;
809}
810
811.related_documents {
812 margin-top: 1rem;
813}
814
815.related_documents_label {
816 font-style: italic;
817 font-family: Georgia;
818 font-size: 0.9rem;
819 color: color-mix(in srgb, CanvasText, #808080);
820 margin-bottom: 0.3rem;
821}
822
823.related_documents_list {
824 list-style: none;
825 padding: 0;
826 margin: 0;
827}
828
829.related_document_link {
830 display: inline-flex;
831 align-items: center;
832 gap: 0.4rem;
833 text-decoration: none;
834}