generated from TryGhost/Starter
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdefault.hbs
66 lines (57 loc) · 1.96 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
<!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="shortcut icon" type="image/png" href="{{asset "images/favicon.png"}}">
{{!-- CSS and JS with asset helper--}}
<link rel="stylesheet" href="{{asset "dist/app.css"}}" />
<script src="//code.jquery.com/jquery-3.6.4.min.js" defer></script>
<script src="{{asset "dist/app.js"}}" defer></script>
{{!-- contentFor/block scripts - use with defer --}}
{{{block "scripts"}}}
{{!-- Outputs important meta data and settings, should always be in <head> --}}
{{ghost_head}}
</head>
<body class="{{body_class}}">
<div class="grid">
{{> "navbar" }}
</div>
<main id="theme-main">
{{!-- All content gets inserted here, index.hbs, post.hbs, etc --}}
{{#is "home"}}
<header>
<a href="/" id="main-logo">
<div class="logo-square">
<div class="logo-circle"></div>
</div>
<h1>{{@site.title}}</h1>
</a>
<h2>{{@site.description}}</h2>
</header>
{{/is}}
{{{body}}}
</main>
<div class="grid">
{{!-- Navbar partial --}}
{{> "footer"}}
</div>
<script>
let sections = document.querySelectorAll('.section-header');
function handleClick(event) {
const isActive = event.currentTarget.parentNode.classList.contains("active");
if (!isActive) {
event.currentTarget.parentNode.classList.add("active");
} else {
event.currentTarget.parentNode.classList.remove("active");
}
}
sections.forEach(function(section) {
section.addEventListener("click", handleClick);
});
</script>
{{!-- Outputs important scripts - should always be included before closing body tag --}}
{{ghost_foot}}
</body>
</html>