<script context="module">
    import { onMount } from 'svelte';
    import { formatDate } from './datefmt.js';
    import { makeSlug } from '$lib/slug.js';
    
    import Link from './Link.svelte';
    export { Link as a };
</script>

<script>
    export let title, date;
    export const description = '';
    export const draft = false;
</script>

<style>
    .subtitle {
        font-size: 0.9em;
        font-style: italic;
        margin-top: -0.5rem;
    }
</style>

<svelte:head>
    <title>{title}</title>
    <link rel="stylesheet" href="/prism-dracula.css" />
</svelte:head>

<div id="post">
    <h1 id="{makeSlug(title)}">{title}</h1>
    <p class="subtitle">{formatDate(date)}</p>
    <slot></slot>
</div>
