-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathauthor.hbs
executable file
·103 lines (83 loc) · 3.92 KB
/
author.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
{{!< default}}
{{! The comment above "< default" means - insert everything in this file into
the {body} of the default.hbs template, which contains our header/footer. }}
{{! The big featured header on the homepage, with the site logo and description }}
<script>
(function ($) {
"use strict";
$(document).ready(function(){
var $window = $(window),
$image = $('.post-image-image');
$window.on('scroll', function() {
var top = $window.scrollTop();
if (top < 0 || top > 1500) { return; }
$image
.css('transform', 'translate3d(0px, '+top/3+'px, 0px)')
.css('opacity', 1-Math.max(top/700, 0));
});
$window.trigger('scroll');
var height = $('.post-image-image').height();
$('.content').css('padding-top', height + 'px');
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 500);
return false;
}
}
});
});
});
}(jQuery));
</script>
{{#author}}
<div class="article tag-articleimage">
<div class="post-image">
<div class="post-image-image {{#if cover}}" style="background-image: url({{cover}}){{else}}no-cover{{/if}}" data-0="opacity: 1; top: 0px" data-500="opacity: 0.2; top: 250px">
Post Image
</div>
<header class="post-header">
<a href="/" class="button-back"><i class="fa fa-chevron-left "></i></a>
{{#if @blog.logo}}<div class="blog-logo" style="background-image: url({{@blog.logo}})">Blog Logo</div>{{/if}}
</header>
<div class="post-head">
<div class="post-author">
{{#if image}}<div class="author-image" style="background-image: url({{image}})">Blog Logo</div>{{/if}}
</div>
<h1 class="post-title">{{name}}</h1>
<span class="post-meta author">
{{bio}}
<br><br>
<div class="author-meta">
{{#if location}}<span class="author-location icon-location">{{location}}</span>{{/if}}
{{#if website}}<span class="author-link icon-link"><a href="{{website}}">{{website}}</a></span>{{/if}}
<span class="author-stats"><i class="icon-stats"></i> {{plural ../pagination.total empty='No posts' singular='% post' plural='% posts'}}</span>
</div>
</span>
</div>
<center><a href="#topofpage" class="topofpage"><i class="fa fa-angle-down"></i></a></center>
</div>
</div>
{{! The main content area on the homepage }}
<main class="content tag-list" role="main">
{{/author}}
{{! Each post will be output using this markup }}
{{#foreach posts}}
<article class="{{post_class}}">
<header class="post-header">
<h2 class="post-title"><a href="{{url}}">{{{title}}}</a></h2>
<span class="post-meta"><time datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMM YYYY"}}</time> {{tags prefix="on "}}</span>
</header>
<section class="post-excerpt">
<p>{{excerpt}}…</p>
</section>
</article>
{{/foreach}}
{{!! After all the posts, we have the previous/next pagination links }}
<h5 class="index-headline bottom"><span><a href="/">Back to Overview</a> · Article list for {{author.name}} · {{pagination}}</span></h5>
</main>