forked from TryGhost/Edition
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.hbs
70 lines (58 loc) · 1.92 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
<!DOCTYPE html>
<html lang="{{@site.lang}}">
<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"}}">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,400;0,700;0,800;1,400;1,700&display=swap">
{{#if @site.accent_color}}
<style>
:root {
--brand-color: {{@site.accent_color}};
}
</style>
{{/if}}
{{ghost_head}}
</head>
<body class="{{body_class}}{{{block "body_class"}}}">
<div class="site">
{{> header}}
{{#is "home"}}
{{#unless @member}}
{{> cover}}
{{/unless}}
{{> featured}}
{{/is}}
<div class="site-content">
{{{body}}}
</div>
{{> footer}}
{{> pswp}}
</div>
{{!-- Fixes 100vh issue on mobile browsers with toolbar on the bottom --}}
<script>
if (document.body.classList.contains('with-full-cover')) {
document.getElementsByClassName('cover')[0].style.height = window.innerHeight + 'px';
}
</script>
<script>
var feed = document.querySelector('.post-feed');
if (feed && !feed.classList.contains('related-feed')) {
var wrapper = document.querySelector('.feed-layout');
var feedLayout = localStorage.getItem('edition_layout');
switch (feedLayout) {
case 'compact':
wrapper.classList.remove('expanded');
feed.classList.remove('expanded');
break;
default:
break;
}
}
</script>
<script src="{{asset "built/main.min.js"}}"></script>
{{ghost_foot}}
</body>
</html>