@use crate::post::Post;
@use super::{header_html, footer_html};

@(posts: Vec<Post>)

@:header_html(Some("Gallery"), None)

<h1>Gallery</h1>

<p>Here are links to a lot of the art I have done in the last few years.</p>

<div class="grid">
    @for post in posts {
    <div class="card cell -4of12 blogpost-card">
        <header class="card-header">@post.front_matter.title</header>
        <div class="card-content">
            <center><p>Posted on @post.date.format("%Y-%m-%d")<br /><a href="@post.link"><img src="@post.front_matter.thumb.as_ref().unwrap()" /></a></p></center>
        </div>
    </div>
    }
</div>

@:footer_html()
