From 282427d2e3a338b040f7f4f57b1c0b85de272016 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Sun, 1 Nov 2026 16:50:28 +0100 Subject: Let article content flow around the table of contents This replaces the flex-based article header layout with floats, allowing article content to flow alongside longer tables of contents instead of leaving unused space beneath the header. It also adjusts the responsive layout, clears floats before the article footer, and removes the unused blog-specific stylesheet and its drop cap styling. --- assets/static/css/blog.css | 10 ---------- assets/static/css/style.css | 30 +++++++++++++++++++++++------- 2 files changed, 23 insertions(+), 17 deletions(-) delete mode 100644 assets/static/css/blog.css (limited to 'assets') diff --git a/assets/static/css/blog.css b/assets/static/css/blog.css deleted file mode 100644 index 48a716b..0000000 --- a/assets/static/css/blog.css +++ /dev/null @@ -1,10 +0,0 @@ -@charset "UTF-8"; - -article > p:first-of-type:first-letter { - color: var(--blue); - float: left; - font-weight: 700; - font-size: 3.8rem; - line-height: 3.8rem; - margin: 0.2em 0.1em 0 0; -} diff --git a/assets/static/css/style.css b/assets/static/css/style.css index 1275b1a..675c6c0 100644 --- a/assets/static/css/style.css +++ b/assets/static/css/style.css @@ -505,19 +505,27 @@ article { min-width: var(--column-min-width); & > header { - display: flex; - flex-direction: row; - align-items: start; - justify-content: space-between; margin-bottom: 2rem; + &::after { + clear: left; + content: ""; + display: block; + } + & > div { display: flex; flex-direction: column; gap: 0.75rem; - :has(& > nav) { - max-width: calc(2 / 3 * 100%); + &:not(:last-child) { + float: left; + width: calc(2 / 3 * 100% - 1rem); + + @media (max-width: 700px) { + float: none; + width: auto; + } } /* --- Article metadata --- */ @@ -576,7 +584,10 @@ article { font-size: 1rem; line-height: 1.4; padding: 0.75rem; - max-width: calc(1 / 3 * 100%); + box-sizing: border-box; + float: right; + margin-left: 1rem; + width: calc(1 / 3 * 100%); & > p { color: var(--blue); @@ -611,7 +622,11 @@ article { } @media (max-width: 700px) { + float: none; + margin-bottom: 0; + margin-left: 0; margin-top: 2rem; + width: auto; } } } @@ -664,6 +679,7 @@ article { } & > footer { + clear: both; color: var(--dim-foreground); font-style: italic; font-size: 1.2rem; -- cgit v1.3.1