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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
|
cat <<END
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>${render_title_html}</title>
<link rel="icon" href="${render_backhref_html}/favicon.ico" type="image/x-icon">
<style>
body {
background-color: #000000;
color: #ffffff;
background-image: url("${render_backhref_css}/${render_blurs_dir_css}/${render_background_image_css}");
background-size: cover;
background-repeat: no-repeat;
text-align: center;
font-family: verdana, sans-serif;
/* No default page gutter: gives the thumbnail grid the full window
width, and makes the gap above the header / below the footer the
same 2px as the gaps between the header, grid and footer. */
margin: 0;
/* The slam/glitch entry animations translate elements by +/-80vw;
clip the horizontal overflow so a phone never scrolls sideways. */
overflow-x: hidden;
}
a {
color: #ffffff;
}
a.arrow {
text-decoration: none;
font-weight: bolder;
}
div.header {
background-color: #000000;
border: 3px solid #ffffff;
padding: 3px;
margin-top: 2px;
margin-bottom: 2px;
}
div.footer, div.navigator {
background-color: #000000;
border: 3px solid #ffffff;
padding: 3px;
max-width: 400px;
margin: 2px auto;
}
div.details-panel {
background-color: #000000;
border: 3px solid #ffffff;
flex: 1 1 34%;
max-width: 900px;
padding: 10px;
text-align: left;
}
div.details-layout {
align-items: flex-start;
display: flex;
gap: 12px;
justify-content: center;
margin: 0 auto;
max-width: 98vw;
}
div.details-photo-column {
flex: 1 1 62%;
min-width: 0;
}
a.details-photo-link {
display: block;
}
div.details-navigator {
margin-left: auto;
margin-right: auto;
}
div.details-panel h1 {
font-size: 1.1em;
margin-top: 0;
text-align: center;
}
table.details {
border-collapse: collapse;
width: 100%;
}
table.details th,
table.details td {
border-top: 1px solid #ffffff;
padding: 4px;
text-align: left;
vertical-align: top;
word-break: break-word;
}
table.details th {
white-space: nowrap;
}
div.stats {
margin: 0 auto;
max-width: 900px;
padding: 0 12px;
text-align: left;
}
h1.stats-title {
margin-bottom: 12px;
text-align: center;
}
/* Give the "Back to album/stats" link room before the first section. */
div.stats-back {
margin-bottom: 16px;
}
section.stats-section {
background-color: #000000;
border: 3px solid #ffffff;
margin: 16px auto;
padding: 14px 16px;
}
section.stats-section h2 {
font-size: 1.1em;
margin-top: 0;
margin-bottom: 12px;
}
/* Each bar row is a label, a proportional bar, and the count/percent.
Bars are pure CSS (width as a percentage of the top bucket) so the
page stays static HTML with no JavaScript or SVG. */
ul.stats-bars {
list-style: none;
margin: 0;
padding: 0;
}
ul.stats-bars li {
align-items: center;
display: flex;
gap: 10px;
margin: 4px 0;
}
/* The camera leaderboard labels are long, EXIF-derived names that wrap,
so give each row extra vertical padding and a separator line to make
the boundary between cameras clear. */
ul.stats-leaderboard li {
border-bottom: 1px solid #444444;
padding: 8px 0;
}
ul.stats-leaderboard li:last-child {
border-bottom: none;
}
span.stats-label {
flex: 0 0 9em;
word-break: break-word;
}
span.stats-bar-track {
background-color: #222222;
flex: 1 1 auto;
height: 1.1em;
}
span.stats-bar-fill {
background-color: #ffffff;
display: block;
height: 100%;
}
span.stats-count {
flex: 0 0 7em;
text-align: right;
white-space: nowrap;
}
img {
padding: 5px;
}
img.thumb {
width: 100%;
height: 100%;
object-fit: cover;
vertical-align: top;
}
/* The album overview is a CSS grid with a FIXED column count chosen by
width breakpoints (not auto-fill). The counts are 2 / 3 / 4 / 6 -- all
divisors of 12 -- so a page whose tile-cell total is a multiple of 12
(the generator guarantees this, see append_preview_grid) forms a
COMPLETE rectangle at every breakpoint: no ragged, cut-off last row at
any window width. Columns are 1fr, so the thumbnails grow to fill the
full window width instead of leaving margins. Each 1x1 grid item is
kept square with aspect-ratio; a "feature" tile spans a 2x2 block (a
large hero image) and a subdivided tile packs several smaller
thumbnails into one cell. grid-auto-flow: dense lets the smaller tiles
backfill the holes a 2x2 feature would otherwise leave. Spacing comes
from the grid gap, so images carry no padding. Mobile-first: the base
rule is the 2-column phone layout; min-width breakpoints widen it. */
div.thumbs-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-auto-flow: dense;
gap: 10px;
margin: 0 4px;
}
@media (min-width: 700px) {
div.thumbs-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
div.thumbs-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1600px) {
div.thumbs-grid { grid-template-columns: repeat(6, 1fr); }
}
div.thumbs-grid img {
padding: 0;
}
/* Keep every top-level grid item square: a normal thumbnail and a
subdivided tile each occupy one square cell. */
div.thumbs-grid > a,
div.thumbs-grid > div.tile {
aspect-ratio: 1 / 1;
}
/* A feature tile: one photo blown up to span a 2x2 block of the grid
(its area is square because the rows are square). It reuses the normal
img.thumb class and its hover, the image filling the larger area. */
div.thumbs-grid a.feature {
grid-column: span 2;
grid-row: span 2;
}
/* A "fill-row" tile spans the whole row at ANY column count
(grid-column: 1 / -1). Used for the single leftover photo on the
album's short final page so the bottom edge stays flush at every
breakpoint instead of an orphaned corner; object-fit: cover crops it
to the wide banner shape without distortion. */
div.thumbs-grid a.fill-row {
grid-column: 1 / -1;
aspect-ratio: 3 / 1;
}
/* A subdivided thumbnail tile fills one grid cell with its own 2x2 inner
grid packing several smaller thumbnails. Anchor order + the "wide"
class (a full-width strip spanning both columns) produce the quad /
two-wide / squares+wide layouts via grid auto-placement. */
div.tile {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
gap: 4px;
}
div.tile a {
display: block;
min-width: 0;
min-height: 0;
}
div.tile a.wide {
grid-column: span 2;
}
/* Raise whichever grid item is hovered (a normal/feature anchor, a whole
subdivided tile, or a single popping sub-thumbnail) above its
neighbours, so its scaled/rotated hover effect is painted on top of
the adjacent cells instead of under them. */
div.thumbs-grid a:hover,
div.thumbs-grid div.tile:hover {
position: relative;
z-index: 2;
}
img.subthumb {
width: 100%;
height: 100%;
object-fit: cover;
padding: 0;
display: block;
}
/* Camera filter page grid: separate from the back link and let the
thumbnails (which already carry their own padding) breathe a little. */
div.camera-thumbs {
margin-top: 12px;
}
/* Sub-thumbnails and feature tiles get the same dramatic hover as the
full square thumbs (mirror flip, scale-up, rotate, contrast/saturate
boost, and a switch to object-fit:contain) so every tile feels lively. */
img.thumb:hover,
img.subthumb:hover {
outline: 4px solid #ffffff;
-webkit-transform: scaleX(-1);
transform: scaleX(-1) scale(1.08) rotate(2deg);
filter: contrast(1.6) saturate(1.8);
object-fit: contain;
}
img.view {
max-height: ${render_height_html}px;
width: 95%;
height: 80%;
object-fit: contain;
}
div.details-layout img.details-photo {
height: auto;
max-height: min(${render_height_html}px, 85vh);
max-width: 100%;
width: auto;
}
.animate-none{}
.animate-fading {animation:fading 10s}@keyframes fading{0%{opacity:0}50%{opacity:1}100%{opacity:0}}
.animate-opacity-slow {animation:opac 2.0s}@keyframes opac{from{opacity:0} to{opacity:1}}
.animate-top-slow {position:relative;animation:animatetop 2.0s}@keyframes animatetop{from{top:-300px;opacity:0} to{top:0;opacity:1}}
.animate-left-slow {position:relative;animation:animateleft 2.0s}@keyframes animateleft{from{left:-300px;opacity:0} to{left:0;opacity:1}}
.animate-right-slow {position:relative;animation:animateright 2.0s}@keyframes animateright{from{right:-300px;opacity:0} to{right:0;opacity:1}}
.animate-bottom-slow {position:relative;animation:animatebottom 2.0s}@keyframes animatebottom{from{bottom:-300px;opacity:0} to{bottom:0;opacity:1}}
.animate-zoom-slow {animation:animatezoom 2.0s}@keyframes animatezoom{from{transform:scale(0)} to{transform:scale(1)}}
.animate-opacity-fast {animation:opac 0.5s}@keyframes opac{from{opacity:0} to{opacity:1}}
.animate-top-fast {position:relative;animation:animatetop 0.5s}@keyframes animatetop{from{top:-300px;opacity:0} to{top:0;opacity:1}}
.animate-left-fast {position:relative;animation:animateleft 0.5s}@keyframes animateleft{from{left:-300px;opacity:0} to{left:0;opacity:1}}
.animate-right-fast {position:relative;animation:animateright 0.5s}@keyframes animateright{from{right:-300px;opacity:0} to{right:0;opacity:1}}
.animate-bottom-fast {position:relative;animation:animatebottom 0.5s}@keyframes animatebottom{from{bottom:-300px;opacity:0} to{bottom:0;opacity:1}}
.animate-zoom-fast {animation:animatezoom 0.5s}@keyframes animatezoom{from{transform:scale(0)} to{transform:scale(1)}}
.animate-snap-rotate-slow {animation:snaprotate 0.65s steps(2,end)}
.animate-snap-rotate-fast {animation:snaprotate 0.22s steps(2,end)}
@keyframes snaprotate{0%{opacity:0;transform:rotate(-32deg) scale(.6)}50%{opacity:1;transform:rotate(18deg) scale(1.15)}100%{transform:rotate(0) scale(1)}}
.animate-hard-zoom-slow {animation:hardzoom 0.55s steps(3,end)}
.animate-hard-zoom-fast {animation:hardzoom 0.18s steps(2,end)}
@keyframes hardzoom{0%{opacity:0;transform:scale(.15)}65%{opacity:1;transform:scale(1.35)}100%{transform:scale(1)}}
.animate-slam-left-slow {animation:slamleft 0.55s steps(3,end)}
.animate-slam-left-fast {animation:slamleft 0.18s steps(2,end)}
@keyframes slamleft{0%{opacity:0;transform:translateX(-80vw)}70%{opacity:1;transform:translateX(24px)}100%{transform:translateX(0)}}
.animate-slam-right-slow {animation:slamright 0.55s steps(3,end)}
.animate-slam-right-fast {animation:slamright 0.18s steps(2,end)}
@keyframes slamright{0%{opacity:0;transform:translateX(80vw)}70%{opacity:1;transform:translateX(-24px)}100%{transform:translateX(0)}}
.animate-flash-in-slow {animation:flashin 0.5s steps(2,end)}
.animate-flash-in-fast {animation:flashin 0.16s steps(2,end)}
@keyframes flashin{0%{opacity:0;filter:brightness(5) contrast(3)}40%{opacity:1;filter:brightness(7) contrast(4)}100%{filter:none}}
.animate-invert-pop-slow {animation:invertpop 0.55s steps(3,end)}
.animate-invert-pop-fast {animation:invertpop 0.18s steps(2,end)}
@keyframes invertpop{0%{opacity:0;filter:invert(1)}50%{opacity:1;filter:invert(1) saturate(2)}100%{filter:none}}
.animate-posterize-pop-slow {animation:posterizepop 0.55s steps(3,end)}
.animate-posterize-pop-fast {animation:posterizepop 0.18s steps(2,end)}
@keyframes posterizepop{0%{opacity:0;filter:contrast(5) saturate(0)}55%{opacity:1;filter:contrast(4) saturate(4)}100%{filter:none}}
.animate-skew-snap-slow {animation:skewsnap 0.55s steps(3,end)}
.animate-skew-snap-fast {animation:skewsnap 0.18s steps(2,end)}
@keyframes skewsnap{0%{opacity:0;transform:skewX(-24deg) translateY(-40px)}65%{opacity:1;transform:skewX(18deg) translateY(18px)}100%{transform:skewX(0) translateY(0)}}
.animate-glitch-step-slow {animation:glitchstep 0.65s steps(4,end)}
.animate-glitch-step-fast {animation:glitchstep 0.2s steps(4,end)}
@keyframes glitchstep{0%{opacity:0;transform:translate(-22px,12px);filter:hue-rotate(90deg)}25%{opacity:1;transform:translate(18px,-10px);filter:invert(1)}50%{transform:translate(-12px,-8px);filter:contrast(4)}75%{transform:translate(8px,6px);filter:saturate(4)}100%{transform:translate(0,0);filter:none}}
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
@media (max-width: 900px) {
div.details-layout {
align-items: center;
flex-direction: column;
}
div.details-panel {
box-sizing: border-box;
width: 95%;
}
div.details-photo-column {
width: 95%;
}
}
/* Phone layout: the base rule already gives a 2-column grid; here we just
tighten the gap/margin, and the navigator/footer/splash links become
large, well-spaced tap targets (~44px). Pure CSS. */
@media (max-width: 700px) {
div.thumbs-grid {
gap: 6px;
margin: 0 2px;
}
div.navigator {
display: flex;
flex-wrap: wrap;
gap: 8px;
justify-content: center;
align-items: center;
}
div.navigator a,
div.footer a {
display: inline-block;
padding: 12px 16px;
border: 2px solid #ffffff;
border-radius: 8px;
font-size: 1.1em;
text-decoration: none;
}
div.navigator a.arrow {
padding: 10px 18px;
font-size: 1.4em;
}
/* Hide the "|" separators (wrapped in spans) so the links read as
discrete buttons on a phone; they stay visible on desktop. */
div.navigator span.nav-sep {
display: none;
}
p.enter a {
padding: 14px 24px;
font-size: 1.3em;
}
}
</style>
</head>
<body>
END
if [ "${render_show_header_bar}" = 'yes' ]; then
cat <<END
<div class="header animate-opacity">
Site generated at ${render_current_date_text} with <a href="${render_source_url_html}">${render_source_url_html#*://}</a>
-
© by Paul Buetow
END
# The Stats nav link is only shown when the stats page was actually generated
# (STATS_PAGE=yes); otherwise it would point at a missing stats.html.
if [ "${render_stats_page_html}" = 'yes' ]; then
cat <<END
-
<a href="${render_backhref_html}/stats/index.html">Stats</a>
END
fi
cat <<END
</div>
END
fi
|