From f46e456b8f57bba13f154d7886aa880a8418b7b8 Mon Sep 17 00:00:00 2001 From: encrypt Date: Tue, 17 Oct 2023 00:01:50 +0200 Subject: [PATCH] aggiunto template con tiles asimmetrici --- static/flyers/asymmetric/paper.css | 50 +++++++++++ static/flyers/asymmetric/style.css | 138 +++++++++++++++++++++++++++++ templates/flyers/asymmetric.html | 86 ++++++++++++++++++ 3 files changed, 274 insertions(+) create mode 100644 static/flyers/asymmetric/paper.css create mode 100644 static/flyers/asymmetric/style.css create mode 100644 templates/flyers/asymmetric.html diff --git a/static/flyers/asymmetric/paper.css b/static/flyers/asymmetric/paper.css new file mode 100644 index 0000000..6547679 --- /dev/null +++ b/static/flyers/asymmetric/paper.css @@ -0,0 +1,50 @@ +@page { + margin: 0; +} +body { + margin: 0; + position: relative; + box-sizing: border-box; + page-break-after: always; +} + +body.A3 { + width: 297mm; + height: 420mm; +} +body.A3.landscape .sheet { + width: 420mm; + height: 297mm; +} +body.A4 .sheet { + width: 210mm; + height: 297mm; +} +body.A4.landscape .sheet { + width: 297mm; + height: 210mm; +} +body.A5 .sheet { + width: 148mm; + height: 210mm; +} +body.A5.landscape .sheet { + width: 210mm; + height: 148mm; +} +body.letter .sheet { + width: 216mm; + height: 280mm; +} +body.letter.landscape .sheet { + width: 280mm; + height: 216mm; +} +body.legal .sheet { + width: 216mm; + height: 357mm; +} +body.legal.landscape .sheet { + width: 357mm; + height: 216mm; +} diff --git a/static/flyers/asymmetric/style.css b/static/flyers/asymmetric/style.css new file mode 100644 index 0000000..f723ee8 --- /dev/null +++ b/static/flyers/asymmetric/style.css @@ -0,0 +1,138 @@ +.eventcol { + display: flex; + flex-direction: column; + gap: 3mm; + height: fit-content; + /*! max-height: 350mm; */ + /*! height: ; */ +} + +.flyer-container { + max-height: fit-content; + min-content: 40mm; + max-content: 50mm; + border: 1px solid rgb(253, 140, 140); + overflow: auto; +} +.flyer { + object-fit: cover; + max-height: 150px; +} + + +body { + border: 1px solid yellow; + font: 18px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; + color: #c9d1d9; + background: #0d1117; +} + +h1, h2, h3 { + line-height: 1.2; +} + +h1 { + margin: 0 0 .2em; + color: #ff6e40; + font-size: 20mm; +} + +h3 { + margin-top: 0; + margin-bottom: .2em; + color: #ff6e40; +} + +.intestazione { + padding: 1.5rem; + display: grid; + grid-template-columns: auto auto auto; + margin-bottom: 1.5rem; +} +.logo, +.qrcode { + display: flex; + align-items: center; + height: 100%; +} +.qrcode { + justify-content: flex-end; +} +.logo img, +.qrcode img { + width: 25%; +} + +#events { + display: grid; + grid-template-columns: auto auto auto; + grid-gap: 1.5em; + border: 1px dotted black; + padding-left: 24px; + padding-right: 24px; + height: 350mm; +} +.event { + background-color: #1e1e1e; + border-radius: 4px; + box-shadow: 0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12); + +} + +.event_info svg { + height: 24px; + width: 24px; + fill: white; + margin-right: 0.2em; +} +.title, +.flex, +.location { + margin: .5rem 1rem; +} +.center { + display: flex; + flex-direction: column; + align-items: center; +} +.flex, +.location { + display: grid; + grid-template-columns: auto auto; + justify-content: start; +} +.place_name { + color: #ff6e40; +} + +.flyer-container { + background: #0d1117; +} +.flyer { + width: 100%; + object-fit: cover; + border-radius: 4px 4px 0 0; +} + +footer { + width: 100%; + padding: 1rem; + display: grid; + grid-template-columns: 66% 33%; + padding-left: 24px; + padding-right: 24px; +} +.contacts { + padding-left: 24px; +} +.contacts span { + padding-right: 1rem; +} +.contacts svg { + width: 1rem; + fill:#c9d1d9; +} +.published { + text-align: right; + padding-right: 24px; +} diff --git a/templates/flyers/asymmetric.html b/templates/flyers/asymmetric.html new file mode 100644 index 0000000..9b9c713 --- /dev/null +++ b/templates/flyers/asymmetric.html @@ -0,0 +1,86 @@ + + + + + Balotta - sito in manutenzione + + + + + + + +
+ +
+

Balotta

+
Agenda condivisa per Bolognano
+
+
+ +
+
+ +
+ {% for column in (0, 1, 2) %} +
+ {% for row in (0, 1, 2, 3) %} + {% set event = events[column+(3*row)] %} + +
+
+ +
+
+

{{ event.title }}

+
{{ event.when }}
+
+
+ {{ event.place.name }} +
+
+
+
+ {% endfor %} +
+ {% endfor %} +
+ + + + +