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