boredgame/src/routes/(app)/+page.svelte

57 lines
1.2 KiB
Svelte
Raw Normal View History

2022-01-28 05:27:12 +00:00
<script lang="ts">
// import TextSearch from '$lib/components/search/textSearch/header.svelte';
2022-09-29 22:22:01 +00:00
import RandomSearch from '$lib/components/search/random/index.svelte';
import Game from '$lib/components/game/index.svelte';
2023-09-14 01:43:22 +00:00
import logo from '$lib/assets/bored-game.png';
// import Random from '$lib/components/random/header.svelte';
2022-09-29 22:22:01 +00:00
export let data;
const { randomGames } = data;
2022-01-28 05:27:12 +00:00
</script>
<h1>Search Boardgames!</h1>
<div class="game-search">
2022-09-29 22:22:01 +00:00
<section>
<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">
2023-05-21 05:18:04 +00:00
<RandomSearch data={data.form} />
2023-09-12 17:56:58 +00:00
<!-- <Random /> -->
2022-09-29 22:22:01 +00:00
</div>
</section>
<!-- <TextSearch showButton advancedSearch data={data.form} /> -->
</div>
<section>
{#each randomGames as game (game.id)}
<Game {game} />
{/each}
</section>
<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>