chore: Update login and signup pages with background images
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
<!-- routes/login/+page.svelte -->
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { enhance } from "$app/forms";
|
import { enhance } from "$app/forms";
|
||||||
import { goto } from "$app/navigation";
|
import { goto } from "$app/navigation";
|
||||||
@@ -7,9 +6,12 @@
|
|||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
let quote: string = "";
|
let quote: string = "";
|
||||||
let errors: { message?: string } = {};
|
let errors: { message?: string } = {};
|
||||||
|
let backgroundImageUrl = "https://source.unsplash.com/random/?mountains";
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
quote = getRandomQuote();
|
quote = getRandomQuote();
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleSubmit: SubmitFunction = async ({ formData, action, cancel }) => {
|
const handleSubmit: SubmitFunction = async ({ formData, action, cancel }) => {
|
||||||
const response = await fetch(action, {
|
const response = await fetch(action, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@@ -31,6 +33,11 @@
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="min-h-screen bg-no-repeat bg-cover flex items-center justify-center"
|
||||||
|
style="background-image: url('{backgroundImageUrl}')"
|
||||||
|
>
|
||||||
|
<div class="card card-compact w-96 bg-base-100 shadow-xl p-6">
|
||||||
<article class="text-center text-4xl font-extrabold">
|
<article class="text-center text-4xl font-extrabold">
|
||||||
<h1>Sign in</h1>
|
<h1>Sign in</h1>
|
||||||
</article>
|
</article>
|
||||||
@@ -68,6 +75,8 @@
|
|||||||
<!-- <footer class="text-sm">- Steve Jobs</footer> -->
|
<!-- <footer class="text-sm">- Steve Jobs</footer> -->
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>Login | AdventureLog</title>
|
<title>Login | AdventureLog</title>
|
||||||
|
|||||||
@@ -3,12 +3,20 @@
|
|||||||
import { enhance } from "$app/forms";
|
import { enhance } from "$app/forms";
|
||||||
import { getRandomQuote } from "$lib";
|
import { getRandomQuote } from "$lib";
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
|
|
||||||
|
let backgroundImageUrl = "https://source.unsplash.com/random/?mountains";
|
||||||
|
|
||||||
let quote: string = "";
|
let quote: string = "";
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
quote = getRandomQuote();
|
quote = getRandomQuote();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="min-h-screen bg-no-repeat bg-cover flex items-center justify-center"
|
||||||
|
style="background-image: url('{backgroundImageUrl}')"
|
||||||
|
>
|
||||||
|
<div class="card card-compact w-96 bg-base-100 shadow-xl p-6">
|
||||||
<article class="text-center text-4xl font-extrabold">
|
<article class="text-center text-4xl font-extrabold">
|
||||||
<h1>Signup</h1>
|
<h1>Signup</h1>
|
||||||
</article>
|
</article>
|
||||||
@@ -52,6 +60,8 @@
|
|||||||
<!-- <footer class="text-sm">- Steve Jobs</footer> -->
|
<!-- <footer class="text-sm">- Steve Jobs</footer> -->
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- username first last pass -->
|
<!-- username first last pass -->
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user