caws-world/dnd-book.css
Ammerhai d10ed8bcfa add shadow and centered rendering
- multiple pages now working with all content in columns
2024-12-08 22:05:40 +01:00

86 lines
2.3 KiB
CSS

/* Container für das Buchlayout */
.phb {
width: 210mm; /* A4 Breite */
height: 296.8mm; /* A4 Höhe */
margin: 20mm auto; /* Zentriert das Layout horizontal auf dem Bildschirm */
padding: 10mm; /* Verringert das Padding auf der Seite, um mehr Platz zu schaffen */
position: relative;
background-image: url('./background.png'); /* Hintergrundbild */
background-size: cover; /* Hintergrundbild strecken */
background-position: center; /* Bild zentrieren */
box-shadow: -10px 0 20px rgba(0, 0, 0, 0.3), 10px 0 20px rgba(0, 0, 0, 0.3); /* Schatten links und rechts */
display: flex;
justify-content: center; /* Zentriert die Spalten */
box-sizing: border-box;
page-break-before: always; /* Seite beginnt immer nach einer neuen phb */
}
/* Layout für die Spalten */
.phb .content {
display: flex;
flex-wrap: wrap;
gap: 1%; /* Verringert den Abstand zwischen den Spalten */
width: 100%; /* Gesamtbreite für den Inhalt */
}
/* Jede Spalte nimmt 48% der Breite ein */
.phb .column {
width: 48%; /* Breite der Spalten */
padding: 5mm; /* Reduziert das Padding in den Spalten */
box-sizing: border-box;
color: #222;
line-height: 1.5;
page-break-inside: avoid; /* Verhindert, dass der Inhalt in eine neue Seite umbricht */
}
/* Stil für Blockquotes */
.phb blockquote {
background-color: lightgrey;
margin-top: 1em;
padding: 0.5em;
font-style: italic;
}
/* Stil für Tabellen */
.phb table {
font-size: 9pt;
width: 100%;
margin-top: 10px;
margin-bottom: 10px;
}
/* Stil für Tabellenkopf */
.phb table th, .phb table td {
padding: 5px;
border: 1px solid #ccc;
}
/* Überschriften und Absätze */
.phb h1, .phb h2, .phb h3, .phb h4, .phb h5 {
margin-top: 0.2em;
margin-bottom: 0.2em;
color: #58180D;
font-weight: bold;
}
/* Sicherstellen, dass die nächste Seite nach der ersten immer auf einer neuen Seite beginnt */
.phb:not(:first-of-type) {
page-break-before: always;
}
.phb h2 {
font-size: 1.8em;
margin-bottom: 10px;
}
.phb h3 {
font-size: 0.529cm;
border-bottom: 2px solid #c9ad6a;
}
/* Stil für den Blockquote */
.phb blockquote hr {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M0 0l2 1L0 2z' fill='%239c2b1b'/%3E%3C/svg%3E");
}