add view transitions support
This commit is contained in:
parent
a7a5982508
commit
9661785e20
|
@ -30,7 +30,7 @@
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<li class="posts-item">
|
<li class="posts-item">
|
||||||
<a href="{{.Permalink}}">
|
<a href="{{.Permalink}}">
|
||||||
<span class="posts-title">{{.Title}}</span>
|
<span class="posts-title" style="view-transition-name: post-{{ .Title | urlize }}">{{.Title}}</span>
|
||||||
<span class="posts-day">{{ if .Site.Params.dateformShort }}{{ .Date.Format .Site.Params.dateformShort }}{{ else }}{{ .Date.Format "Jan 02"}}{{ end }}</span>
|
<span class="posts-day">{{ if .Site.Params.dateformShort }}{{ .Date.Format .Site.Params.dateformShort }}{{ else }}{{ .Date.Format "Jan 02"}}{{ end }}</span>
|
||||||
</a>
|
</a>
|
||||||
<p>{{ .Summary | truncate 140 }}</p>
|
<p>{{ .Summary | truncate 140 }}</p>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<article>
|
<article>
|
||||||
<div class="frontmatter">
|
<div class="frontmatter">
|
||||||
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
<h1 class="post-title" style="view-transition-name: post-{{ .Title | urlize }}"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||||||
<p><strong>Reading Time:</strong> {{ .ReadingTime }} minutes | <strong>Published:</strong> {{ dateFormat "2006-01-02" .Date }} | <strong>Last Edited:</strong> {{ dateFormat "2006-01-02" .Lastmod }}</a></p>
|
<p><strong>Reading Time:</strong> {{ .ReadingTime }} minutes | <strong>Published:</strong> {{ dateFormat "2006-01-02" .Date }} | <strong>Last Edited:</strong> {{ dateFormat "2006-01-02" .Lastmod }}</a></p>
|
||||||
<p><strong>Download this post as:</strong> <a href="{{ .Permalink | replaceRE "^[^/]+://[^/]+/(.*)/$" "$1" }}.pdf">PDF,</a> <a href="{{ .Permalink | replaceRE "^[^/]+://[^/]+/(.*)/$" "$1" }}.epub">EPUB,</a> or <a href="{{ .Permalink | replaceRE "^[^/]+://[^/]+/(.*)/$" "$1" }}.txt">plaintext</a></p>
|
<p><strong>Download this post as:</strong> <a href="{{ .Permalink | replaceRE "^[^/]+://[^/]+/(.*)/$" "$1" }}.pdf">PDF,</a> <a href="{{ .Permalink | replaceRE "^[^/]+://[^/]+/(.*)/$" "$1" }}.epub">EPUB,</a> or <a href="{{ .Permalink | replaceRE "^[^/]+://[^/]+/(.*)/$" "$1" }}.txt">plaintext</a></p>
|
||||||
{{- if .Params.rss_only }}
|
{{- if .Params.rss_only }}
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
<link rel="pgpkey" href="/{{ $.Site.Params.contact.pgp }}">
|
<link rel="pgpkey" href="/{{ $.Site.Params.contact.pgp }}">
|
||||||
<meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett{{ range .Site.Params.clacks }}, {{ . }}{{end}}" />
|
<meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett{{ range .Site.Params.clacks }}, {{ . }}{{end}}" />
|
||||||
|
|
||||||
|
<!-- Enable fancy transitions -->
|
||||||
|
<meta name="view-transition" content="same-origin" />
|
||||||
|
|
||||||
<!-- Social: Twitter -->
|
<!-- Social: Twitter -->
|
||||||
<meta name="twitter:card" content="summary_large_image" />
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
<meta name="twitter:title" content="{{ if .IsHome }}{{ $.Site.Title }}{{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}{{ else }}{{ .Title }}{{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}{{ end }}" />
|
<meta name="twitter:title" content="{{ if .IsHome }}{{ $.Site.Title }}{{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}{{ else }}{{ .Title }}{{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}{{ end }}" />
|
||||||
|
|
Loading…
Reference in New Issue