-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.html
More file actions
150 lines (136 loc) · 5.69 KB
/
template.html
File metadata and controls
150 lines (136 loc) · 5.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon/favicon-32.png" />
<link rel="icon" type="image/png" sizes="192x192" href="/img/favicon/favicon-192.png" />
<link rel="icon" type="image/png" sizes="512x512" href="/img/favicon/favicon-512.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/img/favicon/favicon-180.png" />
<link rel="alternate" type="application/rss+xml" title="Codè èn Placè RSS" href="/feed.xml" />
<link rel="alternate" type="application/atom+xml" title="Codè èn Placè Atom" href="/atom.xml" />
<link href="/fonts.css" rel="stylesheet" />
<link href="/base.css" rel="stylesheet" />
<link href="/sm.layout.css" rel="stylesheet" media="(max-width:699px)" />
<link href="/lg.layout.css" rel="stylesheet" media="(min-width:700px)" />
<link href="/light.color.css" rel="stylesheet" media="(prefers-color-scheme:light)" />
<link href="/dark.color.css" rel="stylesheet" media="(prefers-color-scheme:dark)" />
<script async src="https://plausible.io/js/pa-lFwhek60cVg1NaSkGQU1V.js"></script>
<script>
((window.plausible =
window.plausible ||
function () {
(plausible.q = plausible.q || []).push(arguments);
}),
(plausible.init =
plausible.init ||
function (i) {
plausible.o = i || {};
}));
plausible.init();
</script>
$if(title)$
<title>$title$</title>
$endif$ $if(subtitle)$
<meta name="description" content="$subtitle$" />
$endif$
<meta name="robots" content="index, follow" />
<meta name="author" content="Freddie" />
$if(keywords)$
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
$endif$
<meta name="theme-color" content="#282729" media="(prefers-color-scheme: dark)" />
<meta name="theme-color" content="#e8e5eb" media="(prefers-color-scheme: light)" />
$if(pageslug)$
<link rel="canonical" href="https://codeenplace.dev/$pageslug$" />
$endif$
<!-- Open Graph -->
<meta property="og:locale" content="en_GB" />
<meta property="og:site_name" content="Codè èn Placè" />
$if(pageslug)$
<meta property="og:type" content="article" />
<meta property="og:url" content="https://codeenplace.dev/$pageslug$" />
<meta property="og:image" content="https://codeenplace.dev/img/social/$pageslug$.png" />
$if(published)$
<meta property="article:published_time" content="$published$T00:00:00Z" />
$if(modified)$
<meta property="article:modified_time" content="$modified$" />
$endif$ $endif$
<meta property="article:author" content="Freddie" />
$endif$ $if(title)$
<meta property="og:title" content="$title$" />
$endif$ $if(subtitle)$
<meta property="og:description" content="$subtitle$" />
$endif$
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image" />
$if(title)$
<meta name="twitter:title" content="$title$" />
$endif$ $if(subtitle)$
<meta name="twitter:description" content="$subtitle$" />
$endif$ $if(pageslug)$
<meta name="twitter:image" content="https://codeenplace.dev/img/social/$pageslug$.png" />
$endif$ $if(pageslug)$
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "$title$",
$if(subtitle)$"description": "$subtitle$",$endif$
"author": { "@type": "Person", "name": "Freddie" },
"publisher": { "@type": "Person", "name": "Freddie" },
"url": "https://codeenplace.dev/$pageslug$",
"image": "https://codeenplace.dev/img/social/$pageslug$.png"
$if(published)$,"datePublished": "$published$T00:00:00Z"$endif$
$if(modified)$,"dateModified": "$modified$"$endif$
}
</script>
$endif$
</head>
<body>
<header>
<h1>
<span style="opacity: 0; transition: all ease-in-out 0.5s" id="post-spacer">x</span>
<span style="opacity: 0; transition: all ease-in-out 0.5s" id="post-title">$title$</span>
<span style="opacity: 0; transition: all ease-in-out 0.5s" id="site-title">Codè èn Placè</span>
</h1>
<nav>
<a href="/">Posts</a>
<!-- <a href="/posts">Posts</a> -->
<a href="mailto:contact@codeenplace.dev">Email</a>
<a href="https://bsky.app/profile/codeenplace.dev">Bsky</a>
</nav>
</header>
<main>
<h1>$title$</h1>
<subtitle>$subtitle$</subtitle>
$body$
</main>
<footer>
<div>(c) Freddie</div>
<div class="spacer">|</div>
<nav>
<a href="/">Posts</a>
<!-- <a href="/posts">Posts</a> -->
<a href="mailto:contact@codeenplace.dev">Email</a>
<a href="https://bsky.app/profile/codeenplace.dev">Bsky</a>
</nav>
<div class="spacer">|</div>
<div>All posts <a href="/to-the-ai-of-the-future">by a human</a></div>
</footer>
<script>
new IntersectionObserver((entries) => {
const hide = entries[0].isIntersecting
? document.querySelector("header h1 #post-title")
: document.querySelector("header h1 #site-title");
const show = entries[0].isIntersecting
? document.querySelector("header h1 #site-title")
: document.querySelector("header h1 #post-title");
hide.style.setProperty("opacity", 0);
hide.style.setProperty("transform", "translateY(100%)");
show.style.setProperty("opacity", 1);
show.style.setProperty("transform", "translateY(0)");
}).observe(document.querySelector("main h1"));
</script>
</body>
</html>