2023-01-17 20:14:05 +01:00
|
|
|
<!-- svelte-ignore a11y-missing-attribute -->
|
2023-01-18 22:58:07 +01:00
|
|
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
|
|
|
2023-01-17 20:14:05 +01:00
|
|
|
<script lang="ts">
|
2023-01-18 22:58:07 +01:00
|
|
|
import { activeCategory, drinks } from "../stores.js";
|
|
|
|
import { fade, fly } from "svelte/transition";
|
2023-01-17 20:14:05 +01:00
|
|
|
</script>
|
|
|
|
|
2023-01-18 22:58:07 +01:00
|
|
|
<section class="section">
|
|
|
|
<div class="container">
|
|
|
|
{#if $activeCategory == ""}
|
|
|
|
<article class="message is-info">
|
|
|
|
<div class="message-header">
|
|
|
|
<p>hey!</p>
|
|
|
|
</div>
|
|
|
|
<div class="message-body">
|
|
|
|
<p>waehle oben eine kategorie aus, um mit der inventur loszulegen.</p>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
{:else}
|
|
|
|
{#each $drinks as drink, name}
|
|
|
|
{#if drink.type == $activeCategory}
|
|
|
|
<div in:fly="{{ x: 200, duration: 300 }}" out:fly="{{ y: 400, duration: 0 }}" class="box">
|
|
|
|
<h1>{drink.name}</h1>
|
|
|
|
</div>
|
|
|
|
{/if}
|
|
|
|
{/each}
|
|
|
|
{/if}
|
|
|
|
</div>
|
|
|
|
</section>
|