should work

This commit is contained in:
whidix
2022-12-31 15:45:04 +01:00
parent 74ac50ede7
commit 930beaa857
21 changed files with 307 additions and 31 deletions

View File

@@ -1,6 +1,8 @@
<script>
<script lang="ts">
import Card from '$lib/components/Card.svelte';
import { projects } from './+page';
import type { PageData } from './$types';
export let data: PageData;
</script>
<svelte:head>
@@ -11,20 +13,24 @@
<div>
<h1>Projects</h1>
<p>This is the page where all projects will live.</p>
<p>This is the page where all projects will live</p>
<hr />
<section class="card_list">
{#each projects as { title }}
<Card {title} />
<section class="project_list">
{#each data.data as { title, description, path, date, tags }}
<Card data={{ title, description, path, date, tags }} />
{/each}
</section>
</div>
<style>
.card_list {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
<style lang="css">
.project_list {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
flex-wrap: wrap;
gap: 1rem;
}
</style>