diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-09-20 09:24:27 +0200 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-09-20 09:24:27 +0200 |
| commit | a9072370ca1eb9a5cce928b1d487db0f307edea6 (patch) | |
| tree | 59c3c23df930a8b5f888dc7813923abf4ceefed4 /old-apps/frontpage/src | |
| parent | 56fa963a1d63cbe0bf28e29e717cceaa417c45c1 (diff) | |
| download | greatoffice-a9072370ca1eb9a5cce928b1d487db0f307edea6.tar.xz greatoffice-a9072370ca1eb9a5cce928b1d487db0f307edea6.zip | |
feat: Move old apps into it's own directory
Diffstat (limited to 'old-apps/frontpage/src')
| -rw-r--r-- | old-apps/frontpage/src/app.html | 16 | ||||
| -rw-r--r-- | old-apps/frontpage/src/hooks.ts | 7 | ||||
| -rw-r--r-- | old-apps/frontpage/src/routes/__layout-docs.svelte | 13 | ||||
| -rw-r--r-- | old-apps/frontpage/src/routes/__layout.svelte | 80 | ||||
| -rw-r--r-- | old-apps/frontpage/src/routes/app.scss | 8 | ||||
| -rw-r--r-- | old-apps/frontpage/src/routes/docs/index@docs.svelte | 5 | ||||
| -rw-r--r-- | old-apps/frontpage/src/routes/index.svelte | 4 | ||||
| -rw-r--r-- | old-apps/frontpage/src/routes/privacy.svelte | 5 | ||||
| -rw-r--r-- | old-apps/frontpage/src/routes/terms.svelte | 5 |
9 files changed, 143 insertions, 0 deletions
diff --git a/old-apps/frontpage/src/app.html b/old-apps/frontpage/src/app.html new file mode 100644 index 0000000..922aeec --- /dev/null +++ b/old-apps/frontpage/src/app.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"/> + <link rel="icon" + href="%sveltekit.assets%/favicon.png"/> + <link rel="stylesheet" href="%sveltekit.assets%/preload.css"> + <script src="%sveltekit.assets%/preload.js"></script> + <meta name="viewport" + content="width=device-width, initial-scale=1"/> + %sveltekit.head% +</head> +<body> +<div>%sveltekit.body%</div> +</body> +</html> diff --git a/old-apps/frontpage/src/hooks.ts b/old-apps/frontpage/src/hooks.ts new file mode 100644 index 0000000..ca80d40 --- /dev/null +++ b/old-apps/frontpage/src/hooks.ts @@ -0,0 +1,7 @@ +/** @type {import("@sveltejs/kit").Handle} */ +export async function handle({event, resolve}) { + const response = await resolve(event, { + ssr: false + }); + return response; +}
\ No newline at end of file diff --git a/old-apps/frontpage/src/routes/__layout-docs.svelte b/old-apps/frontpage/src/routes/__layout-docs.svelte new file mode 100644 index 0000000..d0a17ef --- /dev/null +++ b/old-apps/frontpage/src/routes/__layout-docs.svelte @@ -0,0 +1,13 @@ +<script> + import ThemeSwitcher from "$shared/components/theme-switcher.svelte"; +</script> +<main class="padding-md"> + <nav> + <a href="/">Go back</a> + </nav> + <slot></slot> + <div class="position-fixed right-0 top-0 margin-md z-index-2"> + <ThemeSwitcher/> + </div> + +</main> diff --git a/old-apps/frontpage/src/routes/__layout.svelte b/old-apps/frontpage/src/routes/__layout.svelte new file mode 100644 index 0000000..aa70e51 --- /dev/null +++ b/old-apps/frontpage/src/routes/__layout.svelte @@ -0,0 +1,80 @@ +<script> + import {portal_base} from "$shared/lib/configuration"; + import BlowoutToolbelt from "$shared/components/blowout-toolbelt.svelte"; + import "./app.scss"; + import {afterNavigate} from "$app/navigation"; + import {page} from "$app/stores"; + + let showSidebar = false; + afterNavigate(() => showSidebar = false); +</script> + +<div class="padding-component flex justify-between hide@sm"> + <span class="text-lg">Greatoffice</span> + <button class="btn btn--primary" + on:click={() => showSidebar = !showSidebar}>{showSidebar ? "Close" : "Show"} menu + </button> +</div> + +<style> + .nav-active { + color: var(--color-primary); + background: hsla(var(--color-contrast-higher-h), var(--color-contrast-higher-s), var(--color-contrast-higher-l), 0.075) + } +</style> +<BlowoutToolbelt/> +<div class="flex@sm"> + <aside class="sidebar {showSidebar ? 'sidebar--is-visible': ''}"> + <div class="sidebar__panel"> + <header class="sidebar__header bg padding-y-sm padding-x-md border-bottom z-index-2"> + <span class="text-md text-truncate">Menu</span> + <button class="reset sidebar__close-btn" + on:click={() => showSidebar = !showSidebar}> + <svg class="icon icon--xs" + viewBox="0 0 16 16"><title>Close panel</title> + <g stroke-width="2" + stroke="currentColor" + fill="none" + stroke-linecap="round" + stroke-linejoin="round" + stroke-miterlimit="10"> + <line x1="13.5" + y1="2.5" + x2="2.5" + y2="13.5"></line> + <line x1="2.5" + y1="2.5" + x2="13.5" + y2="13.5"></line> + </g> + </svg> + </button> + </header> + <div class="position-relative padding-sm z-index-1"> + <nav class="flex flex-column gap-xs text-lg"> + <span class="text-lg hide block@sm">Greatoffice</span> + <a href="/" + class="reset" + title="Learn about the Greatoffice platform" + class:nav-active={$page.url.pathname === "/"}>About</a> + <a href="/privacy" + title="Read our privacy policy" + class="reset" + class:nav-active={$page.url.pathname.startsWith("/privacy")}>Privacy Policy</a> + <a href="/terms" + title="Read our terms of service" + class="reset" + class:nav-active={$page.url.pathname.startsWith("/terms")}>Terms of service</a> + <a href="{portal_base()}" + title="Login to you Greatoffice account" + >Login</a> + <a href="/docs" + title="Learn how to use Greatoffice">Documentation</a> + </nav> + </div> + </div> + </aside> + <main class="position-relative padding-sm z-index-1 flex-grow"> + <slot></slot> + </main> +</div> diff --git a/old-apps/frontpage/src/routes/app.scss b/old-apps/frontpage/src/routes/app.scss new file mode 100644 index 0000000..6ba6e97 --- /dev/null +++ b/old-apps/frontpage/src/routes/app.scss @@ -0,0 +1,8 @@ +@use '../../web-shared/src/styles/base' as *; +@use '../../web-shared/src/styles/custom-style/colors'; +@use '../../web-shared/src/styles/custom-style/spacing'; +@use '../../web-shared/src/styles/custom-style/shared-styles'; +@use '../../web-shared/src/styles/custom-style/typography'; +@use '../../web-shared/src/styles/custom-style/util'; +@use '../../web-shared/src/styles/components/responsive-sidebar'; +@use '../../web-shared/src/styles/components/light-dark-switch'; diff --git a/old-apps/frontpage/src/routes/docs/index@docs.svelte b/old-apps/frontpage/src/routes/docs/index@docs.svelte new file mode 100644 index 0000000..8d334f7 --- /dev/null +++ b/old-apps/frontpage/src/routes/docs/index@docs.svelte @@ -0,0 +1,5 @@ +<svelte:head> + <title>Docs - Greatoffice</title> +</svelte:head> + +<h1>Documentation</h1>
\ No newline at end of file diff --git a/old-apps/frontpage/src/routes/index.svelte b/old-apps/frontpage/src/routes/index.svelte new file mode 100644 index 0000000..3bd7d66 --- /dev/null +++ b/old-apps/frontpage/src/routes/index.svelte @@ -0,0 +1,4 @@ +<svelte:head> + <title>About - Greatoffice</title> +</svelte:head> +<h1>About</h1> diff --git a/old-apps/frontpage/src/routes/privacy.svelte b/old-apps/frontpage/src/routes/privacy.svelte new file mode 100644 index 0000000..6802626 --- /dev/null +++ b/old-apps/frontpage/src/routes/privacy.svelte @@ -0,0 +1,5 @@ +<svelte:head> + <title>Privacy Policy - Greatoffice</title> +</svelte:head> + +<h1>Privacy Policy</h1> diff --git a/old-apps/frontpage/src/routes/terms.svelte b/old-apps/frontpage/src/routes/terms.svelte new file mode 100644 index 0000000..ef22d9c --- /dev/null +++ b/old-apps/frontpage/src/routes/terms.svelte @@ -0,0 +1,5 @@ +<svelte:head> + <title>Terms of service - Greatoffice</title> +</svelte:head> + +<h1>Terms of service</h1> |
