From 2b58ff029107b23617d8c4b246de77876b3bf053 Mon Sep 17 00:00:00 2001
From: ivarlovlie <git@ivarlovlie.no>
Date: Wed, 28 Sep 2022 00:21:37 +0800
Subject: feat: Move frontend into layout group (main)

This enables /book to load without the usual layout (app layout)
---
 apps/kit/src/routes/book/+layout.svelte | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

(limited to 'apps/kit/src/routes/book/+layout.svelte')

diff --git a/apps/kit/src/routes/book/+layout.svelte b/apps/kit/src/routes/book/+layout.svelte
index 0fcbd51..85ba907 100644
--- a/apps/kit/src/routes/book/+layout.svelte
+++ b/apps/kit/src/routes/book/+layout.svelte
@@ -1,9 +1,22 @@
 <script>
+    import { page } from "$app/stores";
+    import "../../app.pcss";
 </script>
 
 <div id="wrapper">
-    <nav>
-        <a href="/book/alerts" class="link">Alerts</a>
+    <nav class="flex flex-col">
+        <a
+            href="/book/alerts"
+            class="link"
+            class:active={$page.url.pathname.startsWith("/book/alerts")}
+            >Alerts</a
+        >
+        <a
+            href="/book/buttons"
+            class="link"
+            class:active={$page.url.pathname.startsWith("/book/alerts")}
+            >Buttons</a
+        >
     </nav>
     <main>
         <slot />
-- 
cgit v1.3

