-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdefault.hbs
62 lines (53 loc) · 2.06 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<title>{{meta_title}}</title>
<meta name="robots" content="noindex">
<meta name="HandheldFriendly" content="True"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" type="text/css" href="{{asset "styles/main.css"}}"/>
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700|Montserrat"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/fontawesome/4.3.0/css/font-awesome.min.css">
{{! Ghost outputs important style and meta data with this tag }}
{{ghost_head}}
</head>
<body class="{{body_class}}">
<div class="page-wrap">
<div class="page-content">
{{> "nav"}}
{{{body}}}
</div>
<footer class="site-footer">
<section class="copyright">
<ul class="footer-list">
<li>© jsdelivr.com, 2012 - {{date format="YYYY"}}; designed, developed, and maintained by <a href="https://prospectone.io/" target="_blank">Prospect One</a></li>
</ul>
</section>
<nav class="social-footer">
{{>links}}
</nav>
</footer>
</div>
{{! Ghost outputs important scripts and data with this tag }}
{{ghost_foot}}
<script src="https://cdn.jsdelivr.net/jquery/2.1.3/jquery.min.js"></script>
<script src="{{asset "js/jquery.ghostHunter.min.js"}}"></script>
<script>
$(".site-nav--search-input").ghostHunter({
results: ".search-results",
result_template: "<a href='\{{link}}' data-category='\{{category}}'><p><h2>\{{title}}</h2><h4>\{{pubDate}}</h4></p></a>",
onComplete: function() {
let res = $('.search-results > a').filter((index, element) => {
return $(element).data('category').toLowerCase().match('content');
});
let searchRes = $('.search-results > p');
let foundNum = parseInt(searchRes.text().match(/[0-9]+$/)[0]);
searchRes.text(searchRes.text().replace(/[0-9]+$/, foundNum - res.length));
res.remove();
}
});
</script>
</body>
</html>