stile + template + qrcode

This commit is contained in:
romo 2023-10-16 18:35:45 +02:00
parent 3d399c0f7e
commit 3ce3573f84
4 changed files with 116 additions and 70 deletions

View file

@ -1,61 +1,76 @@
body { body {
border: 1px solid yellow; 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"; 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; color: #c9d1d9;
background: #0d1117; background: #0d1117;
} }
.event { h1, h2, h3 {
background-color: #1e1e1e; line-height: 1.2;
border-radius: 5mm 5mm 0 0;
} }
.event_info > h3.title { h1 {
margin-top: 2mm; margin: 0 0 .2em;
margin-left: 3mm; color: #ff6e40;
font-size: 20mm;
}
h3 {
margin-top: 0;
margin-bottom: .2em;
color: #ff6e40;
} }
.intestazione { .intestazione {
border: 1px solid black; padding: 1.5rem;
height: 10%; display: grid;
width: 90%; grid-template-columns: auto auto auto;
margin-bottom: 1.5rem;
} }
.logo,
.titolo > h1 { .qrcode {
font-size: 35mm; display: flex;
margin-top: -22px; align-items: center;
height: 100%;
} }
.qrcode {
.subtitle { justify-content: flex-end;
margin-top: -50px;
} }
.logo img,
.event { .qrcode img {
border: 1px solid black; width: 25%;
o}
.center {
display: flex;
flex-direction: column;
align-items: center;
} }
#events { #events {
width: 99%; display: grid;
height: 90%; grid-template-columns: auto auto auto;
display: grid; grid-gap: 1.5em;
grid-template-columns: auto auto auto; border: 1px dotted black;
grid-gap: 1em; padding-left: 24px;
border: 1px dotted black; padding-right: 24px;
}
.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 { .event_info svg {
height: 24px; height: 24px;
width: 24px; width: 24px;
fill: white; fill: white;
margin-right: 0.2em; margin-right: 0.2em;
} }
.title,
.flex,
.location {
margin: .5rem 1rem;
}
.center {
display: flex;
flex-direction: column;
align-items: center;
}
.flex,
.location { .location {
display: grid; display: grid;
grid-template-columns: auto auto; grid-template-columns: auto auto;
@ -65,24 +80,35 @@ o}
color: #ff6e40; color: #ff6e40;
} }
.flyer-container {
background: #0d1117;
}
.flyer { .flyer {
width: 100%; width: 100%;
object-fit: cover; object-fit: cover;
max-height: 50mm; max-height: 40mm;
border-radius: 4px 4px 0 0;
} }
h1,h2,h3 { footer {
line-height: 1.2; width: 100%;
padding: 1rem;
display: grid;
grid-template-columns: 66% 33%;
padding-left: 24px;
padding-right: 24px;
} }
.contacts {
h1 { padding-left: 24px;
margin: 0 0 .2em;
color: #ff6e40;
} }
.contacts span {
h3 { padding-right: 1rem;
margin-top: 0; }
margin-bottom: .2em; .contacts svg {
color: #ff6e40; width: 1rem;
fill:#c9d1d9;
}
.published {
text-align: right;
padding-right: 24px;
} }

BIN
static/qr-code.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

View file

