ORIENT/themes/modern2/partials/index/category_posts.htm

40 lines
1.6 KiB
HTML

[viewBag]
==
{% set posts = category.take_posts(5) %}
<div class="main__body-column">
<div class="main__body-header">
<div class="main__body-header-title">
{{category.name}}
</div>
<a href="{{'category'|page({slug:category.slug})}}" class="main__body-header-link">
{{'page.more'|_}}
</a>
</div>
<a href="{{posts.first.featured_image|media|resize(470)}}" class="primary progressive replace">
<img class="preview" src="{{posts.first.featured_image|media|resize(10)}}" alt="{{posts.first.title}}">
</a>
<div class="main__body-card">
<div class="card">
<div class="card__header">
<div class="card__header-category">
{{category.name}}
</div>
</div>
<div class="card__header">
<time class="card__header-date"><span>{{posts.first.published_at|date('d.m.Y')}}</span>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 4">
<path id="Polygon_1" data-name="Polygon 1" d="M2,0,4,2,2,4,0,2Z"
fill="#a2a2a2" />
</svg>
<span>{{posts.first.published_at|date('H:i')}}</span>
</time> </span>
</div>
<a href="{{'post'|page({id:posts.first.id,slug:posts.first.slug})}}" class="card__link">
{{posts.first.title}}
</a>
</div>
{% for post in posts.slice(1) %}
{% partial 'index/category_post_item' post = post %}
{% endfor %}
</div>
</div>