liebling/page-authors.hbs

83 lines
3.2 KiB
Handlebars
Raw Normal View History

2019-04-14 18:41:25 +00:00
{{!--
This template is used for the authors page.
You must first create a page called Authors in the dashboard to enable it.
--}}
{{!-- The tag below means: insert everything in this file
into the {body} of the default.hbs template --}}
2019-02-23 16:53:37 +00:00
{{!< default}}
{{#post}}
2019-03-08 09:47:48 +00:00
<div class="main-wrap">
2019-04-14 18:41:25 +00:00
{{!--Special header.hbs partial to generate the <header> tag--}}
2019-03-08 09:47:48 +00:00
{{> header background=feature_image}}
2019-04-14 18:41:25 +00:00
{{!-- Inject styles of the hero image to make it responsive --}}
2019-03-08 09:47:48 +00:00
{{> hero background=feature_image}}
2019-02-24 21:06:24 +00:00
<div class="m-hero__content" data-aos="fade-down">
2019-02-27 16:15:35 +00:00
<h1 class="m-hero-title bigger">{{title}}</h1>
2019-05-14 07:52:33 +00:00
{{#if custom_excerpt}}
<p class="m-hero-description">{{custom_excerpt}}</p>
2019-02-27 16:15:35 +00:00
{{/if}}
2019-02-24 21:06:24 +00:00
</div>
2019-03-08 09:47:48 +00:00
</header>
2019-03-12 10:39:01 +00:00
<main>
<div class="l-content">
2019-03-08 09:47:48 +00:00
<div class="l-wrapper" data-aos="fade-up" data-aos-delay="300">
{{#get 'authors' limit='all' include='count.posts' order='count.posts desc'}}
2019-03-12 10:39:01 +00:00
<div class="l-grid centered">
2019-02-23 16:53:37 +00:00
{{#foreach authors}}
2019-03-08 09:47:48 +00:00
<article class="m-article-card as-author">
{{#if profile_image}}
<div class="m-article-card__picture" style="background-image: url({{profile_image}})">
2019-02-23 16:53:37 +00:00
{{else}}
2019-03-08 09:47:48 +00:00
<div class="m-article-card__picture"
style="background-image: url({{asset "images/default-avatar-rectangle.jpg"}})">
{{/if}}
<a href="{{url}}" class="m-article-card__picture-link" aria-label="Author"></a>
<h3 class="m-article-card__name">{{name}}</h3>
</div>
<div class="m-article-card__info">
<a href="{{url}}" class="m-article-card__info-link">
<p class="m-article-card__excerpt">{{bio}}</p>
</a>
<div class="m-article-card__author-stats">
<span>
{{plural count.posts empty="No posts" singular="% post" plural="% posts"}}
</span>
{{#has any="twitter, facebook, website"}}
<ul class="m-article-card__social">
{{#if website}}
<li>
<a href="{{website}}" target="_blank" rel="noopener">
<span class="icon-globe"></span>
</a>
</li>
{{/if}}
{{#if facebook}}
<li>
<a href="https://facebook.com/{{facebook}}" target="_blank" rel="noopener">
<span class="icon-facebook"></span>
</a>
</li>
{{/if}}
{{#if twitter}}
<li>
<a href="https://twitter.com/{{twitter}}" target="_blank" rel="noopener">
<span class="icon-twitter"></span>
</a>
</li>
{{/if}}
</ul>
{{/has}}
2019-02-23 16:53:37 +00:00
</div>
2019-03-08 09:47:48 +00:00
</div>
</article>
2019-02-23 16:53:37 +00:00
{{/foreach}}
2019-03-12 10:39:01 +00:00
</div>
2019-03-08 09:47:48 +00:00
{{/get}}
</div>
2019-03-12 10:39:01 +00:00
</div>
2019-03-08 09:47:48 +00:00
</main>
</div>
2019-02-23 16:53:37 +00:00
{{/post}}