forked from eddiesigner/liebling
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1009ccc
commit 80318d8
Showing
1 changed file
with
58 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,58 @@ | ||
<div> | ||
stub | ||
</div> | ||
{{!-- The template below includes the markup for each post --}} | ||
|
||
{{#foreach posts}} | ||
{{#is "post"}} | ||
<div class="m-recommended-slider__item swiper-slide"> | ||
{{/is}} | ||
<article class="m-article-card {{#unless feature_image}}no-picture{{/unless}} {{post_class}}"> | ||
<div class="m-article-card__picture"> | ||
<a href="{{url}}" class="m-article-card__picture-link" aria-hidden="true" tabindex="-1"></a> | ||
{{#if feature_image}} | ||
<img class="m-article-card__picture-background" src="{{img_url feature_image size="m"}}" loading="lazy" alt=""> | ||
{{/if}} | ||
<a href="{{primary_author.url}}" class="m-article-card__author js-tooltip" aria-label="{{primary_author.name}}" data-tippy-content="{{t "Posted by"}} {{primary_author.name}} {{authors autolink="false" from="2" prefix=(t "Among with") separator=" , "}}"> | ||
{{#if primary_author.profile_image}} | ||
<div style="background-image: url({{img_url primary_author.profile_image size="xs"}});"></div> | ||
{{else}} | ||
<div style="background-image: url({{asset "images/default-avatar-square-small.jpg"}});"></div> | ||
{{/if}} | ||
</a> | ||
{{#if featured}} | ||
<a href="{{url}}" class="m-article-card__featured js-tooltip" data-tippy-content="{{t "Featured"}}" aria-label="{{t "Featured"}}"> | ||
<span class="icon-star" aria-hidden="true"></span> | ||
</a> | ||
{{/if}} | ||
</div> | ||
{{#if primary_tag}} | ||
<div class="m-article-card__info"> | ||
<a href="{{primary_tag.url}}" class="m-article-card__tag">{{primary_tag.name}}</a> | ||
{{else}} | ||
<div class="m-article-card__info no-tag"> | ||
{{/if}} | ||
<a href="{{url}}" class="m-article-card__info-link" aria-label="{{title}}"> | ||
<div> | ||
<h2 class="m-article-card__title js-article-card-title {{#unless feature_image}}js-article-card-title-no-image{{/unless}}" title="{{title}}"> | ||
{{title}} | ||
</h2> | ||
</div> | ||
<div class="m-article-card__timestamp"> | ||
<span>{{date published_at timeago="true"}}</span> | ||
<span>•</span> | ||
<span>{{reading_time minute=(t "1 min read") minutes=(t "% min read")}}</span> | ||
</div> | ||
</a> | ||
</div> | ||
</article> | ||
{{#is "post"}} | ||
</div> | ||
{{/is}} | ||
{{else}} | ||
<div class="m-recommended-slider__item swiper-slide"> | ||
<div class="m-heading no-margin"> | ||
<h3>{{t "No posts found"}}</h3> | ||
<p> | ||
{{t "Apparently there are no posts at the moment, check again later."}} | ||
</p> | ||
</div> | ||
</div> | ||
{{/foreach}} |