~james/core

core/web/src/routes/dev/components/Tile.svelte -rw-r--r-- 610 bytes
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 16 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<script lang="ts">
	import type { Snippet } from "svelte";

	interface Props {
		name: string;
		slug: string;
		children: Snippet;
	}

	let { name, slug, children }: Props = $props();
</script>

<li
	id={slug}
	class="relative flex aspect-square scroll-mt-12 items-center justify-center bg-background-default"
>
	<a
		href="#{slug}"
		class="absolute top-md left-md typography-paragraph-regular font-medium text-foreground-subtle no-underline hover:text-foreground-default hover:no-underline"
	>
		{name}
	</a>
	<div class="flex w-full items-center justify-center p-2xl">
		{@render children()}
	</div>
</li>