gurl_o/themes/gurlushyk/pages/news_post.htm

75 lines
2.2 KiB
HTML

title = "Habar"
url = "/habar/:id/:slug"
layout = "default"
is_hidden = 0
[viewBag]
localeTitle[en] = "News"
localeTitle[ru] = "Новость"
localeUrl[en] = "/news/:id/:slug"
localeUrl[ru] = "/novost/:id/:slug"
[blogPost]
slug = "{{ :slug }}"
id = "{{ :id }}"
categoryPage = 404
[blogPosts]
pageNumber = "{{ :page }}"
postsPerPage = 6
noPostsMessage = "No posts found"
sortOrder = "published_at desc"
categoryPage = 404
postPage = "news_post"
exceptPost = "{{ :id }}"
==
{% set post = blogPost.post %}
<!-- New post ========================================================= -->
<section class="news_post">
<div class="auto_container">
<div class="news_post-wrap">
<div class="news_post-box">
<div class="news_post-info">
<h4 class="news_post-info-title">
{{ post.title }}
</h4>
<p class="news_post-info-date">
{{ post.published_at|date('d.m.Y') }}
</p>
<div class="news_post-info-photo">
<img src="{{ post.featured_images[0].thumb(990,500,{'mode':'crop'}) }}" alt="news-photo">
</div>
<div class="news_post-info-txt">
{{ post.content_html|raw }}
</div>
</div>
<div class="news_post-aside">
<h1 class="news_aside-title">
{{ 'site.last_news'|_ }}
</h1>
{% set asidePosts = blogPosts.posts %}
{% for asidePost in asidePosts %}
<div class="news_aside-item">
<p class="news_aside-item-date">
{{ asidePost.published_at|date('d.m.Y') }}
</p>
<a href="{{ asidePost.url }}" class="news_aside-item-title">
{{ asidePost.title }}
</a>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</section>
<!-- New post end ========================================================= -->