portfolio_site/src/routes/+page.svelte

57 lines
1.7 KiB
Svelte
Raw Normal View History

<script lang="ts">
import type { EnhancedImage, Tag } from '$lib/types';
import { site, baseURL } from '$lib/config';
import SquareArrowOutUpRight from 'lucide-svelte/icons/square-arrow-out-up-right';
import { Button } from '$lib/components/ui/button/index.js';
import Image from '$lib/components/Image.svelte';
import projects from '$lib/data/projects';
</script>
{#snippet projectCard(
name: string,
description: string,
image: EnhancedImage,
tags: Tag[],
link: string
)}
<div class="mb-16 w-80 space-y-3 md:w-64">
2025-01-31 19:37:17 +02:00
<Image {image} {tags} class="aspect-4/5 object-cover" />
<div class="grid grid-cols-[1fr_auto] items-center text-sm">
<div class="mt-1 pr-4">
<h3 class="text-lg font-medium leading-none">{name}</h3>
<p class="mt-1.5 text-sm leading-5 text-muted-foreground">{description}</p>
</div>
<Button target="_blank" href={link} variant="secondary" size="icon">
<SquareArrowOutUpRight />
</Button>
</div>
</div>
{/snippet}
<svelte:head>
2025-01-22 18:08:27 +02:00
<title>{site.name}</title>
<meta property="og:title" content={site.name} />
2025-01-22 18:08:27 +02:00
<meta name="description" content={site.description} />
<meta property="og:description" content={site.description} />
2025-01-22 18:08:27 +02:00
<meta property="og:image" content={baseURL + site.image} />
</svelte:head>
2025-01-30 15:43:02 +02:00
<header class="mb-24 flex flex-col items-center text-center font-title">
2025-01-22 17:05:21 +02:00
<h1 class="mb-1 scroll-m-20 text-5xl font-extrabold tracking-tight lg:text-6xl">
2025-01-31 16:44:38 +02:00
Hei! Mina olen Mihkel
</h1>
<p class="font-sans text-base text-muted-foreground">
Peale selle toreda saidi on mul veel palju hobisid
2025-01-31 16:44:38 +02:00
</p>
</header>
<main class="flex w-full flex-wrap justify-center gap-x-8">
{#each projects as { name, description, image, tags, link }}
{@render projectCard(name, description, image, tags, link)}
{/each}
</main>