-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
custom-archive-newsletter.hbs
58 lines (47 loc) · 1.74 KB
/
custom-archive-newsletter.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
{{!-- Layout --}}
{{!< default}}
{{#contentFor "special_body_class"}}is-subscribe{{/contentFor}}
{{#post}}
<article class="post ne">
<header class="ne-h container animated bounceInUp">
<div class="ne-inner u-maxWidth740 u-marginAuto u-relative u-flexColumnContentCenter u-flexCenter u-textAlignCenter">
<h1 class="ne-t u-underline u-md-fontSize36">{{title}}</h1>
{{#if custom_excerpt}}<p class="ne-e u-textMuted">{{custom_excerpt}}</p>{{/if}}
</div>
</header>
<section class="ne-body u-relative u-container">
<div class="circle"></div>
<div class="post-body u-maxWidth1000 u-marginAuto animated bounceInUp">{{content}}</div>
</section>
</article>
{{/post}}
{{#contentFor "scripts"}}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script>
$(document).ready(function() {
var $form = $('#godo-form');
$form.submit(function (e) {
e.preventDefault();
$.ajax({
type: $form.attr('method'),
url: $form.attr('action').replace('/post?', '/post-json?').concat('&c=?'),
data: $form.serialize(),
cache: false,
dataType: 'jsonp',
contentType: 'application/json; charset=utf-8',
success: function(data) {
if (data.result === 'success') {
$('.godo-ne-input').removeClass('error');
$('.godo-ne-success').removeClass('u-hide');
$form.addClass('u-hide');
$('.godo-ne-input').val('');
} else {
$('.godo-ne-input').addClass('error');
}
}
});
return false;
});
});
</script>
{{/contentFor}}