forked from TryGhost/Casper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.hbs
More file actions
350 lines (298 loc) · 11.2 KB
/
Copy pathdefault.hbs
File metadata and controls
350 lines (298 loc) · 11.2 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
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
<!DOCTYPE html>
<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 rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" integrity="sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B" crossorigin="anonymous">
<link rel="stylesheet" href="{{asset 'css/fonts.css'}}" />
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js" integrity="sha384-o+RDsa0aLu++PJvFqy8fFScvbHFLtbvScb8AjopnFD+iEQ7wo/CG0xlczd+2O/em" crossorigin="anonymous"></script>
<style>
.thief-media-left {
width: 60%;
float: left;
}
.thief-media-left img {
max-width: 100%;
}
#the-box {
padding-top: 5em;
font-family: 'Stolen Victory Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}
#post, .that-font {
font-family: 'Stolen Victory Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}
pre, tt, code {
font-family: 'Stolen Victory Sans', monospace;
}
img {
max-width: 100%;
}
#post div,
#post p,
#post h1,
#post h2,
#post h3,
#post h4,
#post h5,
#post h6,
#post ul,
#post ol,
#post blockquote,
#post > img,
#post section > code,
#post section > pre,
#post .kg-bookmark-card,
#post figcaption {
max-width: 800px;
margin: 0 auto 0 auto;
display: block;
}
#post p,
#post h1,
#post h2,
#post h3,
#post h4,
#post h5,
#post h6,
#post ul,
#post ol,
#post blockquote {
padding-top: 0.5em;
padding-bottom: 0.5em;
}
#post figcaption {
font-size: small;
font-style: italic;
text-align: center;
}
#post blockquote {
padding: 1em;
font-size: 1.3rem;
font-style: italic;
border-left: .5em #aaa solid;
}
#post section > pre, #post section > code {
padding: 1em;
background-color: #e7e7e7;
}
#post > .kg-card,
#post .kg-image-card {
margin: 0 auto 0 auto;
display: block;
max-width: 800px;
min-width: 350px;
}
#post .post-full-image {
max-width: 800px;
min-width: 350px;
margin: 0 auto 0 auto;
display: block;
text-align: center;
}
#post .kg-width-wide {
max-width: 1050px;
min-width: 350px;
margin: 0 auto 0 auto;
display: block;
text-align: center;
}
#post .kg-width-full {
max-width: 100%;
min-width: 350px;
margin: 0 auto 0 auto;
display: block;
text-align: center;
}
.kg-bookmark-card {
width: 100%;
position: relative;
}
.kg-bookmark-container {
display: flex;
flex-wrap: wrap;
flex-direction: row-reverse;
color: currentColor;
font-family: inherit;
text-decoration: none;
border: 1px solid rgba(0, 0, 0, 0.1);
}
.kg-bookmark-container:hover {
text-decoration: none;
}
.kg-bookmark-content {
flex-basis: 0;
flex-grow: 999;
padding: 20px;
order: 1;
}
.kg-bookmark-title {
font-weight: 600;
}
.kg-bookmark-metadata,
.kg-bookmark-description {
margin-top: .5em;
}
.kg-bookmark-metadata {
align-items: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.kg-bookmark-description {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.kg-bookmark-icon {
display: inline-block;
width: 1em;
height: 1em;
vertical-align: text-bottom;
margin-right: .5em;
margin-bottom: .05em;
}
.kg-bookmark-thumbnail {
display: flex;
flex-basis: 24rem;
flex-grow: 1;
}
.kg-bookmark-thumbnail img {
max-width: 100%;
height: auto;
vertical-align: bottom;
object-fit: cover;
}
.kg-bookmark-author {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.kg-bookmark-publisher::before {
content: "•";
margin: 0 .5em;
}
.fluid-width-video-wrapper {
position: relative;
overflow: hidden;
padding-top: 56.25%;
}
.fluid-width-video-wrapper iframe,
.fluid-width-video-wrapper object,
.fluid-width-video-wrapper embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style>
{{!-- This tag outputs SEO meta+structured data and other important settings --}}
{{ghost_head}}
</head>
<body class="{{body_class}}">
{{!-- All the main content gets inserted here, index.hbs, post.hbs, etc --}}
{{{body}}}
{{!-- The footer at the very bottom of the screen --}}
<footer class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container">
<ul class="navbar-nav">
<li><span class="nav-link"><a href="{{@site.url}}">{{@site.title}}</a> © {{date format="YYYY"}}</span></li>
<li><span class="nav-link">Powered by <a href="https://ghost.org" target="_blank" rel="noopener">Ghost</a></span></li>
</ul>
<ul class="navbar-nav ml-auto">
<li><a href="{{@site.url}}" class="nav-link">Latest Posts</a></li>
<li>{{#if @site.facebook}}<a href="{{facebook_url @site.facebook}}" target="_blank" rel="noopener" class="nav-link">Facebook</a>{{/if}}</li>
<li>{{#if @site.twitter}}<a href="{{twitter_url @site.twitter}}" target="_blank" rel="noopener" class="nav-link">Twitter</a>{{/if}}</li>
<li><a href="https://github.com/kmwallio/ThiefMD" class="nav-link">GitHub</a></li>
</ul>
</div>
</footer>
{{!-- The big email subscribe modal content --}}
{{!-- {{#if @labs.members}}
<div class="subscribe-notification subscribe-success-message">
<a class="subscribe-close-button" href="javascript:;"></a>
You've successfully subscribed to {{@site.title}}!
</div>
<div class="subscribe-notification subscribe-failure-message">
<a class="subscribe-close-button" href="javascript:;"></a>
Could not sign up! Invalid sign up link.
</div>
<div id="subscribe" class="subscribe-overlay">
<a class="subscribe-close-overlay" href="#"></a>
<a class="subscribe-close-button" href="#"></a>
<div class="subscribe-overlay-content">
{{#if @site.logo}}
<img class="subscribe-overlay-logo" src="{{@site.logo}}" alt="{{@site.title}}" />
{{/if}}
<div class="subscribe-form">
<h1 class="subscribe-overlay-title">Subscribe to {{@site.title}}</h1>
<p class="subscribe-overlay-description">Stay up to date! Get all the latest & greatest posts delivered straight to your inbox</p>
<form data-members-form="subscribe">
<div class="form-group">
<input class="subscribe-email" data-members-email placeholder="youremail@example.com"
autocomplete="false" />
<button class="button primary" type="submit">
<span class="button-content">Subscribe</span>
<span class="button-loader">{{> "icons/loader"}}</span>
</button>
</div>
<div class="message-success">
<strong>Great!</strong> Check your inbox and click the link to confirm your subscription.
</div>
<div class="message-error">
Please enter a valid email address!
</div>
</form>
</div>
</div>
</div>
{{/if}} --}}
{{!-- Fitvids (for responsive video embeds), infinite scroll, floating header, and gallery card support --}}
<script src="{{asset "built/casper.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 success = getParameterByName('success');
$(document).ready(function () {
if (action == 'subscribe' && (success === null || success === 'true')) {
$('body').addClass('subscribe-success');
}
if (action == 'subscribe' && success === 'false') {
$('body').addClass('subscribe-failure');
}
$('.subscribe-notification .subscribe-close-button').click(function () {
$('.subscribe-notification').addClass('close');
});
// Reset form on opening subscrion overlay
$('.subscribe-button').click(function() {
$('.subscribe-overlay form').removeClass();
$('.subscribe-email').val('');
});
});
</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>