Add view-transition tags
This commit is contained in:
parent
07f4feac68
commit
39766e069e
3 changed files with 4 additions and 3 deletions
|
@ -5,7 +5,7 @@ posts = require 'posts'
|
||||||
post = =>
|
post = =>
|
||||||
a href: "/"..output..@head.uri,
|
a href: "/"..output..@head.uri,
|
||||||
* flexColumn
|
* flexColumn
|
||||||
* b @head.title
|
* h2 @head.title, style: "view-transition-name: #{@head.slug}"
|
||||||
* time is: 'local-date', datetime: @head.date, @head.date
|
* time is: 'local-date', datetime: @head.date, @head.date
|
||||||
* @head.description
|
* @head.description
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ content, data = select 1, ...
|
||||||
html
|
html
|
||||||
lang: "english"
|
lang: "english"
|
||||||
* head
|
* head
|
||||||
|
* meta name: "view-transition", content: "same-origin"
|
||||||
* meta charset: "UTF-8"
|
* meta charset: "UTF-8"
|
||||||
* meta name: "viewport", content: "width=device-width"
|
* meta name: "viewport", content: "width=device-width"
|
||||||
* css 'https://darkwiiplayer.github.io/css/all.css'
|
* css 'https://darkwiiplayer.github.io/css/all.css'
|
||||||
|
|
|
@ -31,11 +31,11 @@ breadcrumb = (href) -> li a :href, href\match('[^/]+$')
|
||||||
if src = post.head.cover_image
|
if src = post.head.cover_image
|
||||||
slots.top pageHero cover: 60
|
slots.top pageHero cover: 60
|
||||||
* img :src, style: 'opacity: .4'
|
* img :src, style: 'opacity: .4'
|
||||||
* h1(post.head.title)
|
* h1(post.head.title, style: "view-transition-name: #{post.head.slug}")
|
||||||
slots.head
|
slots.head
|
||||||
* meta property: "og:image", content: src
|
* meta property: "og:image", content: src
|
||||||
else
|
else
|
||||||
slots.title h1(post.head.title)
|
slots.title h1(post.head.title, style: "view-transition-name: #{post.head.slug}")
|
||||||
|
|
||||||
return (=>@)
|
return (=>@)
|
||||||
* article
|
* article
|
||||||
|
|
Loading…
Reference in a new issue