blob: 7c112850d6adb75e1f2daa0232c2c0231f69b81b (
plain)
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
|
<head>
<title>
{{ .Site.Params.title }}{{ if .Title }} - {{ .Title }} {{ end }}
</title>
<meta name="theme-color" content="" />
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta name="description" content="{{ .Site.Params.description }}" />
<meta name="author" content="{{ .Site.Params.author }}" />
<meta property="og:url" content="{{ .Permalink }}" />
<meta property="og:type" content="website" />
<meta
property="og:title"
content="{{ .Site.Params.title }}{{ if .Title }} - {{ .Title }} {{ end }}"
/>
<meta property="og:description" content="{{ .Site.Params.description }}" />
<meta property="og:image" content="{{ `images/profile.jpg` | absURL }}" />
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
<link rel="stylesheet" href="{{ `/css/main.css` | relURL }}" />
<link
href="https://fonts.googleapis.com/css2?family=Mukta:wght@300;700&display=swap"
rel="stylesheet"
/>
<style>
html {
font-size: {{ .Site.Params.theme.fontSize | safeCSS }};
}
</style>
<script>
let initialY;
window.onload = function () {
initialY = window.scrollY;
};
window.addEventListener("scroll", () => {
let currentY = window.scrollY;
let header = document.querySelector("header");
if (
document.body.offsetHeight - (window.innerHeight + window.pageYOffset) < 10
) {
initialY = currentY;
header.style.top = "0";
return;
}
if (currentY - initialY > 60) {
initialY = currentY;
header.style.top = "-58px";
}
if (currentY - initialY < -5 || currentY < 60) {
initialY = currentY;
header.style.top = "0";
}
});
</script>
</head>
|