Commit cb8dcd8f by PLN (Algolia)

articles: description boxed on surface-raised, short rule before the body

The lead description reads as its own small block (padded, darker
surface, rounded); a 4rem quiet dash separates header from content on
blog posts and project pages alike.
parent 8ef9a10c
...@@ -112,6 +112,7 @@ export default function PostArticle({ post, switcher, banner }) { ...@@ -112,6 +112,7 @@ export default function PostArticle({ post, switcher, banner }) {
</p> </p>
)} )}
{post.description && <p className={styles.description}>{post.description}</p>} {post.description && <p className={styles.description}>{post.description}</p>}
{post.description && <hr className={styles.headerRule} aria-hidden="true" />}
{/* Hydra bookends — meta.md slots (`hydra:` = both ends, {/* Hydra bookends — meta.md slots (`hydra:` = both ends,
`hydra-opening:`/`hydra-closing:` = one). Source + credits are `hydra-opening:`/`hydra-closing:` = one). Source + credits are
resolved at build time (lib/hydra-sketch.js). */} resolved at build time (lib/hydra-sketch.js). */}
......
...@@ -163,6 +163,9 @@ ...@@ -163,6 +163,9 @@
.description { .description {
margin: 1.25rem 0 0; margin: 1.25rem 0 0;
padding: 0.85rem 1.1rem;
background: var(--surface-raised);
border-radius: 10px;
font-size: 1.16rem; font-size: 1.16rem;
line-height: 1.55; line-height: 1.55;
color: var(--text-muted); color: var(--text-muted);
...@@ -170,6 +173,15 @@ ...@@ -170,6 +173,15 @@
text-wrap: pretty; text-wrap: pretty;
} }
/* Quiet break between the header block (description boxed above) and the
article body — a short dash, not a full-width wall. */
.headerRule {
width: 4rem;
margin: 2rem 0 0;
border: 0;
border-top: 2px solid var(--border);
}
.untranslated { .untranslated {
margin: 1.25rem 0 0; margin: 1.25rem 0 0;
padding: 0.7rem 1rem; padding: 0.7rem 1rem;
......
...@@ -60,6 +60,8 @@ export default function ProjectPage({ project }) { ...@@ -60,6 +60,8 @@ export default function ProjectPage({ project }) {
)} )}
</header> </header>
<hr className={blogStyles.headerRule} aria-hidden="true" />
{project.contentHtml ? ( {project.contentHtml ? (
<div <div
className={blogStyles.prose} className={blogStyles.prose}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment