From fac286ab096bdb262237a67a905bcab3a1e60ad1 Mon Sep 17 00:00:00 2001 From: bdbch Date: Sat, 8 Aug 2026 17:15:26 +0200 Subject: [PATCH] feat(playground): add navigation layout and default demo --- apps/playground/src/assets/global.css | 41 +++++++++- apps/playground/src/layouts/Base.astro | 78 ++++++++++++++++++ apps/playground/src/pages/demos/default.astro | 71 ++++++++++++++++ apps/playground/src/pages/index.astro | 80 +------------------ apps/playground/src/styles/global.css | 1 - 5 files changed, 192 insertions(+), 79 deletions(-) create mode 100644 apps/playground/src/layouts/Base.astro create mode 100644 apps/playground/src/pages/demos/default.astro delete mode 100644 apps/playground/src/styles/global.css diff --git a/apps/playground/src/assets/global.css b/apps/playground/src/assets/global.css index 7a01fd1..e41b08e 100644 --- a/apps/playground/src/assets/global.css +++ b/apps/playground/src/assets/global.css @@ -1,3 +1,40 @@ -#editor-mount .cm-content { - padding: 4rem; +@import "tailwindcss"; + +@theme { + --color-background: var(--background); + --color-background-muted: var(--background-muted); + --color-foreground: var(--foreground); + --color-foreground-muted: var(--foreground-muted); + --color-border: var(--border); + --color-border-muted: var(--border-muted); +} + +:root { + --background: var(--color-white); + --background-muted: var(--color-neutral-100); + --foreground: var(--color-black); + --foreground-muted: var(--color-neutral-500); + --border: var(--color-neutral-300); + --border-muted: var(--color-neutral-200); +} + +@media (prefers-color-scheme: dark) { + :root { + --background: var(--color-black); + --background-muted: var(--color-neutral-800); + --foreground: var(--color-white); + --foreground-muted: var(--color-neutral-400); + --border: var(--color-neutral-800); + --border-muted: var(--color-neutral-900); + } +} + +*, +*::before, +*::after { + @apply border-border; +} + +:root { + @apply bg-background text-foreground; } diff --git a/apps/playground/src/layouts/Base.astro b/apps/playground/src/layouts/Base.astro new file mode 100644 index 0000000..ca7a5d0 --- /dev/null +++ b/apps/playground/src/layouts/Base.astro @@ -0,0 +1,78 @@ +--- +import type { $brand } from "astro:schema"; +import "../assets/global.css"; + +interface NavigationItem { + title: string; + href: string; +} + +interface NavigationGroup { + title?: string; + items: NavigationItem[]; +} + +interface Navigation { + groups: NavigationGroup[]; +} + +const navigation: Navigation = { + groups: [ + { + title: "Demos", + items: [{ title: "Default Editor", href: "/demos/default" }], + }, + { + title: "Examples", + items: [ + { title: "Basic Example", href: "/examples/basic" }, + { title: "Advanced Example", href: "/examples/advanced" }, + ], + }, + ], +}; +--- + + + + + + + + + Inkwell Playground + + +
+
+ inkwell + { + navigation.groups.map((group) => ( +
+ {group.title && ( +

+ {group.title} +

+ )} + +
+ )) + } +
+
+ +
+
+ + diff --git a/apps/playground/src/pages/demos/default.astro b/apps/playground/src/pages/demos/default.astro new file mode 100644 index 0000000..e348c51 --- /dev/null +++ b/apps/playground/src/pages/demos/default.astro @@ -0,0 +1,71 @@ +--- +import Base from "../../layouts/Base.astro"; +--- + + +
+ + +
+
+ + + diff --git a/apps/playground/src/pages/index.astro b/apps/playground/src/pages/index.astro index abd5bcd..0002ab2 100644 --- a/apps/playground/src/pages/index.astro +++ b/apps/playground/src/pages/index.astro @@ -1,79 +1,7 @@ --- -import "../assets/global.css"; +import Base from "../layouts/Base.astro"; --- - - - - - - - - Inkwell Playground - - - - -
- - - - + +

Welcome to the inkwell demo

+ diff --git a/apps/playground/src/styles/global.css b/apps/playground/src/styles/global.css deleted file mode 100644 index f1d8c73..0000000 --- a/apps/playground/src/styles/global.css +++ /dev/null @@ -1 +0,0 @@ -@import "tailwindcss"; -- 2.51.2