@@ -111,7 +111,7 @@ function isParentActive(item: NavItem): boolean {
111111 <a
112112 href = { item .href }
113113 class :list = { [
114- ' flex items-center justify-between px-3 py-1.5 text-[13px] transition-colors' ,
114+ ' flex items-center justify-between px-3 py-2 text-sm transition-colors' ,
115115 active
116116 ? ' text-primary font-medium border-l-2 border-primary bg-primary/5'
117117 : ' text-on-surface-variant hover:text-on-surface border-l-2 border-transparent hover:border-outline-variant' ,
@@ -140,7 +140,7 @@ function isParentActive(item: NavItem): boolean {
140140 <a
141141 href = { child .href }
142142 class :list = { [
143- ' block pl-6 pr-3 py-1 text-[12px ] transition-colors' ,
143+ ' block pl-6 pr-3 py-1.5 text-[13px ] transition-colors' ,
144144 childActive
145145 ? ' text-primary font-medium border-l-2 border-primary bg-primary/5'
146146 : ' text-on-surface-variant/80 hover:text-on-surface border-l-2 border-outline-variant/30 hover:border-outline-variant' ,
@@ -159,32 +159,39 @@ function isParentActive(item: NavItem): boolean {
159159 </ul >
160160 </div >
161161 ))}
162+
163+ <!-- Site navigation -->
164+ <div class =" mt-4 pt-4 border-t border-outline-variant" >
165+ <h4 class =" text-[10px] font-headline font-bold uppercase tracking-[0.15em] text-on-surface-variant/60 mb-3 px-3" >
166+ Site
167+ </h4 >
168+ <ul >
169+ <li >
170+ <a href =" /" class =" flex items-center gap-2 px-3 py-2 text-sm text-on-surface-variant hover:text-on-surface transition-colors" >
171+ Home
172+ </a >
173+ </li >
174+ <li >
175+ <a href =" https://github.com/dvflw/mantle" class =" flex items-center gap-2 px-3 py-2 text-sm text-on-surface-variant hover:text-on-surface transition-colors" >
176+ GitHub
177+ </a >
178+ </li >
179+ </ul >
180+ </div >
162181 </nav >
163182</aside >
164183
165184<script is:inline >
166185function initSidebar() {
167- const toggleBtn = document.getElementById('sidebar-toggle');
168186 const mobileSidebar = document.getElementById('docs-sidebar-mobile');
169187 const overlay = document.getElementById('sidebar-overlay');
170- if (!toggleBtn || ! mobileSidebar || !overlay) return;
188+ if (!mobileSidebar || !overlay) return;
171189
172- function openSidebar() {
173- mobileSidebar.classList.remove('-translate-x-full');
174- overlay.classList.remove('hidden');
175- }
176190 function closeSidebar() {
177191 mobileSidebar.classList.add('-translate-x-full');
178192 overlay.classList.add('hidden');
179193 }
180194
181- const newBtn = toggleBtn.cloneNode(true);
182- toggleBtn.parentNode?.replaceChild(newBtn, toggleBtn);
183- newBtn.addEventListener('click', () => {
184- const isOpen = !mobileSidebar.classList.contains('-translate-x-full');
185- if (isOpen) closeSidebar(); else openSidebar();
186- });
187-
188195 const newOverlay = overlay.cloneNode(true);
189196 overlay.parentNode?.replaceChild(newOverlay, overlay);
190197 newOverlay.addEventListener('click', closeSidebar);
0 commit comments