You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
cosmopet-architecture/wp-content/themes/cosmopet/views/blog/editorial.twig

52 lines
2.5 KiB

{% set current_path = template_path ~ '/modules/blog/components/editorial' %}
{% if editorial %}
<section class="editorial">
<div class="container">
<div class="editorial-head">
<h2 class="editorial-head__title">{{ function('pll_e', 'COSMO тема редакции') }}</h2>
<img src="{{ current_path }}/assets/img/editorial-head-icon.png" alt="" class="editorial-head__img">
<img src="{{ current_path }}/assets/img/editorial-head-star.png" alt="" class="editorial-head__star">
</div>
<ul class="editorial-card__wrap">
{% for _post in editorial %}
<li class="editorial-card">
<a href="{{_post.link}}" class="main-img">
<img src="{{_post.thumbnail.src}}" alt="{{_post.thumbnail.alt}}">
</a>
<div class="editorial-card__content">
<ul class="editorial-card__content-alerts">
{% for category in _post.categories %}
<li>
<a href="{{ category.link }}">{{ category.name }}</a>
</li>
{% endfor %}
</ul>
<a href="{{_post.link}}" class="editorial-card__content-title">{{_post.name}}</a>
<div class="editorial-card__content-data">
<p>{{_post.date}}</p>
<p>{{_post.reading_time}}</p>
<ul>
<li>
<img src="{{ current_path }}/assets/img/header-red.svg" alt="">
<span>{{ function('get_post_likes_count', _post.ID|default(0)) }}</span>
</li>
<li>
<img src="{{ current_path }}/assets/img/msg-green.svg" alt="">
<span>{{ _post.get_comments_number }}</span> </li>
{% if _post.get_author_name %}
<li class="logo">
<a href="{{ _post.get_author_link }}">
<img src="{{_post.get_author_img}}" alt="">
</a>
</li>
{% endif %}
</ul>
</div>
</div>
</li>
{% endfor %}
</ul>
</div>
</section>
{% endif %}