@ -10,31 +10,50 @@
</head> </head>
<body class="A3 center"> <body class="A3 center">
<div class="intestazione"> <header class="intestazione">
<div class="logo">
<img src="https://balotta.org/logo.png" alt="">
</div>
<div class="titolo center"> <div class="titolo center">
<h1>Balotta</h1> <h1>Balotta</h1>
<div class="subtitle">Agenda condivisa per Bologna</div> <div class="subtitle">Agenda condivisa per Bologna</div>
</div> </div>
</div> <div class="qrcode">
<img src="{{ url_for('static', filename='qr-code.png') }}" alt="">
</div>
</header>
<div id="events"> <main id="events">
{% for event in events %} {% for event in events %}
<div class="event"> <div class="event">
<div class="event_info"> <div class="center flyer-container">
<h3 class="title">{{ event.title }}</h3> <img class="flyer" src="https://balotta.org/media/thumb/{{event.media[0].url}}" style="object-position: {{ event.media[0].thumbnailPosition }}"></img>
<div class="flex"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" class="v-icon__svg"><path d="M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1M17,12H12V17H17V12Z"></path></svg><span class="time">{{ event.when }}</span></div> </div>
<div class="location"> <div class="event_info">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" class="v-icon__svg"><path d="M12,11.5A2.5,2.5 0 0,1 9.5,9A2.5,2.5 0 0,1 12,6.5A2.5,2.5 0 0,1 14.5,9A2.5,2.5 0 0,1 12,11.5M12,2A7,7 0 0,0 5,9C5,14.25 12,22 12,22C12,22 19,14.25 19,9A7,7 0 0,0 12,2Z"></path> <h3 class="title">{{ event.title }}</h3>
<div class=""> <div class="flex"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" class="v-icon__svg"><path d="M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1M17,12H12V17H17V12Z"></path></svg><span class="time">{{ event.when }}</span></div>
</span><strong><span class="place_name">{{ event.place.name }}</span></strong> <div class="location">
</div> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" class="v-icon__svg"><path d="M12,11.5A2.5,2.5 0 0,1 9.5,9A2.5,2.5 0 0,1 12,6.5A2.5,2.5 0 0,1 14.5,9A2.5,2.5 0 0,1 12,11.5M12,2A7,7 0 0,0 5,9C5,14.25 12,22 12,22C12,22 19,14.25 19,9A7,7 0 0,0 12,2Z"></path>
<div class="">
<span class="place_name">{{ event.place.name }}</span>
</div> </div>
</div> </div>
<div class="center flyer-container"> </div>
<img class="flyer" src="https://balotta.org/media/thumb/{{event.media[0].url}}" style="object-position: {{ event.media[0].thumbnailPosition }}"></img>
</div>
</div> </div>
{% endfor %} {% endfor %}
</div> </main>
<footer>
<div class="contacts">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M575.8 255.5c0 18-15 32.1-32 32.1h-32l.7 160.2c0 2.7-.2 5.4-.5 8.1V472c0 22.1-17.9 40-40 40H456c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1H416 392c-22.1 0-40-17.9-40-40V448 384c0-17.7-14.3-32-32-32H256c-17.7 0-32 14.3-32 32v64 24c0 22.1-17.9 40-40 40H160 128.1c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2H104c-22.1 0-40-17.9-40-40V360c0-.9 0-1.9 .1-2.8V287.6H32c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"/></svg>
<span>https://balotta.org</span>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"/></svg>
info@balotta.org
</div>
<div class="published">
stampato il 16/10/23
</div>
</footer>
</body> </body>
</html> </html>

View file

@ -5,8 +5,9 @@
Scegli gli eventi che vuoi mettere nel volantino e premi genera. Scegli gli eventi che vuoi mettere nel volantino e premi genera.
Per stampare fai "File >> Stampa" Scegli come destinazione "Salva come PDF" e seleziona il giusto formato di carta (A3). Per stampare fai "File >> Stampa" Scegli come destinazione "Salva come PDF" e seleziona il giusto formato di carta (A3).
<br> <br>
Puoi selezionare solo 12 eventi, di più non entrano in un A3.
</div> </div>
<br>
<form action="/flyer" target="_blank"> <form action="/flyer" target="_blank">
{% for event in events %} {% for event in events %}
<input type="checkbox" {% if loop.index <= 12 %} checked {% endif %} id="{{event.id}}" name="events" value="{{event.id}}"> <input type="checkbox" {% if loop.index <= 12 %} checked {% endif %} id="{{event.id}}" name="events" value="{{event.id}}">