Skip to content

Commit 75f99b5

Browse files
committed
style: add TUI-style header tabs for Home and Installation
1 parent de55f87 commit 75f99b5

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

src/layouts/TuiLayout.astro

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,35 @@ const topReference = sortByOrder(referenceRaw.filter(e => !e.id.includes('/')),
6969
}
7070
.tui-btn.active::before { content: "["; color: var(--tui-accent); margin-right: 0.4rem; }
7171
.tui-btn.active::after { content: "]"; color: var(--tui-accent); margin-left: 0.4rem; }
72+
.tui-tab {
73+
opacity: 0.5;
74+
color: var(--tui-fg);
75+
text-decoration: none;
76+
padding: 0 0.5rem;
77+
transition: all 0.1s;
78+
}
79+
.tui-tab:hover { opacity: 0.8; }
80+
.tui-tab.active {
81+
opacity: 1;
82+
color: var(--tui-accent);
83+
font-weight: bold;
84+
}
85+
.tui-tab.active::before { content: "[ "; }
86+
.tui-tab.active::after { content: " ]"; }
7287
</style>
7388
</head>
7489
<body class="h-screen w-screen p-2 box-border flex flex-col gap-2 overflow-hidden bg-tui-bg text-tui-fg select-none">
90+
<header class="h-8 flex items-center px-4 gap-4 text-xs">
91+
<a href="/lore/" class={`tui-tab ${title === 'About' ? 'active' : ''}`}>Home</a>
92+
<a href="/lore/reference/databank" class={`tui-tab ${title === 'Databank' ? 'active' : ''}`}>Installation</a>
93+
</header>
7594
<div class="flex flex-1 gap-2 overflow-hidden">
7695
<!-- Navigation Panel -->
7796
<aside class="relative border border-tui-border-inactive w-80 flex flex-col mt-3">
7897
<span class="absolute -top-2.5 left-2 bg-tui-bg px-1 text-[10px] text-tui-border-inactive">Navigation</span>
7998

8099
<nav class="flex-1 overflow-y-auto p-2 pt-4 flex flex-col gap-4 scrollbar-hide text-xs">
81-
<div>
82-
<a href="/lore/" class="py-0.5 px-2 hover:bg-tui-selected-bg hover:text-white block transition-none">Home</a>
83-
</div>
100+
84101

85102
<div>
86103
<div class="opacity-70 text-[11px] px-2 uppercase mb-1 font-bold text-tui-accent">Architecture</div>

0 commit comments

Comments
 (0)