wip
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import type { MDsveXComponent } from '$lib/types';
|
||||
import type { SvelteComponent } from 'svelte';
|
||||
import './style-entries.css';
|
||||
|
||||
const blog_entries: [string, SvelteComponent][] = Object.entries(
|
||||
import.meta.glob('/src/routes/blogs/**/+page.svx', { eager: true })
|
||||
@@ -11,9 +12,23 @@
|
||||
console.log(blog_entries);
|
||||
</script>
|
||||
|
||||
<h1>Welcome to SvelteKit</h1>
|
||||
<p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>
|
||||
{#each blog_entries as [href, page]}
|
||||
<a {href}>{page.metadata?.title}</a><br />
|
||||
<svelte:component this={page.default} />
|
||||
{/each}
|
||||
<main>
|
||||
<h1>Welcome to SvelteKit</h1>
|
||||
<p>
|
||||
Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation
|
||||
</p>
|
||||
{#each blog_entries as [href, page]}
|
||||
<a {href}>
|
||||
<div class="blog-entry" {href}>
|
||||
<div>
|
||||
<h4>{page.metadata?.title}</h4>
|
||||
<p>{page.metadata?.desc}</p>
|
||||
<p class="date">{new Date(Date.parse(page.metadata?.date)).toDateString()}</p>
|
||||
</div>
|
||||
<img src="blog-1.png" class="blog-image" />
|
||||
</div>
|
||||
</a>
|
||||
<br />
|
||||
<!-- svelte:component this={page.default} /-->
|
||||
{/each}
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user