28 lines
706 B
Text
28 lines
706 B
Text
import output from require 'params'
|
|
slots, post = select 1, ...
|
|
|
|
url = (path) -> "/"..output..path
|
|
|
|
slots.head title post.head.title
|
|
|
|
positions = (input, character) ->
|
|
((last) => @find(character, last+1, true)), input, 1
|
|
|
|
breadcrumb = (href) -> li a :href, href\match('[^/]+$')
|
|
|
|
if src = post.head.cover_image
|
|
slots.top pageHero cover: 60
|
|
* img :src, style: 'opacity: .4'
|
|
* h1(post.head.title)
|
|
else
|
|
slots.title h1(post.head.title)
|
|
|
|
return (=>@)
|
|
* article
|
|
* slots.title
|
|
* nav { class: "breadcrumbs" }
|
|
* ul
|
|
* li a "Blog", href: url "/"
|
|
* [ breadcrumb post.head.uri\sub(1, number-1) for number in positions(post.head.uri, "/") ]
|
|
* li post.head.title, class: 'active'
|
|
* post.body
|