forked from TryGhost/Lyra
-
Notifications
You must be signed in to change notification settings - Fork 7
/
default.hbs
171 lines (142 loc) · 6.55 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
<!DOCTYPE html>
<!--
Theme modified by:
——————————
GODO FREDO
✉ https://godofredo.ninja
✎ @GodoFredoNinja
✈ Lima - Perú
-->
<html lang="{{@site.lang}}">
<head>
{{!-- Document Settings --}}
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
{{!-- Base Meta --}}
<title>{{meta_title}}</title>
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{{!-- Styles'n'Scripts --}}
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="{{asset "built/screen.css"}}" />
{{!-- This tag outputs SEO meta+structured data and other important settings --}}
{{ghost_head}}
</head>
<body class="{{body_class}}">
<div class="site-wrapper">
{{!-- All the main content gets inserted here, index.hbs, post.hbs, etc --}}
{{{body}}}
{{!-- The footer at the very bottom of the screen --}}
<footer class="site-footer outer">
<div class="site-footer-content inner">
<section class="copyright">
© {{date format="YYYY"}} <a href="{{@site.url}}">{{@site.title}}</a>
<span class="bull">•</span> Published with <a href="https://ghost.org" target="_blank" rel="noopener">Ghost</a>
</section>
<nav class="site-footer-nav">
{{!-- <a href="https://instagram.com/godofredoninja" target="_blank" rel="noopener"><svg class="icon"><use xlink:href="#icon-instagram"></use></svg> Instagram</a> --}}
{{!-- <a href="https://github.com/godofredoninja" target="_blank" rel="noopener"><svg class="icon"><use xlink:href="#icon-github"></use></svg> GitHub</a> --}}
{{#if @site.twitter}}<a href="{{twitter_url @site.twitter}}" target="_blank" rel="noopener"><svg class="icon"><use xlink:href="#icon-twitter"></use></svg> Twitter</a>{{/if}}
{{#if @site.facebook}}<a href="{{facebook_url @site.facebook}}" target="_blank" rel="noopener"><svg class="icon"><use xlink:href="#icon-facebook"></use></svg> Facebook</a>{{/if}}
</nav>
</div>
</footer>
</div>
{{> "notifications"}}
{{!-- Icons --}}
{{> "icons/icons"}}
{{!-- Prism Js Variable --}}
<script>
var prismJs = '{{asset "built/prismjs.js"}}';
var prismJsComponents = 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.19.0/components/';
</script>
<script>
var images = document.querySelectorAll('.kg-gallery-image img');
images.forEach(function (image) {
var container = image.closest('.kg-gallery-image');
var width = image.attributes.width.value;
var height = image.attributes.height.value;
var ratio = width / height;
container.style.flex = ratio + ' 1 0%';
});
</script>
{{!-- jQuery + Fitvids, which makes all video embeds responsive --}}
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous">
</script>
<script type="text/javascript" src="{{asset "built/jquery.fitvids.js"}}"></script>
<script src="{{asset "built/infinitescroll.js"}}"></script>
{{!-- Scripts for Members subscription --}}
<script>
// Parse the URL parameter
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
// Give the parameter a variable name
var action = getParameterByName('action');
var stripe = getParameterByName('stripe');
$(document).ready(function () {
if (action == 'subscribe') {
$('body').addClass("subscribe-success");
}
if (action == 'signup') {
window.location = '{{@site.url}}/signup/?action=checkout';
}
if (action == 'checkout') {
$('body').addClass("signup-success");
}
if (action == 'signin') {
$('body').addClass("signin-success");
}
if (stripe == 'success') {
$('body').addClass("checkout-success");
}
if (stripe == 'billing-update-success') {
$('body').addClass("billing-success");
}
if (stripe == 'billing-update-cancel') {
$('body').addClass("billing-cancel");
}
$('.notification-close').click(function () {
$(this).parent().addClass('closed');
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("?"));
window.history.replaceState({}, document.title, clean_uri);
}
});
// Reset form on opening subscrion overlay
$('.subscribe-button').click(function() {
$('.subscribe-overlay form').removeClass();
$('.subscribe-email').val('');
});
// Account navigation menu
$('.account-menu-avatar').click(function(event) {
$(this).toggleClass('active');
event.stopPropagation();
});
$('.account-menu-dropdown').click(function(event) {
event.stopPropagation();
});
$('body').click(function () {
$('.account-menu-avatar').removeClass('active');
});
$('.js-toggle-menu').click(function () {
$('body').toggleClass('has-menu');
});
});
</script>
{{!-- The #block helper will pull in data from the #contentFor other template files. In this case, there's some JavaScript which we only want to use in post.hbs, but it needs to be included down here, after jQuery has already loaded. --}}
{{{block "scripts"}}}
{{!-- Ghost outputs important scripts and data with this tag - it should always be the very last thing before the closing body tag --}}
{{ghost_foot}}
</body>
</html>