Generate series pages

This commit is contained in:
Nathan McCarty 2025-02-09 05:28:59 -05:00
parent 7cf4827d0c
commit baf8d6556b
8 changed files with 168 additions and 41 deletions

View file

@ -131,3 +131,24 @@ sub post-header(Int:D $id, Post:D $post, $db) is export {
post-info $id, $post, $db;
]
}
sub generate-blurb(Int:D $id, $db) is export {
my $post = $db.posts{$id};
my $desc = $post.description;
my $link = post-link $id, $post;
div :class<post-blurb>, [
div :class<post-blurb-title>, [
a :href($link), span [
h2 $post.title;
];
];
post-info $id, $post, $db;
if $desc ~~ Str:D {
div :class<post-blurb-description>, [
p $post.description;
];
} else {
[]
}
]
}