forked from TryGhost/Alto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.hbs
118 lines (99 loc) · 4.25 KB
/
default.hbs
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
<!DOCTYPE html>
<html lang="{{@site.locale}}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{meta_title}}</title>
<link rel="stylesheet" href="{{asset "built/screen.css"}}">
<script src="https://kit.fontawesome.com/aafea07ec6.js" crossorigin="anonymous"></script>
<script>
if (localStorage.getItem('alto_dark') == 'true') {
document.documentElement.classList.add('dark-mode');
}
</script>
{{ghost_head}}
</head>
<body class="{{body_class}}{{#match @custom.title_font "=" "Elegant serif"}} has-serif-title{{/match}}{{#match @custom.body_font "=" "Elegant serif"}} has-serif-body{{/match}}">
<div class="site">
<header id="gh-head" class="gh-head gh-outer">
<div class="gh-head-inner">
<div class="gh-head-brand">
<div class="gh-head-brand-wrapper">
<a class="gh-head-logo" href="{{@site.url}}">
{{#if @site.logo}}
<img src="{{@site.logo}}" alt="{{@site.title}}">
{{#if @custom.white_logo_for_dark_mode}}
<img src="{{img_url @custom.white_logo_for_dark_mode}}" alt="{{@site.title}}">
{{/if}}
{{else}}
{{@site.title}}
{{/if}}
</a>
</div>
<button class="gh-search gh-icon-btn" data-ghost-search>{{> "icons/search"}}</button>
<button class="gh-burger"></button>
</div>
<nav class="gh-head-menu">
{{navigation}}
</nav>
<div class="gh-head-actions">
<button class="gh-search gh-icon-btn" data-ghost-search>{{> "icons/search"}}</button>
<div class="toggle-track">
<div class="toggle-moon">{{> "icons/moon"}}</div>
<div class="toggle-sun">{{> "icons/sun"}}</div>
<div class="toggle-thumb"></div>
</div>
</div>
</div>
</header>
<div class="site-content">
{{{body}}}
</div>
<footer class="gh-foot gh-outer">
<div class="gh-foot-inner gh-inner">
<div class="gh-copyright">
{{@site.title}} © {{date format="YYYY"}}
</div>
<nav class="gh-foot-menu">
{{navigation type="secondary"}}
</nav>
<div class="social-icon gh-powered-by">
<a href="https://github.com/rayhannabi" target="_blank" rel="noopener noreferrer"><i class="fa-brands fa-github"></i></a>
<a href="https://twitter.com/rayhan_nabi" target="_blank" rel="noopener noreferrer"><i class="fa-brands fa-twitter"></i></a>
<a href="https://www.linkedin.com/in/rayhannabi/" target="_blank" rel="noopener noreferrer"><i class="fa-brands fa-linkedin"></i></a>
</div>
</div>
</footer>
</div>
{{#is "post, page"}}
{{> "pswp"}}
{{/is}}
<script
src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin="anonymous">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"
integrity="sha512-7Z9J3l1+EYfeaPKcGXu3MS/7T+w19WtKQY/n+xzmw4hZhJ9tyYmcUS+4QqAlzhicE5LAfMQSF3iFTK9bQdTxXg=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"
integrity="sha512-SkmBfuA2hqjzEVpmnMt/LINrjop3GKWqsuLSSB3e7iBmYK7JuWw4ldmmxwD9mdm2IRTTi0OxSAfEGvgEi0i2Kw=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="{{asset "built/main.min.js"}}"></script>
{{#is "post"}}
<script>
const progressBar = document.querySelector('.reading-progress');
function updateProgress() {
const totalHeight = document.body.clientHeight;
const windowHeight = document.documentElement.clientHeight;
const position = window.scrollY;
const progress = position / (totalHeight - windowHeight) * 100;
progressBar.setAttribute('value', progress);
requestAnimationFrame(updateProgress);
}
requestAnimationFrame(updateProgress);
</script>
{{/is}}
{{ghost_foot}}
</body>
</html>