blog: three curated series across the whole catalogue + badge on post pages
Extends the lone security thread into three arcs that read as skill pillars - SECURITY (6), NETWORKING (5), PLATFORM (7) - so every post carries a numbered badge and the catalogue advertises three areas of depth rather than a loose list. Adds the badge to the post detail header too, styled to match the cards.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import Layout from "../../layouts/Layout.astro";
|
||||
import { getPosts, formatDate } from "../../lib/blog";
|
||||
import { readingTime } from "../../lib/reading";
|
||||
import { series } from "../../data/series";
|
||||
import { render } from "astro:content";
|
||||
import type { GetStaticPaths } from "astro";
|
||||
|
||||
@@ -21,6 +22,12 @@ const { Content } = await render(entry);
|
||||
|
||||
<header class="post__head" data-reveal>
|
||||
<div class="post__meta mono">
|
||||
{series[entry.id] && (
|
||||
<>
|
||||
<span class="post__series">{series[entry.id].name} · {String(series[entry.id].number).padStart(2, "0")}</span>
|
||||
<span class="post__sep">·</span>
|
||||
</>
|
||||
)}
|
||||
<time datetime={entry.data.date.toISOString()}>{formatDate(entry.data.date)}</time>
|
||||
<span class="post__sep">·</span>
|
||||
<span>{readingTime(entry.body)}</span>
|
||||
@@ -87,6 +94,16 @@ const { Content } = await render(entry);
|
||||
color: var(--text-faint);
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.post__series {
|
||||
color: var(--accent-2);
|
||||
border: 1px solid var(--border-magenta);
|
||||
border-radius: 3px;
|
||||
padding: 2px 7px;
|
||||
letter-spacing: 0.1em;
|
||||
font-size: 0.66rem;
|
||||
}
|
||||
.post__sep {
|
||||
opacity: 0.6;
|
||||
|
||||
Reference in New Issue
Block a user