From 92bc04f14880c099bcbef707c0bfcefe8046010a Mon Sep 17 00:00:00 2001 From: TheThomaas Date: Thu, 1 May 2025 17:15:49 +0200 Subject: [PATCH] Move pdf styles to it's own file --- src/_includes/layouts/pdf.html | 100 ++------------------------------- src/css/pdf.css | 91 ++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+), 95 deletions(-) create mode 100644 src/css/pdf.css diff --git a/src/_includes/layouts/pdf.html b/src/_includes/layouts/pdf.html index d25b2ef..f811c88 100644 --- a/src/_includes/layouts/pdf.html +++ b/src/_includes/layouts/pdf.html @@ -4,106 +4,16 @@ {{ title }} - - {% block content %} {{ content }} {% endblock %} - + {% css "pdf" %} + {% include "css/pdf.css" %} + {% endcss %} + + \ No newline at end of file diff --git a/src/css/pdf.css b/src/css/pdf.css new file mode 100644 index 0000000..c3f8cd0 --- /dev/null +++ b/src/css/pdf.css @@ -0,0 +1,91 @@ +:root { + --accent-color: blue; + --font-body: Arial, sans-serif; + --font-display: 'Times New Roman', Times, serif; +} + +html { + font-family: var(--font-body, Arial, sans-serif); + margin: 0; +} +body { + margin: 0; +} + +*, ::before, ::after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +h1 { + text-align:center; + font-family: var(--font-display, 'Times New Roman', Times, serif); + font-size: 2rem; + margin: 0; + line-height: 1.6; +} +h2 { + color : var(--accent-color, blue); +} +p { + margin: 0; +} +ul { + margin: 0; +} +li::marker { + color: var(--accent-color, blue); +} +section {margin-bottom: 1.2rem;} + +.justify-center { + justify-content: center; +} +.underline { + text-decoration: underline; +} +.list-inline { + display: flex; + align-items: center; + padding: 0; + margin: 0; + gap: .8rem; +} +.list-inline li { + display: contents; +} +.list-inline li + li::before { + content: '|'; +} + +.title { + display: flex; + gap: .8rem; + margin-bottom: .6rem; +} +.title h2 { + margin: 0; +} +.title hr { + align-self: center; + flex: 1 0 auto; +} + +section ul {padding: 0;margin-left: 1.2rem;} +.subtitle { + display: grid; + grid-template-columns: repeat(3, 1fr); + justify-content: space-between; + align-items: center; + justify-items: center; + margin-inline: 1rem; + margin-bottom: .4rem; +} +.subtitle .timeSection { font-size: .9rem; } +.subtitle h3, +.subtitle p { margin: 0; } +.subtitle > :first-child {justify-self: start;} +.subtitle > :last-child {justify-self: end;} +.subtitle + ul {font-size: .9rem;} +.subtitle ~ .subtitle {margin-top: 1rem;} \ No newline at end of file