diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-10-09 18:37:14 +0200 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-10-09 18:37:14 +0200 |
| commit | 1bb31b298cab4552446aca9957f9592a34b2134f (patch) | |
| tree | 69b5e1c81f8e0cf9c5e7b0c6a87c4b72d40316eb /code | |
| parent | 3104e70b3c5947a42baf124cf2c2230cf4acea79 (diff) | |
| download | greatoffice-1bb31b298cab4552446aca9957f9592a34b2134f.tar.xz greatoffice-1bb31b298cab4552446aca9957f9592a34b2134f.zip | |
refactor: Don't render /book in prod
Diffstat (limited to 'code')
| -rw-r--r-- | code/app/src/routes/book/+layout.svelte | 28 | ||||
| -rw-r--r-- | code/app/src/routes/book/+layout.ts | 3 | ||||
| -rw-r--r-- | code/app/src/routes/book/toggles/+page.svelte | 4 |
3 files changed, 9 insertions, 26 deletions
diff --git a/code/app/src/routes/book/+layout.svelte b/code/app/src/routes/book/+layout.svelte index aeed0d4..f5287e0 100644 --- a/code/app/src/routes/book/+layout.svelte +++ b/code/app/src/routes/book/+layout.svelte @@ -5,30 +5,10 @@ <div id="wrapper"> <nav> - <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/buttons")} - >Buttons</a - > - <a - href="/book/toggles" - class="link" - class:active={$page.url.pathname.startsWith("/book/toggles")} - >Toggles</a - > - <a - href="/book/inputs" - class="link" - class:active={$page.url.pathname.startsWith("/book/inputs")} - >Inputs</a - > + <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/buttons")}>Buttons</a> + <a href="/book/toggles" class="link" class:active={$page.url.pathname.startsWith("/book/toggles")}>Toggles</a> + <a href="/book/inputs" class="link" class:active={$page.url.pathname.startsWith("/book/inputs")}>Inputs</a> </nav> <main> <slot /> diff --git a/code/app/src/routes/book/+layout.ts b/code/app/src/routes/book/+layout.ts new file mode 100644 index 0000000..d297dfd --- /dev/null +++ b/code/app/src/routes/book/+layout.ts @@ -0,0 +1,3 @@ +export const ssr = import.meta.env.DEV; +export const csr = import.meta.env.DEV; +export const prerender = import.meta.env.DEV;
\ No newline at end of file diff --git a/code/app/src/routes/book/toggles/+page.svelte b/code/app/src/routes/book/toggles/+page.svelte index 94228b4..730e6f2 100644 --- a/code/app/src/routes/book/toggles/+page.svelte +++ b/code/app/src/routes/book/toggles/+page.svelte @@ -23,5 +23,5 @@ <section> <h2>Label / Description (right aligned)</h2> - <Switch label="Label" description="Some text" rightAlignedLabelDescription /> -</section>
\ No newline at end of file + <Switch label="Label" description="Some text" rightAlignedLabelDescription /> +</section> |
