From a8642e72636d27f950fb631b73c7860dac6da33a Mon Sep 17 00:00:00 2001 From: Jason Rasmussen Date: Wed, 8 Jan 2025 16:59:57 -0500 Subject: [PATCH] refactor: clean up --- apps/buy.immich.app/routes/+page.svelte | 1 - .../routes/claim/[[id]]/+page.svelte | 2 +- .../routes/success/+page.svelte | 4 +- .../routes/docker-compose/+page.svelte | 2 +- .../routes/[...rest]/+page.svelte | 1 - src/lib/components/DefaultPageLayout.svelte | 50 ------------------- src/lib/components/Header.svelte | 49 ++++++++++++++++++ src/lib/components/PageContent.svelte | 19 +++++++ src/lib/layouts/DefaultPageLayout.svelte | 23 +++++++++ src/lib/types.ts | 8 +++ 10 files changed, 103 insertions(+), 56 deletions(-) delete mode 100644 src/lib/components/DefaultPageLayout.svelte create mode 100644 src/lib/components/Header.svelte create mode 100644 src/lib/components/PageContent.svelte create mode 100644 src/lib/layouts/DefaultPageLayout.svelte create mode 100644 src/lib/types.ts diff --git a/apps/buy.immich.app/routes/+page.svelte b/apps/buy.immich.app/routes/+page.svelte index 046102e..f422f3b 100644 --- a/apps/buy.immich.app/routes/+page.svelte +++ b/apps/buy.immich.app/routes/+page.svelte @@ -1,5 +1,4 @@ - - - - - - -
-
-
- {@render children?.()} -
-
-
-
-
diff --git a/src/lib/components/Header.svelte b/src/lib/components/Header.svelte new file mode 100644 index 0000000..4a9897c --- /dev/null +++ b/src/lib/components/Header.svelte @@ -0,0 +1,49 @@ + + + diff --git a/src/lib/components/PageContent.svelte b/src/lib/components/PageContent.svelte new file mode 100644 index 0000000..8e6dee5 --- /dev/null +++ b/src/lib/components/PageContent.svelte @@ -0,0 +1,19 @@ + + +
+
+
+ {@render children?.()} +
+
+
+
diff --git a/src/lib/layouts/DefaultPageLayout.svelte b/src/lib/layouts/DefaultPageLayout.svelte new file mode 100644 index 0000000..2fa95e8 --- /dev/null +++ b/src/lib/layouts/DefaultPageLayout.svelte @@ -0,0 +1,23 @@ + + + + +
+ + + + {@render children?.()} + + diff --git a/src/lib/types.ts b/src/lib/types.ts new file mode 100644 index 0000000..8edd25a --- /dev/null +++ b/src/lib/types.ts @@ -0,0 +1,8 @@ +import type { Color, Variants } from '@immich/ui'; + +export type HeaderItem = { + title: string; + href: string; + color?: Color; + variant?: Variants; +};