2022-01-28 05:27:12 +00:00
|
|
|
<script lang="ts">
|
2023-05-15 04:08:30 +00:00
|
|
|
import { superForm } from 'sveltekit-superforms/client';
|
2022-09-29 22:22:01 +00:00
|
|
|
import TextSearch from '$lib/components/search/textSearch/index.svelte';
|
|
|
|
|
import RandomSearch from '$lib/components/search/random/index.svelte';
|
|
|
|
|
import Random from '$lib/components/random/index.svelte';
|
|
|
|
|
|
2023-05-15 04:08:30 +00:00
|
|
|
export let data;
|
|
|
|
|
const { form, errors, constraints } = superForm(data?.form);
|
2022-01-28 05:27:12 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<svelte:head>
|
2022-09-29 22:22:01 +00:00
|
|
|
<title>Bored Game | Home</title>
|
2022-01-28 05:27:12 +00:00
|
|
|
</svelte:head>
|
|
|
|
|
|
2022-04-24 23:38:12 +00:00
|
|
|
<h1>Search Boardgames!</h1>
|
2022-07-27 22:05:22 +00:00
|
|
|
<div class="game-search">
|
2022-09-29 22:22:01 +00:00
|
|
|
<section>
|
2022-11-10 04:02:38 +00:00
|
|
|
<p style="margin: 1rem 0;">
|
|
|
|
|
Input your requirements to search for board games that match your criteria.
|
|
|
|
|
</p>
|
2022-09-29 22:22:01 +00:00
|
|
|
<p>Or pick a random game!</p>
|
|
|
|
|
<div class="random-buttons">
|
|
|
|
|
<RandomSearch />
|
|
|
|
|
<Random />
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
2023-05-15 04:08:30 +00:00
|
|
|
<TextSearch showButton advancedSearch {form} {errors} {constraints} />
|
2022-04-24 23:38:12 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
2022-09-29 22:22:01 +00:00
|
|
|
.game-search {
|
|
|
|
|
display: grid;
|
|
|
|
|
gap: 2rem;
|
|
|
|
|
|
|
|
|
|
section {
|
|
|
|
|
display: grid;
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.random-buttons {
|
|
|
|
|
display: flex;
|
|
|
|
|
place-content: space-between;
|
|
|
|
|
place-items: center;
|
|
|
|
|
|
|
|
|
|
@media (max-width: 650px) {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: 1fr 1fr;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-01-28 05:27:12 +00:00
|
|
|
</style>
|