Add summary to blog posts

This commit is contained in:
Talia 2023-09-02 21:35:34 +02:00
parent b79eb6c1a8
commit 650137c5c2
Signed by: darkwiiplayer
GPG key ID: 7808674088232B3E
2 changed files with 16 additions and 0 deletions

View file

@ -2,6 +2,18 @@ blog-post[hidden] {
display: none; display: none;
} }
.summary {
font-size: .8em;
font-style: italic;
opacity: .6;
transition: opacity .3s;
tab-stop: 0;
}
.summary:is(:hover, :focus) {
opacity: 1;
}
blog-post { blog-post {
display: block; display: block;
} }

View file

@ -38,6 +38,9 @@ if src = post.head.cover_image
else else
slots.title h1(post.head.title, style: "view-transition-name: #{post.head.slug}") slots.title h1(post.head.title, style: "view-transition-name: #{post.head.slug}")
slots.summary div post.head.description, class: "summary"
slots.summary verticalSpacer
slots.banner aside class: { 'box' } slots.banner aside class: { 'box' }
* b "Hey there!" * b "Hey there!"
* p raw [[ * p raw [[
@ -55,6 +58,7 @@ slots.footer aside id: "contact"
return (=>@) return (=>@)
* article * article
* slots.title * slots.title
* slots.summary
* tags(post.head.tags) * tags(post.head.tags)
* nav { class: "breadcrumbs" } * nav { class: "breadcrumbs" }
* ul * ul