Special post handling
This commit is contained in:
parent
c0780047bf
commit
3d2d1f897e
9 changed files with 24 additions and 5 deletions
|
@ -51,10 +51,20 @@ initComments(\{
|
|||
body [
|
||||
site-header $meta;
|
||||
article :class<post>, [
|
||||
post-header $id, $post, $db;
|
||||
div :class<post-body>, [
|
||||
$content;
|
||||
];
|
||||
# Only generate the post header if the post isn't special
|
||||
optl !$post.special, -> {post-header $id, $post, $db};
|
||||
# If the post is special, wrap it in a special div
|
||||
do if $post.special {
|
||||
div :class<special-post>, [
|
||||
div :class<post-body>, [
|
||||
$content;
|
||||
];
|
||||
];
|
||||
} else {
|
||||
div :class<post-body>, [
|
||||
$content;
|
||||
];
|
||||
}
|
||||
];
|
||||
# Only actually have the comment section if the post isn't hidden
|
||||
optl !$post.hidden, -> {div :id<comment-section>, :class<comments>};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue