fixed vercle fr fr final time!

This commit is contained in:
RezHackXYZ 2025-05-11 19:50:46 +05:30
parent 16e697b298
commit bf582efc46
No known key found for this signature in database
4 changed files with 31 additions and 12 deletions

View file

@ -1,12 +1,12 @@
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en" style="height: 100%; margin: 0">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" /> <link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head% %sveltekit.head%
</head> </head>
<body data-sveltekit-preload-data="hover"> <body data-sveltekit-preload-data="hover" style="height: 100%; margin: 0">
<div style="display: contents">%sveltekit.body%</div> <div style="display: contents; height: 100%">%sveltekit.body%</div>
</body> </body>
</html> </html>

View file

@ -3,4 +3,10 @@
let { children } = $props(); let { children } = $props();
</script> </script>
{@render children()} <div class="h-full text-white">{@render children()}</div>
<style>
:root {
background-color: black;
}
</style>

View file

@ -1,2 +1,19 @@
<h1>Welcome to SvelteKit</h1> <script>
<p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p> import { goto } from '$app/navigation';
</script>
<div class="bg-grey-900 flex h-full items-center justify-center">
<div class="flex flex-col items-center justify-center gap-1 rounded-lg bg-gray-900 p-8 shadow-lg">
<h1 class="m-[0] text-6xl">DaKahootClone</h1>
<p class="m-[0] mb-2 text-lg text-gray-400">The best eveer kahoot clone.</p>
<button
on:click={() => goto('/join')}
class="cursor-pointer rounded-full bg-green-700 p-2 transition-all hover:scale-110 hover:-rotate-10"
>Join a game</button
>
<button
class="cursor-pointer rounded-full bg-blue-700 p-2 transition-all hover:scale-110 hover:-rotate-10"
on:click={() => goto('/create')}>Create and Host a game</button
>
</div>
</div>

View file

@ -12,11 +12,7 @@
alert('Please fill in the question for each question.'); alert('Please fill in the question for each question.');
return; return;
} }
if ( if (questions.some((question) => question.answers.some((answer) => answer === ''))) {
questions.some((question) =>
question.answers.some((answer) => answer === '')
)
) {
alert('Please fill in each of the options for each question.'); alert('Please fill in each of the options for each question.');
return; return;
} }
@ -25,7 +21,7 @@
return; return;
} }
alert('Game started!'); alert('Game started!');
} }
</script> </script>