Skip to content

Commit cfd4d78

Browse files
committed
style: wrap nav sections in TUI-style bordered boxes
1 parent b883b5a commit cfd4d78

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/layouts/TuiLayout.astro

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,19 @@ const topReference = sortByOrder(referenceRaw.filter(e => !e.id.includes('/')),
9999
<nav class="flex-1 overflow-y-auto p-2 pt-4 flex flex-col gap-4 scrollbar-hide text-xs">
100100

101101

102-
<div>
103-
<div class="opacity-70 text-[11px] px-0 uppercase mb-1 font-bold text-tui-accent">Architecture</div>
102+
<!-- Architecture Section -->
103+
<div class="relative border border-tui-border-inactive p-2 pt-4 mb-4 flex flex-col gap-1">
104+
<span class="absolute -top-2.5 left-2 bg-tui-bg px-1 text-[10px] text-tui-border-inactive">Architecture</span>
104105
{explanation.map(entry => (
105-
<a href={`/lore/explanation/${entry.id.replace(/\.[^/.]+$/, "")}`} class="py-0.5 px-0 hover:bg-tui-selected-bg hover:text-white block truncate transition-none">{entry.data.title}</a>
106+
<a href={`/lore/explanation/${entry.id.replace(/\.[^/.]+$/, "")}`} class="py-0.5 px-2 hover:bg-tui-selected-bg hover:text-white block truncate transition-none">{entry.data.title}</a>
106107
))}
107108
</div>
108109

109-
<div class="mb-4">
110-
<div class="opacity-70 text-[11px] px-0 uppercase mb-1 font-bold text-tui-accent">Reference</div>
110+
<!-- Reference Section -->
111+
<div class="relative border border-tui-border-inactive p-2 pt-4 mb-4 flex flex-col gap-1">
112+
<span class="absolute -top-2.5 left-2 bg-tui-bg px-1 text-[10px] text-tui-border-inactive">Reference</span>
111113
{topReference.map(entry => (
112-
<a href={`/lore/reference/${entry.id.replace(/\.[^/.]+$/, "")}`} class="py-0.5 px-0 hover:bg-tui-selected-bg hover:text-white block truncate transition-none">{entry.data.title}</a>
114+
<a href={`/lore/reference/${entry.id.replace(/\.[^/.]+$/, "")}`} class="py-0.5 px-2 hover:bg-tui-selected-bg hover:text-white block truncate transition-none">{entry.data.title}</a>
113115
))}
114116
</div>
115117
</nav>

0 commit comments

Comments
 (0)