syncova-folio/server/demo/nachtkauf.js
Jerrit Fritzsche 6255fc4845
All checks were successful
Docker-Image veröffentlichen / publish (push) Successful in 4m8s
Syncova. Folio mit Docker-Publishing einrichten
2026-11-26 03:51:13 +01:00

174 lines
12 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { makeBlock, makePage } from '../../shared/magazine.js';
export const nightAssets = {
atrium: 'Nächtliches Atrium mit leuchtendem Ring', chromlampe: 'Chromlampe Liquid No. 04',
nylonjacke: 'Matt schwarze Nylonjacke im Neonschein', kirschtarte: 'Kirschtarte auf poliertem Silber',
satintasche: 'Violette Satintasche mit Bügel', aperitif: 'Chartreusefarbener Aperitif im Stielglas',
rolltreppen: 'Rolltreppen in einem schwach beleuchteten Kaufhaus', parfum: 'Kobaltblaue Parfumflakons auf Wasser',
spiegelsaal: 'Spiegelsaal mit dunklen Kugelleuchten', film: 'NACHTKAUF · Sechs Sekunden nach Ladenschluss',
};
const acid = '#e3fa44';
const black = '#10110e';
const white = '#f7f5ea';
const lilac = '#d0b9ff';
const blue = '#231bbb';
const red = '#aa1423';
function item(type, x, y, width, height, properties = {}, appearance, angle = 0) {
return { ...makeBlock(type), ...properties, frame: { x, y, width, height, angle }, ...(appearance && { appearance }) };
}
function text(value, x, y, width, height, options = {}) {
const { color, size = 28, font = 'sans', weight = 400, leading = 1.17, tracking = 0, align = 'left', angle = 0 } = options;
return item('text', x, y, width, height, { text: value, align, style: 'body' }, { color, fontSize: size, font, weight, leading, tracking }, angle);
}
const label = (value, x, y, width, color) => text(value, x, y, width, 35, { size: 17, color, font: 'mono', weight: 700, tracking: 1.8 });
const headline = (value, x, y, width, height, color, size = 112, options = {}) => text(value, x, y, width, height, { size, color, weight: 900, leading: .89, tracking: -6, ...options });
const box = (color, x, y, width, height, options = {}) => item('shape', x, y, width, height, { shape: options.shape || 'rectangle' }, { fill: color, ...options.paint }, options.angle);
const line = (color, x, y, width) => box(color, x, y, width, 12, { shape: 'line' });
const html = (markup, x, y, width, height) => item('html', x, y, width, height, { markup });
const page = (title, background, color, blocks) => ({ ...makePage(title), background, color, blocks });
export function nightkaufDraft(media, online) {
const photo = (name, x, y, width, height, options = {}) => item('image', x, y, width, height, { mediaId: media[name], alt: nightAssets[name] }, { fit: 'cover', position: options.position || 'center', radius: options.radius, opacity: options.opacity }, options.angle);
const footer = (number, color) => [line(color, 45, 1045, 704), label('NACHTKAUF / 23:59', 45, 1066, 383, color), label(`SEITE ${number}`, 644, 1066, 120, color)];
return {
title: 'NACHTKAUF', issue: '23:59 · Das Kaufhaus nach Ladenschluss',
description: 'Ein fiktives Nachtkaufhaus in zwölf Seiten. Mode, Objekte und ein Abend, der um 23:59 erst beginnt.', cover: media.atrium,
pages: [
page('Cover · 23:59', black, white, [
photo('atrium', 0, 0, 794, 1122),
box(black, 0, 0, 794, 245, { paint: { opacity: 73 } }),
line(acid, 46, 42, 702), label('JOURNAL 01 / NUR BEI NACHT', 46, 63, 590, acid),
headline('NACHTKAUF', 41, 107, 725, 145, acid, 112, { tracking: -8 }),
box(acid, 544, 835, 186, 128, { shape: 'ellipse', angle: -12 }),
text('23:59', 562, 870, 148, 52, { color: black, size: 38, tracking: -1, weight: 900, align: 'center', angle: -12 }),
box(black, 0, 976, 794, 146, { paint: { opacity: 81 } }),
text('DAS KAUFHAUS NACH LADENSCHLUSS.', 48, 1008, 670, 57, { color: white, size: 32, weight: 800, tracking: -1.2 }),
label('MODE / OBJEKTE / BAR / DUFT', 49, 1064, 688, acid),
]),
page('Willkommen nach Ladenschluss', acid, black, [
label('EDITORIAL', 45, 48, 300, black),
headline('DIE NACHT\nIST OFFEN.', 42, 129, 718, 251, black, 106, { tracking: -7 }),
photo('rolltreppen', 86, 437, 614, 404, { angle: -5 }),
box(lilac, 490, 721, 226, 92, { angle: 9 }),
label('AB 23:59', 535, 752, 195, black),
text('Das Licht ist runtergedimmt, die Rolltreppen laufen noch. Ein Kaufhaus für Dinge, die im Tageslicht zu laut wären.', 51, 875, 681, 128, { size: 28, font: 'serif', leading: 1.25 }),
...footer('02', black),
]),
page('Etagenplan · Drei Stockwerke', blue, white, [
label('ORIENTIERUNG IM HAUS', 46, 49, 500, lilac),
headline('WAS WO\nPASSIERT.', 43, 119, 711, 252, white, 115),
box(lilac, 44, 409, 703, 490),
html(`<style>
body{background:#d0b9ff;color:#191622;font-family:Arial,sans-serif;padding:4vw}
table{width:100%;border-collapse:collapse} caption{text-align:left;font:bold 2.8vw monospace;padding:1vw 0 4vw}
td{padding:3.6vw 1.4vw;border-top:.3vw solid #191622;font-size:3.25vw;vertical-align:top}
strong{display:block;font-size:5.1vw;line-height:1.04;letter-spacing:-.08em} td:first-child{width:18%;font:700 3.5vw monospace}
td:last-child{text-align:right;font:700 2.65vw monospace;white-space:nowrap} small{display:block;margin-top:1vw}
</style><table><caption>ETAGEN / ROUTE</caption><tbody>
<tr><td>02</td><td><strong>Bar & Duft</strong><small>Rouge, Nachtbar und Blue Noise.</small></td><td>S. 07–10</td></tr>
<tr><td>01</td><td><strong>Mode & Editionen</strong><small>After Hours und Mondseide.</small></td><td>S. 05–06</td></tr>
<tr><td>00</td><td><strong>Objekte</strong><small>Das Atelier für Licht und Metall.</small></td><td>S. 04</td></tr>
</tbody></table>`, 44, 409, 703, 490),
text('Erst nach oben. Dann der Neugier nach.', 45, 926, 680, 60, { size: 33, color: white, font: 'serif' }),
...footer('03', lilac),
]),
page('Objekte · Liquid No. 04', white, black, [
photo('chromlampe', 0, 280, 794, 515),
label('LICHTOBJEKT / 00', 44, 49, 473, black),
headline('LIQUID', 34, 119, 684, 183, black, 150, { tracking: -10 }),
box(acid, 484, 672, 248, 130, { angle: -6 }),
headline('340 €', 513, 709, 210, 78, black, 53, { tracking: -3, angle: -6 }),
text('No. 04 / Tischleuchte', 45, 828, 682, 60, { size: 43, font: 'serif', tracking: -1.8 }),
text('Polierter Metallguss, warmes Licht. Eine Leuchte, die selbst ausgeschaltet etwas im Raum verändert.', 46, 904, 689, 97, { size: 24, leading: 1.35 }),
...footer('04', black),
]),
page('Mode · After Hours', black, white, [
photo('nylonjacke', 0, 0, 794, 805, { position: 'right' }),
box(black, 0, 0, 794, 162, { paint: { opacity: 55 } }),
label('MODE / 01 / NACHTUNIFORM', 45, 43, 590, acid),
box(black, -23, 516, 646, 241, { angle: -5, paint: { opacity: 92 } }),
headline('AFTER\nHOURS', 44, 540, 544, 237, white, 110, { angle: -5 }),
label('01.02 / JACKE AUS TECHNISCHEM NYLON', 46, 845, 680, acid),
text('Überzeichnete Silhouette, matte Oberfläche. Lässt sich hoch schließen, wenn die Stadt abkühlt.', 44, 908, 490, 110, { size: 26, color: white, leading: 1.27 }),
text('280 €', 539, 914, 207, 63, { size: 46, color: acid, weight: 900, align: 'right', tracking: -2 }),
...footer('05', acid),
]),
page('Edition · Mondseide', lilac, black, [
label('TASCHE AUS SATIN / 01.03', 44, 47, 656, blue),
box(white, 97, 213, 575, 695, { angle: 7 }),
photo('satintasche', 63, 295, 664, 480, { angle: -7 }),
headline('MOND\nSEIDE', 40, 102, 670, 252, black, 122, { font: 'serif', weight: 700, angle: -6, tracking: -7 }),
box(acid, 520, 733, 210, 134, { shape: 'ellipse', angle: 9 }),
text('160 €', 550, 776, 145, 53, { size: 38, weight: 900, align: 'center', angle: 9 }),
text('Satin in Violett mit einem Bügel aus poliertem Stahl. Für alles, was man nachts wirklich braucht.', 51, 915, 684, 97, { font: 'serif', size: 26, leading: 1.25 }),
...footer('06', blue),
]),
page('Patisserie · Rouge', red, white, [
photo('kirschtarte', 0, 0, 794, 661), box(red, 0, 0, 794, 220, { paint: { opacity: 87 } }),
label('PATISSERIE / 02', 46, 44, 420, white),
headline('ROUGE.', 41, 99, 718, 167, white, 140, { tracking: -9 }),
text('Süßes zum Schluss.', 45, 700, 694, 62, { size: 49, color: white, font: 'serif', tracking: -2.7 }),
html(`<style>
body{background:#aa1423;color:#f7f5ea;font-family:Arial,sans-serif}
table{width:100%;border-collapse:collapse} td{padding:2.25vw 0;border-bottom:1px solid #f7f5ea90;font-size:4.1vw}
td:last-child{text-align:right;font-weight:700} tr:first-child td{border-top:1px solid #f7f5ea90}
</style><table aria-label="Patisserie-Karte"><tbody><tr><td>Schwarzkirschtarte</td><td>12 €</td></tr><tr><td>Vanillecreme mit rosa Pfeffer</td><td>9 €</td></tr><tr><td>Espresso doppio</td><td>4 €</td></tr></tbody></table>`, 45, 794, 704, 188),
...footer('07', white),
]),
page('Nachtbar · Grüner Blitz', black, acid, [
label('NACHTBAR / 02', 45, 50, 520, acid),
box(lilac, 19, 370, 697, 499, { angle: 8 }),
photo('aperitif', 45, 264, 704, 592, { angle: -3 }),
headline('GRÜNER\nBLITZ', 41, 120, 700, 243, acid, 112),
box(acid, 500, 779, 252, 83, { angle: -7 }),
text('NACHTDRINK / 14 €', 511, 805, 232, 39, { color: black, size: 22, font: 'mono', weight: 700, align: 'center', angle: -7 }),
text('Kräuter, Zitrone und ein bitteres Finish. Auch alkoholfrei erhältlich.', 44, 919, 697, 100, { color: white, size: 27, font: 'serif', leading: 1.26 }),
...footer('08', acid),
]),
page('Galerie · Blue Noise', blue, white, [
label('DUFTATELIER / 02', 45, 48, 519, lilac),
headline('BLUE\nNOISE', 41, 118, 710, 279, white, 130, { tracking: -7 }),
item('gallery', 44, 410, 705, 442, { mediaIds: [media.parfum, media.spiegelsaal, media.chromlampe, media.aperitif], height: 30 }, { fit: 'cover' }),
box(acid, 479, 780, 247, 85, { angle: -8 }),
label('PARFUM / 96 €', 507, 808, 218, black),
text('Kalter Stein, Wacholder und dunkles Holz. Vier Bilder zu einem Duft.', 45, 901, 694, 99, { color: white, size: 28, font: 'serif', leading: 1.23 }),
...footer('09', lilac),
]),
page('Film · Sechs Sekunden nach Ladenschluss', black, acid, [
label('BEWEGTBILD / NACHTKAUF JOURNAL', 46, 48, 670, acid),
headline('SECHS\nSEKUNDEN.', 40, 115, 705, 248, acid, 113, { tracking: -7 }),
box(lilac, 32, 400, 730, 460, { angle: -4 }),
item('video', 44, 411, 706, 447, { mediaId: media.film, posterMediaId: media.spiegelsaal, text: 'NACHTKAUF / 23:59 · Motion Study' }, { color: white, fill: black, fontSize: 17 }),
text('Ein Blick durch das Haus, bevor es wieder hell wird.', 45, 920, 690, 82, { color: white, size: 29, font: 'serif' }),
...footer('10', acid),
]),
page('Einlass · Die Nachtkarte', acid, black, [
label('NACHTKAUF / EINTRITT', 45, 47, 450, black),
headline('DIE NACHT-\nKARTE', 43, 120, 710, 241, black, 109, { tracking: -6.5 }),
box(black, 44, 404, 703, 309, { angle: -2 }),
text('23:59 – 03:00', 75, 445, 644, 97, { size: 66, color: acid, weight: 900, tracking: -4, angle: -2 }),
text('Die digitale Ausgabe passt in jede Jackentasche. Scanne den Code oder öffne das Flipbook direkt.', 79, 553, 580, 119, { size: 30, color: white, font: 'serif', leading: 1.2, angle: -2 }),
item('qr', 49, 761, 195, 231, { text: 'Online-Ausgabe', url: online }, { color: black, fontSize: 16 }),
item('button', 287, 785, 396, 80, { text: 'Flipbook öffnen', url: online }, { fill: black, color: acid, fontSize: 27, weight: 700, radius: 8 }),
item('social', 292, 902, 391, 64, { text: 'Visuelle Inspiration · Instagram', url: 'https://www.instagram.com/' }, { color: black, fontSize: 22 }),
...footer('11', black),
]),
page('Rückseite · Bis morgen Nacht', black, white, [
photo('spiegelsaal', 0, 0, 794, 1122),
box(black, 0, 0, 794, 1122, { paint: { opacity: 47 } }),
label('NACHTKAUF JOURNAL / ENDE', 46, 52, 665, acid),
box(acid, 434, 266, 320, 320, { shape: 'ellipse', paint: { opacity: 86 } }),
headline('BIS\nMORGEN\nNACHT.', 42, 386, 716, 456, white, 151, { tracking: -10.5 }),
box(black, 0, 944, 794, 178, { paint: { opacity: 82 } }),
text('Ein fiktives Kaufhaus. Ein Beispiel für freie Gestaltung in Syncova. Folio.', 48, 977, 660, 68, { font: 'serif', size: 27, color: white }),
label('AUSGABE 01 / 23:59', 50, 1064, 683, acid),
]),
],
};
}