forked from TryGhost/Casper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.hbs
48 lines (42 loc) · 1.35 KB
/
index.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
{{!< default}}
{{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}}
<header class="site-header outer nacho-header">
{{> "site-nav"}}
</header>
<div class="nacho-alert" data-nacho="alert" style="display:none;">
Thanks for signing up!
</div>
{{!-- The main content area --}}
<main id="site-main" class="site-main outer">
<div class="inner">
<div class="post-feed">
{{#get "posts" limit="all" filter="featured:true" as |featured|}}
{{#foreach featured}}
{{> "post-card"}}
{{/foreach}}
{{/get}}
{{> "ifs-form"}}
{{#get "posts" limit="all" filter="featured:false" as |featured|}}
{{#foreach posts}}
{{> "post-card"}}
{{/foreach}}
{{/get}}
</div>
</div>
</main>
{{#contentFor "scripts"}}
<script>
// https://stackoverflow.com/questions/7731778/get-query-string-parameters-url-values-with-jquery-javascript
var urlParam = function (name) {
var results = new RegExp('[\?&]' + name + '=([^&#]*)')
.exec(window.location.search)
return (results && results[1]) || 0
}
$(document).ready(function() {
if (urlParam("signup")) {
$('[data-nacho="alert"]').slideDown()
}
})
</script>
{{/contentFor}}