summaryrefslogtreecommitdiff
path: root/share/templates/default/header.tmpl
blob: cf78513664a2cdc46144c900429d6cec38a8dd74 (plain)
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
cat <<END
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <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;
        }

        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 {
            height: ${render_thumbheight_html}px;
            width: ${render_thumbheight_html}px;
            object-fit: cover;
            vertical-align: top;
        }

        /* The album overview is a CSS grid of fixed THUMBHEIGHT cells. A normal
           thumbnail fills one cell, a subdivided tile packs several smaller
           thumbnails into one cell, and a "feature" tile spans a 2x2 block (a
           large hero image). grid-auto-flow: dense lets the smaller tiles
           backfill the holes a 2x2 feature would otherwise leave, keeping the
           grid tightly packed. Spacing comes from the grid gap, so images carry
           no padding inside the grid. */
        div.thumbs-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, ${render_thumbheight_html}px);
            grid-auto-rows: ${render_thumbheight_html}px;
            grid-auto-flow: dense;
            gap: 10px;
            justify-content: center;
            margin: 0 auto;
        }

        div.thumbs-grid img {
            padding: 0;
        }

        /* A feature tile: one photo blown up to span a 2x2 block of the grid. It
           reuses the normal img.thumb class (and its hover) but stretches the
           image to fill the larger 2x2 area. */
        div.thumbs-grid a.feature {
            grid-column: span 2;
            grid-row: span 2;
        }

        div.thumbs-grid a.feature img.thumb {
            width: 100%;
            height: 100%;
        }

        /* 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;
            width: 100%;
            height: 100%;
        }

        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%;
            }
        }
    </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>
    -
    &copy; 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