From e50458595b12d164ca3ee4ef773bfdf634fdc9c8 Mon Sep 17 00:00:00 2001 From: Hare Date: Fri, 14 Aug 2026 10:41:37 +0900 Subject: [PATCH] Redesign site and streamline playground --- .../src/layouts/ManualLayout.astro | 45 +- site/decodal-site/src/lib/docs.js | 11 + site/decodal-site/src/lib/highlight.js | 4 +- .../src/pages/docs/[...slug].astro | 5 +- site/decodal-site/src/pages/docs/index.astro | 2 +- site/decodal-site/src/pages/index.astro | 216 ++- site/decodal-site/src/pages/playground.astro | 28 +- site/decodal-site/src/scripts/playground.js | 122 +- site/decodal-site/src/style.css | 1424 ++++++++++++----- 9 files changed, 1362 insertions(+), 495 deletions(-) diff --git a/site/decodal-site/src/layouts/ManualLayout.astro b/site/decodal-site/src/layouts/ManualLayout.astro index c89f92f..1935a49 100644 --- a/site/decodal-site/src/layouts/ManualLayout.astro +++ b/site/decodal-site/src/layouts/ManualLayout.astro @@ -2,7 +2,20 @@ import { nav } from '../lib/docs.js'; import '../style.css'; -const { title = 'Decodal', active = '', playground = false, frontpage = false } = Astro.props; +const { + title = 'Decodal', + description = 'Decodal is a deterministic data language for configuration, constraints, and defaults.', + active = '', + playground = false, + frontpage = false, +} = Astro.props; + +const pathname = Astro.url.pathname; +const language = active ? 'ja' : 'en'; + +function isCurrent(path) { + return pathname === path || (path !== '/' && pathname.startsWith(path)); +} function renderNav(items, prefix = []) { return `