homepage/src/routes/rezepte/+page.svelte

41 lines
962 B
Svelte
Raw Normal View History

2023-06-19 00:32:51 +02:00
<script lang="ts">
import type { PageData } from './$types';
2023-06-19 20:38:45 +02:00
import MediaScroller from '$lib/components/MediaScroller.svelte';
import Recipes from '$lib/components/Recipes.svelte';
import AddButton from '$lib/components/AddButton.svelte';
2023-06-19 20:38:45 +02:00
import Card from '$lib/components/Card.svelte';
import Search from '$lib/components/Search.svelte';
2023-06-19 00:32:51 +02:00
export let data: PageData;
export let current_month = new Date().getMonth() + 1
</script>
2023-06-25 10:17:12 +02:00
<style>
h1,
h2{
max-width: 1000px;
margin-left: 5rem;
margin-bottom: 0;
}
h1{
font-size: 4rem;
}
h2{
font-size: 3rem;
margin-bottom: 1rem;
}
</style>
2023-06-19 00:32:51 +02:00
<h1>Rezepte</h1>
<section>
2023-06-25 10:17:12 +02:00
<MediaScroller title="In Saison:">
2023-06-19 00:32:51 +02:00
{#each data.season as recipe}
<Card {recipe} {current_month} search=""></Card>
2023-06-19 00:32:51 +02:00
{/each}
2023-06-19 20:38:45 +02:00
</MediaScroller>
2023-06-19 00:32:51 +02:00
</section>
<Search></Search>
2023-06-25 10:17:12 +02:00
<Recipes title="Alle Rezepte:">
2023-06-19 20:38:45 +02:00
{#each data.all_brief as recipe}
<Card {recipe} {current_month}></Card>
{/each}
</Recipes>
<AddButton></AddButton>