Something went wrong. Try again.
Blog Built with AT Protocol skiddle.id
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293<nav id="sidebar" class="fixed left-0 top-12 lg:top-0 h-[calc(100vh-3rem)] lg:h-screen w-56 border-r flex flex-col gap-1 p-4 z-40 lg:z-20 transform -translate-x-full lg:translate-x-0 transition-transform duration-200 ease-out" style="background: var(--color-bg); border-color: var(--color-border)"> <!-- Brand — editorial, no terminal --> <div class="hidden lg:flex flex-col gap-2 mb-3"> <a href="/" class="flex items-center gap-2 no-underline"> <img src="https://github.com/arcestia.png" alt="avatar" class="size-8 rounded-full" style="border:1px solid var(--color-border)" /> <span style="font-family: var(--font-heading); font-weight:700; color: var(--color-text)">Skiddle</span> <span class="text-xs px-2 py-0.5 rounded-full" style="background:#eef6ff; border:1px solid var(--color-border); color: var(--color-text-muted)">{__GIT_TAG__ || __GIT_DESCRIBE__ || "v3.1"}</span> </a> <p class="text-xs leading-snug" style="color: var(--color-text-muted)">Night-shift platform engineer — Bangkok.</p> </div>
<!-- Nav links — editorial --> <div class="flex flex-col gap-0.5"> <a class="hover:text-[var(--color-primary)] py-1.5 px-2 rounded text-sm transition-colors" href="/" style="font-family: var(--font-heading)">Home</a> <a class="hover:text-[var(--color-primary)] py-1.5 px-2 rounded text-sm transition-colors" href="/posts">Posts</a> <a class="hover:text-[var(--color-primary)] py-1.5 px-2 rounded text-sm transition-colors" href="/topics/">Topics</a> <a class="hover:text-[var(--color-primary)] py-1.5 px-2 rounded text-sm transition-colors" href="/about">About</a> <a class="hover:text-[var(--color-primary)] py-1.5 px-2 rounded text-sm transition-colors" href="/works">Works</a> <a class="hover:text-[var(--color-primary)] py-1.5 px-2 rounded text-sm transition-colors" href="/uses">Uses</a> <a class="hover:text-[var(--color-primary)] py-1.5 px-2 rounded text-sm transition-colors" href="/rss.xml">RSS</a> </div>
<!-- Search — always visible, editorial card --> <form action="/posts" method="get" class="mt-3 px-0"> <label class="sr-only" for="siteSearch">Search</label> <div class="relative"> <input id="siteSearch" type="search" name="q" placeholder="Search posts..." style="height:2rem; width:100%; background:white; border:1px solid var(--color-border); border-radius:999px; padding:0 2.25rem 0 0.75rem; font-size:12px; color: var(--color-text)" class="placeholder:text-[var(--color-muted)] focus:outline-none focus:border-[var(--color-primary)] transition-colors" /> <span aria-hidden="true" class="absolute right-2 top-1/2 -translate-y-1/2 size-6 grid place-items-center rounded-full" style="background:#eef6ff; border:1px solid var(--color-border)"><i class="fa-solid fa-magnifying-glass text-[11px]" style="color: var(--color-muted)"></i></span> </div> </form>
<!-- Now playing — via Last.fm --> <div id="nowPlayingCard" class="mt-3 p-3 rounded-xl hidden" style="background:white; border:1px solid var(--color-border); box-shadow: var(--shadow, 0 4px 12px hsla(210,60%,88%,.5))"> <div class="text-[10px] uppercase tracking-widest" style="color: var(--color-muted); font-family: var(--font-heading)">Now playing</div> <div id="nowPlayingContent" class="text-xs mt-1 leading-snug" style="color: var(--color-text)">Loading…</div> <a id="nowPlayingLink" href="#" target="_blank" rel="noopener noreferrer" class="text-[11px] mt-1 inline-flex gap-1 items-center hidden" style="color: var(--color-primary)"><i class="fa-brands fa-lastfm text-[11px]"></i> <span>Open in Last.fm</span></a> </div>
<!-- Bottom — socials only (pure light, no theme/color picker) --> <div class="mt-auto flex items-center gap-2 pt-3" style="border-top:1px solid var(--color-border)"> <a class="inline-flex items-center justify-center size-8 hover:text-[var(--color-primary)] hover:bg-[var(--color-bg-alt)] rounded 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-[18px]" aria-hidden="true"></i> </a> <a class="inline-flex items-center justify-center size-8 hover:text-[var(--color-primary)] hover:bg-[var(--color-bg-alt)] rounded 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-[18px]" aria-hidden="true"></i> </a> </div></nav>
<script> (function() { function init() { // Now playing — fetch lastfm via /api/now-playing (if available) (async function() { const card = document.getElementById('nowPlayingCard'); const content = document.getElementById('nowPlayingContent'); const link = document.getElementById('nowPlayingLink'); if (!card || !content) return; try { const res = await fetch('/api/now-playing'); if (!res.ok) throw new Error('no api'); const data = await res.json(); const track = data.track || data.nowPlaying || data; const title = track.name || track.title || track.track; const artist = track.artist?.['#text'] || track.artist || ''; if (!title) throw new Error('empty'); card.classList.remove('hidden'); content.textContent = artist ? `${title} — ${artist}` : String(title); if (link && track.url) { link.href = track.url; link.classList.remove('hidden'); } } catch (_) { try { const p = document.createElement('p'); p.className = 'text-xs'; p.style.color = 'var(--color-muted)'; p.textContent = 'Now playing — via Last.fm'; content.textContent = ''; content.appendChild(p); card.classList.remove('hidden'); } catch (__) {} } })(); } if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init); else init(); })();</script>