aboutsummaryrefslogtreecommitdiffstats
path: root/website/src/routes/login/+page.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'website/src/routes/login/+page.svelte')
-rw-r--r--website/src/routes/login/+page.svelte94
1 files changed, 51 insertions, 43 deletions
diff --git a/website/src/routes/login/+page.svelte b/website/src/routes/login/+page.svelte
index 29be51e..1226799 100644
--- a/website/src/routes/login/+page.svelte
+++ b/website/src/routes/login/+page.svelte
@@ -1,51 +1,59 @@
-<script>
- import Logo from "$lib/components/logo.svelte";
+<script lang="ts">
+ import Logo from '$lib/components/logo.svelte';
+ import { PUBLIC_BACKEND_URL } from '$env/static/public';
+
+ const url = (provider: string): string => {
+ const url = new URL('/auth', PUBLIC_BACKEND_URL);
+ url.searchParams.set('provider', provider);
+ return url.toString();
+ };
</script>
-<div class="flex w-full items-center justify-center">
- <div
- class="w-full max-w-md transform-gpu space-y-8 rounded-2xl border border-gray-100 bg-white p-10 shadow-xl transition-all"
- >
- <div class="text-center">
- <div class="mx-auto flex h-12 w-12 items-center justify-center rounded-full">
- <Logo class="h-full w-full" />
- </div>
- <h2 class="mt-6 text-3xl font-extrabold text-gray-900">sellershut</h2>
- <p class="mt-2 text-sm text-gray-600">Please sign in to access the platform</p>
- </div>
- <div class="mt-8 space-y-4">
- <button
- class="group relative flex w-full transform-gpu items-center justify-center rounded-xl border border-gray-900 bg-white px-4 py-3 text-sm font-medium text-gray-900 transition-all duration-200 hover:bg-gray-50 focus:ring-2 focus:ring-rose-500 focus:ring-offset-2 focus:outline-none active:scale-[0.98]"
- >
- <span class="absolute inset-y-0 left-0 flex items-center pl-4">
- <svg
- class="h-5 w-5 text-gray-400 transition-colors duration-200 group-hover:text-[#5865F2]"
- fill="currentColor"
- viewBox="0 0 24 24"
- >
- <path
- d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.419 0 1.334-.956 2.419-2.157 2.419zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.419 0 1.334-.946 2.419-2.157 2.419z"
- />
- </svg>
- </span>
- <span class="text-gray-700">Continue with Discord</span>
- </button>
+<div
+ class="w-full max-w-md transform-gpu space-y-8 rounded-2xl border border-gray-100 bg-white p-10 shadow-xl transition-all"
+>
+ <div class="text-center">
+ <div class="mx-auto flex h-24 w-24 items-center justify-center rounded-full">
+ <Logo class="h-full w-full" />
</div>
+ <h2 class="mt-6 text-3xl font-extrabold text-gray-900">sellershut</h2>
+ <p class="mt-2 text-sm text-gray-600">Please sign in to access the platform</p>
+ </div>
- <div class="mt-6 flex items-center justify-between text-xs">
- <span class="w-1/5 border-b border-gray-200"></span>
- <span class="text-gray-400 lowercase">sellershut.com</span>
- <span class="w-1/5 border-b border-gray-200"></span>
- </div>
+ <div class="mt-8 space-y-4">
+ <a
+ href={url('discord')}
+ target="_blank" rel="noopener noreferrer"
+ class="group relative flex w-full transform-gpu items-center justify-center rounded-xl border border-gray-900 bg-white px-4 py-3 text-sm font-medium text-gray-900 transition-all duration-200 hover:bg-gray-50 focus:ring-2 focus:ring-rose-500 focus:ring-offset-2 focus:outline-none active:scale-[0.98]"
+ >
+ <span class="absolute inset-y-0 left-0 flex items-center pl-4">
+ <svg
+ class="h-5 w-5 text-gray-400 transition-colors duration-200 group-hover:text-[#5865F2]"
+ fill="currentColor"
+ viewBox="0 0 24 24"
+ >
+ <path
+ d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.419 0 1.334-.956 2.419-2.157 2.419zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.419 0 1.334-.946 2.419-2.157 2.419z"
+ />
+ </svg>
+ </span>
+ <span class="text-gray-700">Continue with Discord</span>
+ </a>
+ </div>
- <p class="text-center text-xs text-gray-500">
- By signing in, you agree to our
- <a
- href="/"
- class="font-medium text-rose-600 underline underline-offset-4 hover:text-rose-500"
- >Terms of Service</a
- >
- </p>
+ <div class="mt-6 flex items-center justify-between text-xs">
+ <span class="w-1/5 border-b border-gray-200"></span>
+ <span class="text-gray-400 lowercase">sellershut.com</span>
+ <span class="w-1/5 border-b border-gray-200"></span>
</div>
+
+ <p class="text-center text-xs text-gray-500">
+ By signing in, you agree to our
+ <a
+ href="/"
+ class="font-medium text-rose-600 underline underline-offset-4 hover:text-rose-500"
+ >Terms of Service</a
+ >
+ </p>
</div>