v1 blog API routes

This commit is contained in:
ari melody 2025-11-07 19:31:34 +00:00
parent fec3325503
commit eaa2f6587d
Signed by: ari
GPG key ID: CF99829C92678188
9 changed files with 286 additions and 34 deletions

View file

@ -66,7 +66,7 @@ func serveBlogIndex(app *model.AppState) http.Handler {
if post.CreatedAt.Year() != collectionYear || i == len(posts) - 1 {
if i == len(posts) - 1 {
collectionPosts = append(collectionPosts, &authoredPost)
collectionPosts = append([]*blogPost{&authoredPost}, collectionPosts...)
}
collections = append(collections, &blogPostGroup{
Year: collectionYear,

View file

@ -1,5 +1,11 @@
.blog-collection {
display: flex;
flex-direction: column;
gap: .5em;
}
.blog-collection h2 {
margin: .5em 1em;
margin: 0 0 0 1em;
font-size: 1em;
text-transform: uppercase;
font-weight: 600;