view statistics

This commit is contained in:
merdan 2021-03-15 11:59:08 +05:00
parent 2619410bb4
commit 42595e1513
9 changed files with 26 additions and 21 deletions

View File

@ -202,7 +202,7 @@ class Posts extends ComponentBase
*/
$isPublished = !$this->checkEditor();
$posts = BlogPost::with(['categories', 'featured_images'])->listFrontEnd([
$posts = BlogPost::with(['categories'])->listFrontEnd([
'page' => $this->property('pageNumber'),
'sort' => $this->property('sortOrder'),
'perPage' => $this->property('postsPerPage'),

View File

@ -59,10 +59,10 @@ class StaticPage extends ComponentBase
$this->page = $this->page['page'] = $router->findByUrl($url);
if ($this->page) {
$this->seo_title = $this->page['seo_title'] = $this->page->viewBag['meta_title'];
$this->seo_title = $this->page['seo_title'] = $this->page->viewBag['meta_title'] ?? '';
$this->title = $this->page['title'] = $this->page->viewBag['title'];
$this->seo_description = $this->page['seo_description'] = $this->page->viewBag['meta_description'];
$this->seo_keywords = $this->page['seo_keywords'] = $this->page->viewBag['meta_keywords'];
$this->seo_description = $this->page['seo_description'] = $this->page->viewBag['meta_description'] ?? '';
$this->seo_keywords = $this->page['seo_keywords'] = $this->page->viewBag['meta_keywords'] ?? '';
// $this->canonical_url = $this->page['canonical_url'] = $this->page->getViewBag()->property('canonical_url');
// $this->redirect_url = $this->page['redirect_url'] = $this->page->getViewBag()->property('redirect_url');
$this->robot_index = $this->page['robot_index'] = $this->page->getViewBag()->property('robot_index');

View File

@ -13,6 +13,7 @@ en:
contact.address: 'Address'
contact.phone: 'Phone'
contact.feedback: 'Feedback'
post.not_found: 'No posts found'
footer.copyright: 'ORIENT - INFORMATION AGENCY'
ru:
site.name: 'Ориент'
@ -29,5 +30,6 @@ ru:
contact.address: 'Наш адрес'
contact.phone: 'Тел'
contact.feedback: 'Обратная связь'
post.not_found: 'Записей не найдено'
footer.copyright: 'ORIENT - ИНФОРМАЦИОННОЕ АГЕНТСТВО'

View File

@ -1,5 +1,5 @@
[localePicker]
forceUrl = 0
forceUrl = 1
[SeoCmsPage]
==
@ -31,4 +31,4 @@ forceUrl = 0
============================================= -->
</body>
</html>
</html>

View File

@ -1,5 +1,5 @@
[localePicker]
forceUrl = 0
forceUrl = 1
[SeoStaticPage]
@ -37,4 +37,4 @@ default = 0
<!-- javascript end
============================================= -->
</body>
</html>
</html>

View File

@ -1,5 +1,5 @@
[localePicker]
forceUrl = 0
forceUrl = 1
[SeoCmsPage]
==
@ -22,4 +22,4 @@ forceUrl = 0
============================================= -->
</body>
</html>
</html>

View File

@ -1,5 +1,5 @@
[localePicker]
forceUrl = 0
forceUrl = 1
[SeoStaticPage]
@ -29,4 +29,4 @@ default = 0
<!-- javascript end
============================================= -->
</body>
</html>
</html>

View File

@ -24,6 +24,8 @@ localeUrl[en] = "/category/:slug"
</div>
{% for item in posts %}
{% partial 'post_list_item' post = item %}
{% else %}
<p>No posts found</p>
{% endfor %}
{% partial 'pagination'%}
</div>
@ -43,4 +45,4 @@ localeUrl[en] = "/category/:slug"
field: document.getElementById('calendar')
});
</script>
{% endput %}
{% endput %}

View File

@ -1,6 +1,9 @@
<div class="heading__row">
<a href="images/news/1.png" class="heading__image primary progressive replace">
<img class="preview" src="images/lazy/1.jpg" alt="">
<a href="{{post.featured_image|media|resize(10,10)}}" class="heading__image primary progressive replace">
<picture>
<img class="preview" src="{{post.featured_image|media}}" alt="">
</picture>
</a>
<div class="heading__content">
<div class="heading__content-header">
@ -13,7 +16,7 @@
fill="#a2a2a2" />
</svg>
<span>
{{post.published_at|date('HH:mm')}}
{{post.published_at|date('H:i')}}
</span>
</div>
<div class="heading__content-header-view">
@ -36,13 +39,11 @@
</div>
</div>
<div class="heading__content-body">
<a href="#" class="heading__content-body-link">
От нефтепродуктов до солодки — что покупали на туркменской бирже за неделю
<a href="#" >
<h2 class="heading__content-body-link">{{post.title}}</h2>
</a>
<div class="heading__content-body-para">
Итог экспортных сделок Государственной товарно-сырьевой биржи Туркменистана за
первую неделю февраля вышел в сумму более 33,4 миллиона долларов США и 91,2
миллиона манатов.
{{post.excerpt}}
</div>
</div>
</div>