This commit is contained in:
matthieu42morin 2024-04-29 13:21:12 +02:00
parent 68311ecd7c
commit 8905f4233d
3 changed files with 34 additions and 20 deletions

View File

@ -1,22 +1,23 @@
export type Project = {
id: string
name: string
tags?: string[]
feature?: string
description?: string
img: string
link?: string
id: string
name: string
tags?: string[]
feature?: string
description?: string
img: string
link?: string
}
export const projects: Project[] = [
{
id: 'seedling', // HTML ID
name: 'Seedling', // project Name
tags: ['Svelte', 'TypeScript'], // tag
// description
description: '🌸 Sweet, Powerful, IndieWeb-Compatible SvelteKit Blog Starter. [δ](Delta)',
feature: 'Svelte', // feature
img: 'https://github.com/importantimport/urara/raw/main/urara/hello-world/urara.webp',
link: 'https://github.com/importantimport/urara'
}
{
id: 'seedling', // HTML ID
name: 'Seedling', // project Name
tags: ['IoT', 'ESP32', 'sensors', 'C++', 'Swift (iOS app)'],
// description
description: 'A smart IoT plant-care system.',
feature: 'IoT', // feature
img: 'https://mattmor.in/projects/seedling/feature.jpg',
link: 'https://mattmor.in/projects/seedling'
},
{}
]

View File

@ -1,7 +1,7 @@
import type { LayoutLoad } from './$types'
export const prerender = true
export const prerender = false
export const trailingSlash = 'always'
export const load: LayoutLoad = async ({ url, fetch }) => ({
path: url.pathname,
res: await fetch('/posts.json').then(res => res.json())
path: url.pathname,
res: await fetch('/posts.json').then(res => res.json())
})

View File

@ -0,0 +1,13 @@
<script lang="ts">
import { projects as allProjects } from '$lib/config/projects'
import Head from '$lib/components/main/head.svelte'
import ProjectComponent from '$lib/components/extra/projects.svelte'
let items: { id: string }[] = [...(allProjects as { id: string }[]), { id: 'footer' }]
</script>
<Head />
{#each items as item}
<ProjectComponent {item} />
{/each}