Something went wrong. Try again.
Blog Built with AT Protocol skiddle.id
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187<nav class="h-10 border-b border-muted justify-left divide-x divide-muted [&>a]:py-1 [&>a]:px-4 gap-2 fixed w-full bg-[var(--color-black)] flex items-center"> <a href="/" class="flex items-center gap-2 text-[var(--color-primary)]"> <span>skiddle@web ~</span> <div class="w-[10px] h-[21px] animate-blink bg-[var(--color-primary)]"></div> </a>
<a class="hover:text-base0E" href="/posts">posts</a> <a class="hover:text-base0E" href="/about">about</a> <a class="hover:text-base0E" href="/works">works</a> <a class="hover:text-base0E" href="/services">services</a> <a class="hover:text-base0E" href="/uses">uses</a> <a class="hover:text-base0E" href="/rss.xml">rss</a> <form action="/posts" method="get" class="ml-2"> <label class="sr-only" for="siteSearch">Search</label> <input id="siteSearch" type="search" name="q" placeholder="Search" class="h-8 w-36 bg-transparent border border-muted rounded-md px-2 text-sm placeholder:text-base03 focus:outline-none focus:border-base0E" /> </form> <div class="ml-auto flex items-center gap-2 navbar-menu social"> <button id="themeToggle" class="inline-flex items-center justify-center size-8 hover:text-base0E hover:bg-[color:oklch(var(--color-gray)_/_0.2)] rounded-full leading-none p-0 transition-colors" type="button" title="Toggle theme" aria-label="Toggle theme" aria-pressed="false"> <span class="sr-only">Toggle theme</span> <i id="themeIcon" class="fa-solid fa-moon text-[20px]" aria-hidden="true"></i> </button> <div class="relative"> <button id="primaryToggle" class="inline-flex items-center justify-center size-8 hover:text-base0E hover:bg-[color:oklch(var(--color-gray)_/_0.2)] rounded-full leading-none p-0 transition-colors" type="button" title="Change primary color" aria-haspopup="true" aria-expanded="false"> <span class="sr-only">Change primary color</span> <span id="primarySwatch" class="inline-block size-5 rounded-full" style="background-color: var(--color-primary);"></span> </button> <div id="primaryMenu" class="hidden absolute right-0 mt-2 w-14 rounded-xl bg-[var(--color-black)] p-2 shadow-lg"> <ul class="flex flex-col gap-2" role="menu" aria-label="Primary color choices"> <li> <button data-color="var(--color-base0B)" class="size-5 rounded-full block" style="background-color: var(--color-base0B);" title="Blue" aria-label="Blue"></button> </li> <li> <button data-color="var(--color-base0E)" class="size-5 rounded-full block" style="background-color: var(--color-base0E);" title="Purple" aria-label="Purple"></button> </li> <li> <button data-color="var(--color-base0D)" class="size-5 rounded-full block" style="background-color: var(--color-base0D);" title="Green" aria-label="Green"></button> </li> <li> <button data-color="var(--color-base07)" class="size-5 rounded-full block" style="background-color: var(--color-base07);" title="Teal" aria-label="Teal"></button> </li> <li> <button data-color="var(--color-base0C)" class="size-5 rounded-full block" style="background-color: var(--color-base0C);" title="Pink" aria-label="Pink"></button> </li> </ul> </div> </div> </div> <a class="inline-flex items-center justify-center size-8 hover:text-base0E hover:bg-[color:oklch(var(--color-gray)_/_0.2)] rounded-full leading-none px-0 py-0 transition-colors" href="https://github.com/arcestia" target="_blank" rel="noopener noreferrer" aria-label="GitHub"> <i class="fa-brands fa-github text-[20px]" aria-hidden="true"></i> </a> <a class="inline-flex items-center justify-center size-8 hover:text-base0E hover:bg-[color:oklch(var(--color-gray)_/_0.2)] rounded-full leading-none px-0 py-0 transition-colors" href="https://bsky.app/profile/skiddle.blue" target="_blank" rel="noopener noreferrer" aria-label="Bluesky"> <i class="fa-brands fa-bluesky text-[20px]" aria-hidden="true"></i> </a></nav>
<script> (function() { function getSystemPrefersLight() { try { return window.matchMedia && window.matchMedia('(prefers-color-scheme: light)').matches; } catch (_) { return false; } } function applyTheme(theme) { const root = document.documentElement; if (theme === 'light') { root.classList.add('theme-light'); } else { root.classList.remove('theme-light'); } const btn = document.getElementById('themeToggle'); const icon = document.getElementById('themeIcon'); if (btn && icon) { const isLight = theme === 'light'; // Show target icon: moon in light theme (switch to dark), sun in dark theme (switch to light) icon.classList.toggle('fa-moon', isLight); icon.classList.toggle('fa-sun', !isLight); btn.setAttribute('aria-pressed', isLight ? 'true' : 'false'); } } function init() { let theme = localStorage.getItem('theme'); if (!theme) { theme = getSystemPrefersLight() ? 'light' : 'dark'; } applyTheme(theme);
// Primary color init const savedPrimary = localStorage.getItem('primary'); const rootStyle = document.documentElement.style; const swatch = document.getElementById('primarySwatch'); function updatePrimaryMenuSelection(value) { const menu = document.getElementById('primaryMenu'); if (!menu) return; const items = menu.querySelectorAll('button[data-color]'); items.forEach((btn) => { const val = btn.getAttribute('data-color'); const isActive = val === value; btn.setAttribute('aria-current', isActive ? 'true' : 'false'); (btn as HTMLElement).style.boxShadow = isActive ? `0 0 0 2px ${value}` : 'none'; (btn as HTMLElement).style.outline = 'none'; }); if (swatch) { (swatch as HTMLElement).style.boxShadow = `0 0 0 2px ${value}`; } } if (savedPrimary) { rootStyle.setProperty('--color-primary', savedPrimary); if (swatch) swatch.style.backgroundColor = savedPrimary; updatePrimaryMenuSelection(savedPrimary); }
// Toggle primary menu const primaryToggle = document.getElementById('primaryToggle'); const primaryMenu = document.getElementById('primaryMenu'); function setMenu(open) { if (!primaryMenu || !primaryToggle) return; primaryMenu.classList.toggle('hidden', !open); primaryToggle.setAttribute('aria-expanded', open ? 'true' : 'false'); } if (primaryToggle && primaryMenu) { primaryToggle.addEventListener('click', (e) => { e.stopPropagation(); const open = primaryMenu.classList.contains('hidden'); setMenu(open); }); // Click handlers for color items primaryMenu.querySelectorAll('button[data-color]')?.forEach(btn => { btn.addEventListener('click', (ev) => { const value = btn.getAttribute('data-color'); if (!value) return; rootStyle.setProperty('--color-primary', value); localStorage.setItem('primary', value); if (swatch) swatch.style.backgroundColor = value; updatePrimaryMenuSelection(value); setMenu(false); }); }); // Close on outside click / escape document.addEventListener('click', (evt) => { const target = evt.target as Node | null; if (!target) return; if (!primaryMenu.contains(target) && target !== primaryToggle) setMenu(false); }); document.addEventListener('keydown', (evt) => { if (evt.key === 'Escape') setMenu(false); }); } const btn = document.getElementById('themeToggle'); if (btn) { btn.addEventListener('click', () => { const current = document.documentElement.classList.contains('theme-light') ? 'light' : 'dark'; const next = current === 'light' ? 'dark' : 'light'; localStorage.setItem('theme', next); applyTheme(next); }); } // Sync with system changes if no explicit preference if (!localStorage.getItem('theme') && window.matchMedia) { const mq = window.matchMedia('(prefers-color-scheme: light)'); mq.addEventListener?.('change', (e) => { applyTheme(e.matches ? 'light' : 'dark'); }); } } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } })();</script>