Skip to content

Commit 456e4de

Browse files
committed
feat: create root page + layout
1 parent e018910 commit 456e4de

File tree

3 files changed

+79
-7
lines changed

3 files changed

+79
-7
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<script lang="ts">
2+
import type { Snippet } from "svelte";
3+
import type { LayoutData } from "./$types";
4+
5+
let { data, children }: { data: LayoutData; children: Snippet } = $props();
6+
</script>
7+
8+
<div class="p-6 mb-16">
9+
{@render children()}
10+
</div>
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<script lang="ts">
2+
import { Hero, IdentityCard } from "$lib/fragments";
3+
import * as Button from "$lib/ui/Button";
4+
import { QrCodeIcon } from "@hugeicons/core-free-icons";
5+
import { HugeiconsIcon } from "@hugeicons/svelte";
6+
import type { Snippet } from "svelte";
7+
8+
const dummyData = {
9+
Name: "John Doe",
10+
"Date of birth": "01/01/1990",
11+
"ID submitted": "American Passport",
12+
"Passport number": "123456789",
13+
};
14+
</script>
15+
16+
17+
<Hero
18+
title="Good morning!"
19+
subtitle="Don't forget to drink water."
20+
showSettings
21+
/>
22+
23+
{#snippet Section(title: string, children: Snippet)}
24+
<section class="mt-8">
25+
<h4 class="mb-2">{title}</h4>
26+
{@render children()}
27+
</section>
28+
{/snippet}
29+
30+
{#snippet eName()}
31+
<IdentityCard
32+
variant="eName"
33+
userId="1234567890"
34+
viewBtn={() => alert("View button clicked!")}
35+
shareBtn={() => alert("Share button clicked!")}
36+
/>
37+
{/snippet}
38+
{#snippet ePassport()}
39+
<IdentityCard
40+
variant="ePassport"
41+
viewBtn={() => alert("View button clicked!")}
42+
userData={dummyData}
43+
/>
44+
{/snippet}
45+
{#snippet eVault()}
46+
<IdentityCard
47+
variant="eVault"
48+
usedStorage={15}
49+
totalStorage={100}
50+
/>
51+
{/snippet}
52+
53+
{@render Section("eName", eName)}
54+
{@render Section("ePassport", ePassport)}
55+
{@render Section("eVault", eVault)}
56+
57+
<Button.Action
58+
variant="solid"
59+
onclick={() => alert("Action button clicked!")}
60+
class="mx-auto text-nowrap flex gap-8 fixed bottom-5 left-1/2 -translate-x-1/2 z-10"
61+
>
62+
<HugeiconsIcon
63+
size={32}
64+
strokeWidth={2}
65+
className="mr-2"
66+
icon={QrCodeIcon}
67+
/>
68+
Scan to Login
69+
</Button.Action>

infrastructure/eid-wallet/src/routes/+page.svelte

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)