Update sermon-a4.css

This commit is contained in:
simonpipe 2026-05-12 10:36:07 +02:00
parent 7ece9dc3ea
commit 2b8d6ff195

View file

@ -2,7 +2,7 @@
author: simonpipe (codeberg.org/simonpipe/) author: simonpipe (codeberg.org/simonpipe/)
License: MIT License: MIT
This theme builds upon "sermon-slide.css" and is optimized for A4 printing. This theme is optimized for A4 printing.
Inspired by "a4-clean.css" by stanfrdb (https://github.com/stanfrbd/A4-marp/tree/main) Inspired by "a4-clean.css" by stanfrdb (https://github.com/stanfrbd/A4-marp/tree/main)
Usage: Usage:
@ -11,106 +11,76 @@ Usage:
(Set 'class: booklet' in your Markdown YAML header) (Set 'class: booklet' in your Markdown YAML header)
*/ */
@import "sermon-slide"; @import "base";
@import url("https://fonts.googleapis.com/css2?family=Ubuntu+Mono:ital,wght@0,400;0,700;1,400;1,700&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap");
:root { :root {
--font-size: 12pt; /* --- COLOR PALETTE (From sermon-slide) --- */
--line-height: 1.5; --primary-color: #265770;
--font-size-booklet: 18pt; --text-color: #393552;
--line-height-booklet: 1.6;
--font-family: 'Ubuntu', sans-serif;
--primary-color: #000;
--lighter-color: #666; --lighter-color: #666;
--bg-color: #eee; --bg-color-elements: #eee;
--mark-color: #eee; --mark-color: #ffffa590;
--cite-color: #2d5f83;
/* --- LAYOUT CONSTANTS --- */
--font-size-std: 12pt;
--font-size-booklet: 18pt;
--margin-page: 25px 35px; --margin-page: 25px 35px;
font-family: 'Ubuntu', sans-serif;
} }
/* --- A4 LAYOUT OVERRIDES --- */ /* --- BASIC A4 STRUCTURE --- */
section { section {
width: 21cm; width: 21cm;
height: 29.7cm; height: 29.7cm;
padding: var(--margin-page); padding: var(--margin-page);
background: white; background: white;
background-image: none; /* Entfernt den Folien-Gradienten für den Druck */ color: var(--text-color);
color: var(--primary-color); font-size: var(--font-size-std);
font-family: var(--font-family); line-height: 1.5;
font-size: var(--font-size); display: block; /* Garantiert: Alles fängt oben an! */
line-height: var(--line-height); position: relative;
display: block !important;
text-align: left;
justify-content: flex-start; /* Falls Flexbox doch aktiv bleibt, oben starten */
align-items: flex-start; /* Falls Flexbox doch aktiv bleibt, links starten */
} }
/* --- BOOKLET Printing MODUS ('class: booklet') --- */ /* Booklet Mode ('class: booklet') */
section.booklet { section.booklet {
font-size: var(--font-size-booklet); font-size: var(--font-size-booklet);
line-height: var(--line-height-booklet); line-height: 1.6;
}
/* Seitenzahlen für das Booklet */
section::after {
content: attr(data-marpit-pagination) ' / ' attr(data-marpit-pagination-total);
font-size: 15px;
position: absolute;
bottom: 25px;
right: 35px;
color: #555;
opacity: 1;
} }
/* --- TYPOGRAPHY --- */ /* --- TYPOGRAPHY --- */
h1 { h1, h2, h3, h4 {
color: var(--primary-color); color: var(--primary-color);
font-size: 1.2em; margin: 0;
font-weight: 600; line-height: 1.2;
margin-bottom: -20px;
border-bottom: none; /* Entfernt die Linie aus der Slide-Klasse falls nötig */
display: block;
min-width: 0;
} }
h2 { h1 { font-size: 1.4em; font-weight: 700; margin-bottom: 0.3em; }
color: var(--primary-color); h2 { font-size: 1.2em; font-weight: 600; margin-top: 1em; margin-bottom: 0.2em; }
font-size: 1.1em; h3 { font-size: 1.1em; font-weight: 500; margin-top: 0.8em; }
font-weight: 500;
margin-top: 30px;
margin-bottom: 0px;
}
h3 {
color: var(--primary-color);
font-size: 1em;
font-weight: 500;
margin-top: 20px;
margin-bottom: 0px;
}
p, li { p, li {
margin: 10px 0; margin: 0.6em 0;
} }
strong { strong {
color: var(--primary-color); font-weight: 600;
font-weight: 500; color: #000;
} }
/* Regieanweisungen */
em { em {
color: var(--primary-color);
font-style: italic; font-style: italic;
font-size: 1em;
} }
/* Motto auf der ersten Seite */ /* Motto-Style (First Page) */
section:first-of-type p:first-of-type em:first-of-type { section:first-of-type p:first-of-type em:first-of-type {
display: block; display: block;
font-size: 0.8em; font-size: 0.9em;
color: var(--lighter-color); color: var(--lighter-color);
margin-top: -15px; margin-top: -0.5em;
margin-bottom: 20px; margin-bottom: 1.5em;
font-weight: normal;
} }
/* --- ELEMENTS --- */ /* --- ELEMENTS --- */
@ -120,28 +90,15 @@ mark {
border-radius: 3px; border-radius: 3px;
} }
/* --- COPYRIGHT KLASSE --- */ /* --- BIBEL-ZITATE (Kompakt-Modus) --- */
/* Nutzung im Markdown: <div class="copyright"> © Dein Text </div> */
.copyright {
color: var(--lighter-color);
padding: 10px 20px;
margin: 20px 0;
border-left: 4px solid var(--primary-color);
background-color: var(--bg-color);
font-style: italic;
font-size: 0.9em;
}
.copyright a {
color: var(--lighter-color);
}
blockquote { blockquote {
margin: 1.5em 0;
font-weight: 500; font-weight: 500;
margin-bottom: 20px; color: #000;
border-left: none; /* Kein Balken für Zitate im A4 */
padding: 0;
} }
/* Entfernt den Zeilenumbruch der Absätze im Zitat */
blockquote p { blockquote p {
display: inline !important; display: inline !important;
margin: 0; margin: 0;
@ -155,68 +112,75 @@ blockquote cite {
display: inline; display: inline;
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
color: var(--colorblockquote); color: var(--cite-color);
} }
/* Klammer auf vor der Bibelstelle */ blockquote cite::before { content: " ("; }
blockquote cite::before { blockquote cite::after { content: ")"; }
content: " (";
} /* --- COPYRIGHT BLOCK --- */
.copyright {
/* Klammer zu nach der Bibelstelle */ color: var(--lighter-color);
blockquote cite::after { padding: 10px 20px;
content: ")"; margin: 20px 0;
border-left: 4px solid var(--primary-color);
background-color: var(--bg-color-elements);
font-style: italic;
font-size: 0.9em;
} }
/* --- TABLES --- */
table { table {
width: 100%; width: 100%;
border-collapse: collapse; border-collapse: collapse;
margin: 20px 0; margin: 1.5em 0;
font-size: 0.9em;
} }
table th { table th {
background-color: var(--primary-color); background-color: var(--primary-color);
color: white; color: white;
padding: 8px; padding: 8px;
border: 1px solid var(--lighter-color); text-align: left;
} }
table td { table td {
padding: 8px; padding: 8px;
border: 1px solid var(--lighter-color); border-bottom: 1px solid var(--bg-color-elements);
} }
/* --- CODE --- */
code, pre { code, pre {
font-family: 'Ubuntu Mono', monospace !important; font-family: 'Ubuntu Mono', monospace !important;
background-color: var(--bg-color-elements);
} }
code { code {
background-color: var(--bg-color); padding: 2px 5px;
padding: 2px 6px;
border-radius: 3px; border-radius: 3px;
color: var(--primary-color);
font-size: 0.9em;
} }
pre { pre {
background-color: var(--bg-color);
padding: 15px; padding: 15px;
border-radius: 5px; border-radius: 5px;
border-left: 4px solid var(--primary-color);
overflow-x: auto; overflow-x: auto;
line-height: 1.4; margin: 1.5em 0;
border-left: 3px solid var(--primary-color);
margin: 20px 0;
} }
pre code { pre code { background-color: transparent; }
background-color: transparent;
padding: 0; /* --- PAGINATION --- */
section::after {
content: attr(data-marpit-pagination) ' / ' attr(data-marpit-pagination-total);
font-size: 10pt;
position: absolute;
bottom: 25px;
right: 35px;
color: var(--lighter-color);
} }
img { /* --- IMAGE CENTER --- */
max-width: 100%; img[alt~="center"] {
height: auto;
display: block; display: block;
margin: 20px auto; margin: 20px auto;
} }