Add summary to blog posts
This commit is contained in:
parent
b79eb6c1a8
commit
650137c5c2
2 changed files with 16 additions and 0 deletions
12
css/site.css
12
css/site.css
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue