Generate series pages
This commit is contained in:
parent
7cf4827d0c
commit
baf8d6556b
8 changed files with 168 additions and 41 deletions
|
@ -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 {
|
||||
[]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue