Add view-transition tags

This commit is contained in:
Talia 2023-07-12 15:39:57 +02:00
parent 07f4feac68
commit 39766e069e
3 changed files with 4 additions and 3 deletions

View file

@ -5,7 +5,7 @@ posts = require 'posts'
post = =>
a href: "/"..output..@head.uri,
* flexColumn
* b @head.title
* h2 @head.title, style: "view-transition-name: #{@head.slug}"
* time is: 'local-date', datetime: @head.date, @head.date
* @head.description

View file

@ -22,6 +22,7 @@ content, data = select 1, ...
html
lang: "english"
* head
* meta name: "view-transition", content: "same-origin"
* meta charset: "UTF-8"
* meta name: "viewport", content: "width=device-width"
* css 'https://darkwiiplayer.github.io/css/all.css'

View file

@ -31,11 +31,11 @@ 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)
* 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)
slots.title h1(post.head.title, style: "view-transition-name: #{post.head.slug}")
return (=>@)
* article