Use blog post component in index

This commit is contained in:
Talia 2022-03-26 14:26:37 +01:00
parent 82ad12ba8f
commit f0ccbdbacc
Signed by: darkwiiplayer
GPG key ID: 7808674088232B3E

View file

@ -1,11 +1,16 @@
import output from require 'params'
link = =>
a @title, href: "/"..output..@uri
post = =>
blogPost {
name: @head.slug
a @head.title, href: "/"..output..@head.uri
}
(json) => {
title "Index"
script "window.posts = JSON.parse(`#{json}`)"
script type: 'module', src: "/#{output}/javascript/BlogPost.js"
script type: 'module', src: "/#{output}/javascript/LocalDate.js"
}, (
ul [li link post.head, prefix for post in *@])
ul [li post p for p in *@]
)