web/src/pages/inventory/index.astro
61 lines · 1557 bytes
1---
2
3import Layout from '@layouts/Layout.astro';
4import SavedServices from '@components/things/SavedServices.svelte';
5import GetSharableLink from '@components/things/GetSharableLink.svelte';
6
7import { fetchData } from '@utils/fetch-data';
8import Button from '@components/form/Button.astro';
9import EditableTitle from '@components/form/EditableTitle.svelte';
10import type { Category } from '../../types/Service';
11
12const categories = (await fetchData())?.categories || [] as Category[];
13
14---
15
16<Layout title="Saved Services">
17 <main>
18 <div class="top-row">
19 <!-- <h2>Inventory</h2> -->
20 <EditableTitle client:load />
21 <GetSharableLink client:load />
22 </div>
23 <SavedServices allData={categories} client:load />
24 <div class="buttons">
25 <p>Not found what you're looking for?</p>
26 <Button url="/all">Browse Services</Button>
27 </div>
28 </main>
29</Layout>
30
31<style lang="scss">
32 main {
33 margin: 0 auto 2rem auto;
34 padding: 1rem;
35 width: 1200px;
36 max-width: calc(100% - 5rem);
37 display: flex;
38 justify-content: space-between;
39 flex-direction: column;
40 min-height: calc(100vh - 12rem);
41 font-size: 1.25rem;
42 .top-row {
43 display: flex;
44 justify-content: space-between;
45 align-items: center;
46 margin-bottom: 1rem;
47 }
48 h2 {
49 font-family: "Lekton", sans-serif;
50 font-weight: bold;
51 font-size: 3rem;
52 margin: 0;
53 color: var(--accent-3);
54 }
55 .buttons {
56 margin: 1rem auto;
57 display: flex;
58 flex-direction: column;
59 }
60 }
61</style>