From 4d6a7e8ba4660f8861de8c8b0f1b45a205b5c738 Mon Sep 17 00:00:00 2001
From: ivarlovlie <git@ivarlovlie.no>
Date: Thu, 29 Sep 2022 18:08:43 +0800
Subject: refactor: Transition back to non-namespaced i18n

---
 .../routes/(main)/(public)/sign-up/+page.svelte    | 61 +++++++++++++---------
 1 file changed, 36 insertions(+), 25 deletions(-)

(limited to 'apps/kit/src/routes/(main)/(public)/sign-up/+page.svelte')

diff --git a/apps/kit/src/routes/(main)/(public)/sign-up/+page.svelte b/apps/kit/src/routes/(main)/(public)/sign-up/+page.svelte
index 92ebfbd..8b89190 100644
--- a/apps/kit/src/routes/(main)/(public)/sign-up/+page.svelte
+++ b/apps/kit/src/routes/(main)/(public)/sign-up/+page.svelte
@@ -1,37 +1,48 @@
+<script>
+    import { Button, Input } from "$lib/components";
+    import LL from "$lib/i18n/i18n-svelte";
+
+    const formData = {
+        emailAddress: "",
+        password: "",
+    };
+</script>
+
 <div class="min-h-full flex flex-col justify-center py-12 sm:px-6 lg:px-8">
     <div class="sm:mx-auto sm:w-full sm:max-w-md">
-        <h2 class="mt-6 text-center text-3xl tracking-tight font-bold text-gray-900">Create your new account</h2>
+        <h2
+            class="mt-6 text-center text-3xl tracking-tight font-bold text-gray-900"
+        >
+            {$LL.createYourNewAccount()}
+        </h2>
         <p class="mt-2 text-center text-sm text-gray-600">
-            Or
-            <a href="/sign-in" class="font-medium text-indigo-600 hover:text-indigo-500">sign into an existing one</a>
+            {$LL.or().toLowerCase()}
+            <a href="/sign-in" class="link">{$LL.signIntoYourAccount()}</a>
         </p>
     </div>
 
     <div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
         <div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
-            <form class="space-y-6" action="#" method="POST">
-                <div>
-                    <label for="email" class="block text-sm font-medium text-gray-700"> Email address </label>
-                    <div class="mt-1">
-                        <input id="email" name="email" type="email" autocomplete="email" required
-                               class="appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
-                    </div>
-                </div>
-
-                <div>
-                    <label for="password" class="block text-sm font-medium text-gray-700"> Password </label>
-                    <div class="mt-1">
-                        <input id="password" name="password" type="password" autocomplete="current-password" required
-                               class="appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
-                    </div>
-                </div>
+            <form class="space-y-6" action="#">
+                <Input
+                    label={$LL.emailAddress()}
+                    id="email"
+                    name="email"
+                    autocomplete="email"
+                    required
+                    type="email"
+                    bind:value={formData.emailAddress}
+                />
 
-                <div>
-                    <button type="submit"
-                            class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
-                        Create account
-                    </button>
-                </div>
+                <Input
+                    label={$LL.password()}
+                    id="password"
+                    name="password"
+                    required
+                    type="password"
+                    bind:value={formData.password}
+                />
+                <Button type="submit" text={$LL.submit()} fullWidth />
             </form>
         </div>
     </div>
-- 
cgit v1.3

