forked from godofredoninja/simply
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.hbs
177 lines (145 loc) · 6.34 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
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!DOCTYPE html>
<!--
Powered by:
——————————
Cloud Genius®
✉ https://cloudgenius.app
✎ @k9lvn
-->
<html lang="{{@site.locale}}"{{#match @custom.color_scheme "Dark"}} class="dark"{{/match}}>
<head>
{{!-- Document Settings --}}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
{{!-- Page Meta --}}
<title>{{meta_title}}</title>
{{!-- Mobile Meta --}}
<meta name="HandheldFriendly" content="True">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{!-- Fonts -> Inter=400,500,600,700 PT Serift=400,700 --}}
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=PT+Serif:ital,wght@0,400;0,700;1,400&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'"/>
<noscript><link rel="preconnect" href="https://fonts.gstatic.com"><link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Merriweather:ital,wght@0,400;0,700;1,400&display=swap" rel="stylesheet"></noscript>
{{!-- <link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=PT+Serif:ital,wght@0,400;0,700;1,400&display=swap" rel="stylesheet"> --}}
{{!-- Styles --}}
<link rel="stylesheet" type="text/css" href="{{asset "styles/main.css"}}"/>
{{!-- <style>{{> "main-styles"}}</style> --}}
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/bundle/asciinema-player.min.css" />
{{!-- Ghost outputs important style and meta data with this tag --}}
{{ghost_head}}
{{!-- Block for Headers --}}
{{{block "header"}}}
</head>
<body class="{{block "special_body_class"}}">
<div class="simply-viewport flex flex-col justify-start">
{{!-- Header Content with User Account ./partials/layout/header-user-account.hbs --}}
{{#match @custom.header "Default"}}{{> "layout/header"}}{{/match}}
{{!-- Header With Drop Down --}}
{{#match @custom.header "Drop Down Menu"}}{{> "layout/header" hasDropDown=true}}{{/match}}
{{!-- All the main content gets inserted here, index.hbs, post.hbs, etc --}}
<main class="simply-main relative min-h-lg">{{{body}}}</main>
{{!-- Footer Default ./partials/layout/footer.hbs --}}
{{#match @custom.footer "Default"}}{{>"layout/footer"}}{{/match}}
{{!-- Footer - Dark ./partials/layout/footer-dark.hbs --}}
{{#match @custom.footer "Dark"}}{{>"layout/footer-dark"}}{{/match}}
{{!-- Footer Not Menu ./partials/layout/footer-not-menu.hbs --}}
{{#match @custom.footer "No Secondary Navigation"}}{{>"layout/footer-not-menu"}}{{/match}}
</div>
{{!-- REACT DIV --}}
{{!-- <div id="Aklilu">Aklilu</div> --}}
{{!-- Loandig Bar --}}
<div class="loadingBar top-0 fixed right-0 left-0 hidden"></div>
{{!-- Icons --}}
{{> "icons/icons-symbol-defs"}}
{{!-- Scripts URL --}}
<script>
var prismJs = '{{asset "scripts/prismjs.js"}}';
var prismJsComponents = 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/components/';
</script>
{{!-- Ghost outputs important scripts and data with this tag --}}
{{ghost_foot}}
{{!-- script --}}
{{{block "scripts"}}}
{{!-- Main scripts --}}
<script src="{{#is "post, page"}}{{asset "scripts/post.js"}}{{else}}{{asset "scripts/main.js"}}{{/is}}"></script>
{{!-- mermaid URL --}}
<script src="{{asset "scripts/mermaid.js" }}"></script>
<script>
{{#match @custom.color_scheme "Auto"}}
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.querySelector('html').classList.add('dark');
localStorage.theme = 'dark';
} else {
document.querySelector('html').classList.remove('dark');
localStorage.theme = '';
}
window.matchMedia('(prefers-color-scheme: dark)')
.addEventListener(
'change',
function (e) {
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.querySelector('html').classList.add('dark');
localStorage.theme = 'dark';
} else {
document.querySelector('html').classList.remove('dark');
localStorage.theme = '';
}
}
)
{{else}}
if (localStorage.theme === 'dark') {
document.querySelector('html').classList.add('dark');
} else if (localStorage.theme === 'light') {
document.querySelector('html').classList.remove('dark');
}
{{/match}}
</script>
{{!-- {{#is "home"}} --}}
{{!-- REACT JS BUNDLE --}}
<script src="{{asset "built/main.bundle.js"}}"></script>
{{!-- {{/is}} --}}
{{!-- Chatra --}}
<script>
window.ChatraSetup = {
colors: {
buttonText: '#f0f0f0', /* chat button text color */
buttonBg: '#CC559A' /* chat button background color */
}
};
</script>
<script>
(function (d, w, c) {
w.ChatraID = 'dKwmML4zkf9sYCnMP';
var s = d.createElement('script');
w[c] = w[c] || function () {
(w[c].q = w[c].q || []).push(arguments);
};
s.async = true;
s.src = 'https://call.chatra.io/chatra.js';
if (d.head) d.head.appendChild(s);
})(document, window, 'Chatra');
</script>
{{!-- /Chatra --}}
{{!-- asciinema URL --}}
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/bundle/asciinema-player.min.js"></script>
<script>
// const docDiv = document.getElementById('asciinema');
// const castURL = docDiv.getAttribute('src');
// AsciinemaPlayer.create(castURL, docDiv);
// Grab all asciinema divs
var htmlCollection = document.getElementsByClassName('asciinema')
Array.prototype.forEach.call(htmlCollection, function (element) {
{{!-- console.log(element); --}}
const cast = element.getAttribute('src');
{{!-- console.log(cast); --}}
const castURL = "https://tcs-ghost.s3.us-west-2.amazonaws.com/casts/" + cast;
{{!-- console.log(castURL); --}}
AsciinemaPlayer.create(castURL, element);
});
</script>
{{!-- btcpay URL --}}
{{!-- <script src="https://pay.cloudgenius.app/modal/btcpay.js"></script> --}}
{{!-- Pagination Infinite Scroll --}}
{{#match @custom.pagination "Infinite Scroll"}}{{#if pagination.next}}<script src="{{asset "scripts/pagination.js"}}" defer async></script>{{/if}}{{/match}}
</body>
</html>