---
import PostNav from '../components/PostNav.astro';
import Particle from '../components/Particle.astro';
import Footer from '../components/Footer.astro';

const { content } = Astro.props;
const { title, description, publishDate} = content;
---

<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>{title} - thomaspcole.com</title>
        <!-- <link rel="icon" type="image/svg+xml" href="/favicon.svg"> -->
        <link rel="stylesheet" href="/style/global.css"> 

        <style lang="scss">
            @import 'bulmaswatch/darkly/_variables.scss';
            @import 'bulma/bulma.sass';
            @import 'bulmaswatch/darkly/_overrides.scss';

            html{
                overflow-y: auto;
            }

            body{
                display: flex;
                flex-direction: column;
                height: 100vh;
                width: 100%;
            }

            .main{
                flex: 1 1 auto;
                margin: 1em; 
            }

            .card {
                padding: 1em;
            }

            .header {
                display: flex;
                place-content: space-between;
            }
        </style>

        <!-- Sometimes some js is needed. Load font awesome -->
        <script is:inline src="/js/fa-all.min.js"/>
        
    </head>
    <body>
        <Particle/>
        <PostNav/>
        <main class="main">
            <div class="card">
                <div class="header">
                    <div>
                        <h1 class="title">{title}</h1>
                        <p class="subtitle">{description}</p>
                    </div>

                    <span>{publishDate}</span>                    
                </div>
                
                <hr class="dropdown-divider">

                <slot/>
            </div>
        </main>
        <Footer/>
    </body>
</html>