checkpoint

This commit is contained in:
Nathan McCarty 2025-02-04 21:39:47 -05:00
parent ce364c01d8
commit bc79817184
2 changed files with 38 additions and 2 deletions

View file

@ -30,16 +30,31 @@ method generate-head(Str:D $title, BlogMeta:D $meta, $description?) {
# Inline our style sheets
style %?RESOURCES<main.css>.slurp;
style %?RESOURCES<code.css>.slurp;
# TODO: Add header links
];
}
method site-header(BlogMeta:D $meta) {
header :class<site-header>, [
div :class<site-logo>, [
# TODO: Use a real image here
$meta.title
];
div :class<site-tagline>, [
$meta.tagline
];
div :class<header-links>, [
]
]
}
# TODO: Support GFM admonitions
method generate-post(Post:D $post, BlogMeta:D $meta) {
my $content = $post.render-html;
my $head = self.generate-head($post.title, $meta, $post.description);
my $body =
body [
self.site-header: $meta;
div :class<post-body>, [
$content
]