liebling/page-authors.hbs

98 lines
4 KiB
Handlebars
Raw Permalink 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.
--}}
2020-11-07 19:18:06 +00:00
{{!-- This block preloads specific assets for the authors page --}}
{{#contentFor "preload"}}
2020-07-07 15:13:29 +00:00
<link rel="preload" href="{{asset "css/listing.css"}}" as="style" />
2020-11-07 19:18:06 +00:00
{{/contentFor}}
2020-07-07 15:13:29 +00:00
2020-11-07 19:18:06 +00:00
{{!-- This block loads specific styles for the authors page --}}
{{#contentFor "styles"}}
2020-07-07 15:13:29 +00:00
<link rel="stylesheet" type="text/css" href="{{asset "css/listing.css"}}" media="screen" />
2020-07-02 20:23:00 +00:00
{{/contentFor}}
2019-04-14 18:41:25 +00:00
{{!-- 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}}
2020-07-07 15:13:29 +00:00
{{!-- Special header.hbs partial to generate the <header> tag --}}
{{#post}}
{{> header background=feature_image}}
{{/post}}
2019-02-23 16:53:37 +00:00
{{#post}}
2020-07-07 15:13:29 +00:00
<main class="main-wrap">
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}}
2020-02-25 16:10:57 +00:00
<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-10-06 14:14:16 +00:00
</section>
2020-07-07 15:13:29 +00:00
<div class="l-content">
<div class="l-wrapper" data-aos="fade-up" data-aos-delay="300">
{{#get 'authors' limit='all' include='count.posts' order='count.posts desc'}}
<div class="l-grid centered">
{{#foreach authors}}
<article class="m-article-card as-author">
<div class="m-article-card__picture">
{{#if profile_image}}
<img clasS="m-article-card__picture-background" src="{{img_url profile_image size="m"}}" loading="lazy" alt="">
{{else}}
<img clasS="m-article-card__picture-background" src="{{asset "images/default-avatar-rectangle.jpg"}}" loading="lazy" alt="">
{{/if}}
<a href="{{url}}" class="m-article-card__picture-link" aria-label="{{name}}"></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" aria-hidden="true" tabindex="-1">
{{#if bio}}
<p class="m-article-card__excerpt js-article-card-title">
{{bio}}
</p>
2020-06-29 13:54:07 +00:00
{{/if}}
2020-07-07 15:13:29 +00:00
</a>
<div class="m-article-card__author-stats">
<span>
{{plural count.posts empty=(t "No posts") singular=(t "1 post") plural=(t "% posts")}}
</span>
{{#has any="twitter, facebook, website"}}
<ul class="m-article-card__social">
{{#if website}}
<li>
<a href="{{website}}" target="_blank" rel="noopener" aria-label="{{t "Website"}}">
<span class="icon-globe" aria-hidden="true"></span>
</a>
</li>
{{/if}}
{{#if facebook}}
<li>
<a href="https://facebook.com/{{facebook}}" target="_blank" rel="noopener" aria-label="Facebook">
<span class="icon-facebook" aria-hidden="true"></span>
</a>
</li>
{{/if}}
{{#if twitter}}
<li>
<a href="https://twitter.com/{{twitter}}" target="_blank" rel="noopener" aria-label="Twitter">
<span class="icon-twitter" aria-hidden="true"></span>
</a>
</li>
{{/if}}
</ul>
{{/has}}
2019-02-23 16:53:37 +00:00
</div>
2020-07-07 15:13:29 +00:00
</div>
</article>
{{/foreach}}
</div>
{{/get}}
2019-03-12 10:39:01 +00:00
</div>
2020-07-07 15:13:29 +00:00
</div>
</main>
2019-02-23 16:53:37 +00:00
{{/post}}