-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.html
More file actions
238 lines (219 loc) · 5.7 KB
/
Copy pathtemplate.html
File metadata and controls
238 lines (219 loc) · 5.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<style>
@page {
size: A4 {{ "landscape" if cards_per_page == 1 else "portrait" }};
margin: 0;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: system-ui, -apple-system, sans-serif;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
.page {
width: {{ "297mm" if cards_per_page == 1 else "210mm" }};
height: {{ "210mm" if cards_per_page == 1 else "297mm" }};
display: flex;
flex-direction: column;
page-break-after: always;
}
.page:last-child {
page-break-after: auto;
}
.card-wrapper {
width: 100%;
height: {{ (210 if cards_per_page == 1 else 297 / cards_per_page) | round(1) }}mm;
display: flex;
align-items: center;
justify-content: center;
padding: {{ [8, (16 // cards_per_page)] | min }}mm 10mm;
position: relative;
}
.card-wrapper:not(:last-child)::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 1px;
background: linear-gradient(
to right,
rgba(122, 158, 126, 0.5) 0mm,
rgba(122, 158, 126, 0.5) 6mm,
transparent 6mm,
transparent calc(100% - 6mm),
rgba(122, 158, 126, 0.5) calc(100% - 6mm),
rgba(122, 158, 126, 0.5) 100%
);
}
/* ── Cartón: sin borde exterior ── */
.card {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
gap: 3mm;
}
/* ── Cabecera sin recuadro ── */
.card-header {
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
gap: 1mm;
}
.card-header__pre {
font-family: system-ui, -apple-system, sans-serif;
font-size: 7pt;
text-transform: uppercase;
letter-spacing: 0.24em;
color: #6B6B6B;
}
.card-header__names {
font-family: Georgia, 'Times New Roman', serif;
font-size: 24pt;
font-weight: normal;
letter-spacing: -0.01em;
color: #2C2C2C;
line-height: 1;
display: flex;
align-items: center;
gap: 0.25em;
}
.card-header__amp {
font-size: 0.55em;
color: #7A9E7E;
line-height: 1;
}
.card-header__sub {
display: none;
}
/* ── Leyenda inferior ── */
.card-legend {
font-family: system-ui, -apple-system, sans-serif;
font-size: 6.5pt;
letter-spacing: 0.08em;
color: #9B9B9B;
font-style: italic;
text-align: center;
}
/* ── Área de filas ── */
.card-rows {
flex: 1;
display: grid;
grid-template-rows: 1fr 1fr;
gap: 4mm;
width: 100%;
min-height: 0;
}
/* ── Fila con borde ── */
.card-row {
display: grid;
grid-template-columns: repeat(5, 1fr);
border: 1.5px solid rgba(122, 158, 126, 0.5);
border-radius: 6px;
overflow: hidden;
min-height: 0;
}
/* ── Celda base ── */
.cell {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 4mm 3mm;
text-align: center;
min-height: 0;
border-right: 1px solid rgba(122, 158, 126, 0.25);
}
.cell:last-child {
border-right: none;
}
/* ── Celda de canción ── */
.cell-song .artist {
font-size: 7.5pt;
font-weight: 600;
color: #6B6B6B;
text-transform: uppercase;
letter-spacing: 0.4px;
margin-bottom: 2mm;
line-height: 1.2;
}
.cell-song .title {
font-family: Georgia, 'Times New Roman', serif;
font-size: 15pt;
font-weight: normal;
color: #2C2C2C;
line-height: 1.3;
}
.cell-song .song-index {
position: absolute;
top: 2mm;
right: 2.5mm;
font-size: 7.5pt;
font-family: Georgia, 'Times New Roman', serif;
color: #BBBBBB;
line-height: 1;
}
/* ── Celda de relleno ── */
.cell-filler {
font-family: Georgia, 'Times New Roman', serif;
font-size: 32pt;
color: rgba(122, 158, 126, 0.35);
font-weight: normal;
}
</style>
</head>
<body>
{% for page in pages %}
<div class="page">
{% for card in page.cards %}
{% if card is not none %}
<div class="card-wrapper">
<div class="card">
<div class="card-header">
<p class="card-header__pre">Bingo musical</p>
<h1 class="card-header__names">
<span>Marta</span>
<span class="card-header__amp">&</span>
<span>Dani</span>
</h1>
<p class="card-header__sub">Pon la pegatina en el recuadro de cada canción cuando suene</p>
</div>
<div class="card-rows">
{% for row in card %}
<div class="card-row">
{% for cell in row %}
{% if cell.type == 'song' %}
<div class="cell cell-song">
<span class="song-index">#{{ cell.index }}</span>
<span class="artist">{{ cell.artist }}</span>
<span class="title">{{ cell.title }}</span>
</div>
{% else %}
<div class="cell cell-filler">
<span>&</span>
</div>
{% endif %}
{% endfor %}
</div>
{% endfor %}
</div>
<p class="card-legend">Pon la pegatina en el recuadro de cada canción cuando suene</p>
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% endfor %}
</body>
</html>