generated from TryGhost/Starter
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdefault.hbs
More file actions
47 lines (41 loc) · 1.52 KB
/
default.hbs
File metadata and controls
47 lines (41 loc) · 1.52 KB
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
<!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}}">
{{> "navigation-top" }}
<main>
{{!-- All content gets inserted here, index.hbs, post.hbs, etc --}}
{{{body}}}
</main>
{{> "footer"}}
<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>