Wiki: WIP badges aligned in one column in the table of contents and subpage list
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
83e858987c
commit
e127cf6b70
2 changed files with 16 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
8
wiki.php
8
wiki.php
|
|
@ -98,7 +98,8 @@ $nameOf = static fn (array $u): string => $u['display_name'] !== '' ? $u['displa
|
|||
<details class="wiki-toc-chapter"<?= $open ? ' open' : '' ?>>
|
||||
<summary>
|
||||
<a href="/wiki.php?page=<?= e(rawurlencode($chapter['slug'])) ?>" class="<?= $page && (int) $page['id'] === (int) $chapter['id'] ? 'active' : '' ?>">
|
||||
<span class="wiki-num"><?= e($chapter['number']) ?></span> <?= e($chapter['title']) ?>
|
||||
<span class="wiki-num"><?= e($chapter['number']) ?></span>
|
||||
<span class="wiki-toc-title"><?= e($chapter['title']) ?></span>
|
||||
<?php if ($chapter['is_wip']): ?><span class="wiki-wip">WIP</span><?php endif; ?>
|
||||
</a>
|
||||
</summary>
|
||||
|
|
@ -107,7 +108,8 @@ $nameOf = static fn (array $u): string => $u['display_name'] !== '' ? $u['displa
|
|||
<?php foreach ($chapter['children'] as $child): ?>
|
||||
<li>
|
||||
<a href="/wiki.php?page=<?= e(rawurlencode($child['slug'])) ?>" class="<?= $page && (int) $page['id'] === (int) $child['id'] ? 'active' : '' ?>">
|
||||
<span class="wiki-num"><?= e($child['number']) ?></span> <?= e($child['title']) ?>
|
||||
<span class="wiki-num"><?= e($child['number']) ?></span>
|
||||
<span class="wiki-toc-title"><?= e($child['title']) ?></span>
|
||||
<?php if ($child['is_wip']): ?><span class="wiki-wip">WIP</span><?php endif; ?>
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -203,7 +205,7 @@ $nameOf = static fn (array $u): string => $u['display_name'] !== '' ? $u['displa
|
|||
<?php foreach ($childrenOfPage as $child): ?>
|
||||
<a class="wiki-subpage" href="/wiki.php?page=<?= e(rawurlencode($child['slug'])) ?>">
|
||||
<span class="wiki-num"><?= e($child['number']) ?></span>
|
||||
<span><?= e($child['title']) ?></span>
|
||||
<span class="wiki-subpage-title"><?= e($child['title']) ?></span>
|
||||
<?php if ($child['is_wip']): ?><span class="wiki-wip">WIP</span><?php endif; ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
|||
Loading…
Reference in a new issue