From e127cf6b705ece46fcbe7abd7aa15d02eb49cde8 Mon Sep 17 00:00:00 2001 From: Maaxxs <61059039+MaaxxsDev@users.noreply.github.com> Date: Tue, 22 Sep 2026 10:33:22 +0200 Subject: [PATCH] Wiki: WIP badges aligned in one column in the table of contents and subpage list Co-Authored-By: Claude Opus 5 --- assets/css/style.css | 13 +++++++++++-- wiki.php | 8 +++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/assets/css/style.css b/assets/css/style.css index c37f994..88983b5 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -4283,20 +4283,27 @@ body.home-page .navbar { .wiki-toc-chapter[open] > summary::before { transform: rotate(90deg); } .wiki-toc a { - display: block; + display: flex; + align-items: baseline; + gap: 0.3rem; flex: 1; min-width: 0; padding: 0.2rem 0.35rem; border-radius: 5px; color: var(--text); } +/* Titel nimmt den Platz ein, "WIP" sitzt immer am rechten Rand - so stehen alle untereinander */ +.wiki-toc-title { flex: 1; min-width: 0; overflow-wrap: anywhere; } +.wiki-toc .wiki-num { flex-shrink: 0; } +.wiki-toc .wiki-wip { flex-shrink: 0; align-self: center; margin-left: auto; } .wiki-toc-chapter > summary > a { font-weight: 600; } .wiki-toc a:hover { background: rgba(255, 255, 255, 0.05); text-decoration: none; color: var(--text); } .wiki-toc a.active { background: rgba(201, 162, 39, 0.15); color: var(--gold); } -.wiki-toc ul { list-style: none; margin: 0.1rem 0 0.35rem 1rem; padding: 0; border-left: 1px solid var(--border); } +/* rechts so viel Abstand wie die Kapitelzeile (summary-Padding), damit "WIP" genau untereinander steht */ +.wiki-toc ul { list-style: none; margin: 0.1rem 0.4rem 0.35rem 1rem; padding: 0; border-left: 1px solid var(--border); } .wiki-toc li a { padding-left: 0.6rem; font-size: 0.86rem; color: #cfcfcf; } .wiki-num { color: var(--text-muted); font-variant-numeric: tabular-nums; margin-right: 0.15rem; } @@ -4388,6 +4395,8 @@ body.home-page .navbar { } .wiki-subpage:hover { border-color: var(--gold); text-decoration: none; color: var(--text); } +.wiki-subpage-title { flex: 1; min-width: 0; } +.wiki-subpage .wiki-wip { flex-shrink: 0; margin-left: auto; } .wiki-article-foot { display: flex; diff --git a/wiki.php b/wiki.php index 00c1c89..bbc49a9 100644 --- a/wiki.php +++ b/wiki.php @@ -98,7 +98,8 @@ $nameOf = static fn (array $u): string => $u['display_name'] !== '' ? $u['displa
> - + + WIP @@ -107,7 +108,8 @@ $nameOf = static fn (array $u): string => $u['display_name'] !== '' ? $u['displa
  • - + + WIP
  • @@ -203,7 +205,7 @@ $nameOf = static fn (array $u): string => $u['display_name'] !== '' ? $u['displa - + WIP