66 lines
2.1 KiB
Text
66 lines
2.1 KiB
Text
tags = require 'tags'
|
|
import output from require 'params'
|
|
slots, post = select 1, ...
|
|
|
|
url = (path) -> "/"..output..path
|
|
|
|
slots.head title post.head.title
|
|
|
|
-- Generic shenanigans
|
|
slots.head
|
|
* meta name: "author", content: "Talia"
|
|
|
|
-- Search shenanigans
|
|
slots.head
|
|
* meta property: "article:published_time", content: post.head.date
|
|
* meta property: "article:author", content: "https://tech.lgbt/@darkwiiplayer"
|
|
|
|
-- OpenGraph shenanigans
|
|
slots.head
|
|
* meta property: "og:title", content: post.head.title
|
|
* meta property: "og:site_name", content: "Talia's Blog"
|
|
* meta property: "og:description", content: post.head.description
|
|
* meta property: "og:type", content: "article"
|
|
* meta property: "og:article:author", content: "Talia"
|
|
* [ meta property: "og:article:tag", content: tag for tag in *post.head.tags ]
|
|
|
|
positions = (input, character) ->
|
|
((last) => @find(character, last+1, true)), input, 1
|
|
|
|
breadcrumb = (href) -> li a :href, href\match('[^/]+$'), tabindex: 0
|
|
|
|
if src := post.head.cover_image
|
|
slots.top pageHero cover: 60
|
|
* img :src, style: 'opacity: .4'
|
|
* h1(post.head.title, style: "view-transition-name: #{post.head.slug}")
|
|
slots.head
|
|
* meta property: "og:image", content: src
|
|
else
|
|
slots.title h1(post.head.title, style: "view-transition-name: #{post.head.slug}")
|
|
|
|
slots.summary div post.head.description, class: "summary", tabindex: 0
|
|
slots.summary verticalSpacer
|
|
|
|
slots.banner aside class: { 'floating box' }, stripe: "rebeccapurple"
|
|
* b "Hey there!"
|
|
* p raw [[
|
|
This blog doesn't use any tracking. When you open this page, I don't see
|
|
a number going up anywhere, so if you like this post, please consider
|
|
letting me know on <a href="https://tech.lgbt/@darkwiiplayer">the fediverse</a>!
|
|
This is also the best way of giving any other feedback on my blog posts.
|
|
]]
|
|
* p i "Thank you."
|
|
|
|
return (=>@)
|
|
* article
|
|
* slots.title
|
|
* slots.summary
|
|
* tags(post.head.tags)
|
|
* nav { class: "breadcrumbs" }
|
|
* ul
|
|
* li a "Blog", tabindex: 0, href: url "/"
|
|
* [ breadcrumb post.head.uri\sub(1, number-1) for number in positions(post.head.uri, "/") ]
|
|
* li post.head.title, class: 'active'
|
|
* verticalSpacer
|
|
* slots.banner
|
|
* raw post.body
|