From 9b2c63d92ff77ebce0f90a7be05437504422bf45 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Sat, 11 Feb 2023 23:37:12 +0100 Subject: feat: Render localized content from sanity --- src/components/contact.svelte | 79 ++++++++++++++++++++++------------- src/components/header.svelte | 12 ++++++ src/components/locale-switcher.svelte | 46 ++++++++++++++++++++ 3 files changed, 108 insertions(+), 29 deletions(-) create mode 100644 src/components/header.svelte create mode 100644 src/components/locale-switcher.svelte (limited to 'src/components') diff --git a/src/components/contact.svelte b/src/components/contact.svelte index c7b0be3..9f5bb98 100644 --- a/src/components/contact.svelte +++ b/src/components/contact.svelte @@ -1,45 +1,66 @@ + +
-

Contact Us

+

{$LL.contact.title()}

-
-
Address
-
- {address1}
{address2}
{address3} -
-
- -
-
Email
-
- {email} -
-
- -
-
Phone
-
-

{phone}

-

{phoneHours}

-
-
+ {#if (model.addressLines?.length ?? 0) > 0} +
+
{$LL.contact.addressTitle()}
+
+ {#each model.addressLines as line} + {line}
+ {/each} +
+
+ {/if} + {#if model.email} +
+
{$LL.contact.emailTitle()}
+
+ {model.email} +
+
+ {/if} + {#if model.phone} +
+
{$LL.contact.phoneTitle()}
+
+

{model.phone}

+ {#if model.phoneHours} +

{model.phoneHours}

+ {/if} +
+
+ {/if}
-
diff --git a/src/components/header.svelte b/src/components/header.svelte new file mode 100644 index 0000000..5789196 --- /dev/null +++ b/src/components/header.svelte @@ -0,0 +1,12 @@ + + +
+ +

Auroraklinikken

+
+ + +
diff --git a/src/components/locale-switcher.svelte b/src/components/locale-switcher.svelte new file mode 100644 index 0000000..938d18a --- /dev/null +++ b/src/components/locale-switcher.svelte @@ -0,0 +1,46 @@ + + + + +
    + {#each locales as l} +
  • + + {l} + +
  • + {/each} +
-- cgit v1.3