v1 blog API routes
This commit is contained in:
parent
fec3325503
commit
eaa2f6587d
9 changed files with 286 additions and 34 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue