Set up book project: Markdown→CSS→PDF pipeline for KDP
Adds the full authoring and build toolchain for "Das Kaleidoskop der Schlummerwelten" — all 12 story content files in Markdown, Nunjucks HTML templates, CSS print layout, and Puppeteer-based PDF generation targeting Amazon KDP (8.5×8.5 in, 0.125in bleed). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,145 @@
|
||||
/* ── Image pages ── */
|
||||
.page--image {
|
||||
background: var(--color-primary, #1a1a2e);
|
||||
}
|
||||
|
||||
.scene-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Placeholder when image not yet available */
|
||||
.placeholder-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.placeholder-label {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
color: rgba(255,255,255,0.9);
|
||||
text-align: center;
|
||||
padding: 2rem;
|
||||
border: 2px dashed rgba(255,255,255,0.4);
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.placeholder-story {
|
||||
font-size: 0.9rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.1em;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.placeholder-scene {
|
||||
font-size: 1.4rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* ── Text pages ── */
|
||||
.page--text {
|
||||
background: var(--color-bg, #fafafa);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.text-page-inner {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.2rem;
|
||||
}
|
||||
|
||||
.scene-ornament {
|
||||
font-size: 1.5rem;
|
||||
color: var(--color-secondary, #ccc);
|
||||
text-align: center;
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
/* ── Front matter pages ── */
|
||||
.page--title {
|
||||
background: #1a1a3e;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.page--imprint {
|
||||
background: #fafafa;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.imprint-content {
|
||||
width: 100%;
|
||||
font-size: 0.75rem;
|
||||
color: #666;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
/* ── Table of contents ── */
|
||||
.page--toc {
|
||||
background: #fafafa;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.toc-list {
|
||||
list-style: none;
|
||||
counter-reset: toc;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.8rem;
|
||||
}
|
||||
|
||||
.toc-list li {
|
||||
counter-increment: toc;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 0.75rem;
|
||||
font-size: 1rem;
|
||||
color: #2a2a4a;
|
||||
}
|
||||
|
||||
.toc-list li::before {
|
||||
content: counter(toc, decimal-leading-zero);
|
||||
font-size: 0.8rem;
|
||||
color: #aaa;
|
||||
min-width: 2rem;
|
||||
}
|
||||
|
||||
/* ── Finale page ── */
|
||||
.page--finale {
|
||||
background: #1a1a2e;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.finale-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.finale-overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding-bottom: 1in;
|
||||
color: white;
|
||||
text-align: center;
|
||||
background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/* KDP: 8.5×8.5 in trim, 0.125in bleed on all sides */
|
||||
@page {
|
||||
size: 8.75in 8.75in;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html, body {
|
||||
width: 8.75in;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 8.75in;
|
||||
height: 8.75in;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
page-break-after: always;
|
||||
break-after: page;
|
||||
}
|
||||
|
||||
/* Safe zone: content that must not be cut stays 0.25in from bleed edge */
|
||||
.page--text .text-page-inner,
|
||||
.page--title .title-content,
|
||||
.page--toc,
|
||||
.page--imprint .imprint-content {
|
||||
/* 0.125in bleed + 0.25in safety margin = 0.375in from PDF edge */
|
||||
padding: 0.75in;
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
/* ── Base typography ── */
|
||||
body {
|
||||
font-family: Georgia, 'Times New Roman', serif;
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
|
||||
/* ── Title page ── */
|
||||
.title-eyebrow {
|
||||
font-size: 0.85rem;
|
||||
letter-spacing: 0.2em;
|
||||
text-transform: uppercase;
|
||||
color: rgba(255,255,255,0.6);
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.title-main {
|
||||
font-size: 3rem;
|
||||
line-height: 1.2;
|
||||
color: white;
|
||||
margin-bottom: 1.5rem;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.title-sub {
|
||||
font-size: 1.1rem;
|
||||
color: rgba(255,255,255,0.8);
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
/* ── Table of contents ── */
|
||||
.toc-title {
|
||||
font-size: 1.6rem;
|
||||
color: #1a1a3e;
|
||||
font-style: italic;
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
/* ── Story title (first scene right page) ── */
|
||||
.story-title {
|
||||
font-size: 1.6rem;
|
||||
color: var(--color-primary);
|
||||
font-style: italic;
|
||||
line-height: 1.3;
|
||||
border-bottom: 2px solid var(--color-secondary);
|
||||
padding-bottom: 0.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
/* ── Scene text ── */
|
||||
.scene-text {
|
||||
font-size: 1.05rem;
|
||||
line-height: 1.85;
|
||||
color: var(--color-text, #1a1a2e);
|
||||
}
|
||||
|
||||
.scene-text p {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.scene-text p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.scene-text em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Story 9 has dark background — invert text page */
|
||||
[data-story="9"].page--text {
|
||||
background: #0a0a2a;
|
||||
}
|
||||
|
||||
[data-story="9"] .scene-text,
|
||||
[data-story="9"] .story-title {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
[data-story="9"] .story-title {
|
||||
border-color: #ff1493;
|
||||
}
|
||||
|
||||
/* ── Finale ── */
|
||||
.finale-overlay h2 {
|
||||
font-size: 2.5rem;
|
||||
color: white;
|
||||
font-style: italic;
|
||||
text-shadow: 0 2px 12px rgba(0,0,0,0.6);
|
||||
}
|
||||
|
||||
.finale-overlay p {
|
||||
font-size: 1rem;
|
||||
color: rgba(255,255,255,0.8);
|
||||
letter-spacing: 0.1em;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
Reference in New Issue
Block a user