@ -0,0 +1 @@ |
|||||||
|
<?php |
@ -0,0 +1,2 @@ |
|||||||
|
<?php |
||||||
|
|
@ -1,3 +1,5 @@ |
|||||||
<?php |
<?php |
||||||
|
include_module('blog'); |
||||||
include_component('blog', 'archive'); |
include_component('blog', 'archive'); |
||||||
|
|
||||||
?> |
?> |
@ -1,442 +1,3 @@ |
|||||||
/* Home */ |
/* Home */ |
||||||
.home { |
|
||||||
padding: 140px 0 68px; |
|
||||||
} |
|
||||||
|
|
||||||
.home-title { |
|
||||||
font-size: 82px; |
|
||||||
font-weight: bold; |
|
||||||
line-height: 96px; |
|
||||||
color: var(--main_white); |
|
||||||
margin-bottom: 16px; |
|
||||||
} |
|
||||||
|
|
||||||
.home-description { |
|
||||||
font-size: 32px; |
|
||||||
font-weight: bold; |
|
||||||
line-height: 40px; |
|
||||||
color: var(--main_white); |
|
||||||
text-transform: uppercase; |
|
||||||
margin-bottom: 68px; |
|
||||||
} |
|
||||||
|
|
||||||
/* Home end */ |
|
||||||
|
|
||||||
|
|
||||||
/* Anons */ |
|
||||||
.anons { |
|
||||||
background: var(--main_white); |
|
||||||
border-radius: 60px; |
|
||||||
padding: 51px 0; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-theme__title { |
|
||||||
color: var(--main_black); |
|
||||||
font-size: 24px; |
|
||||||
font-weight: bold; |
|
||||||
line-height: 28px; |
|
||||||
text-transform: uppercase; |
|
||||||
margin-bottom: 20px; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-theme { |
|
||||||
margin-bottom: 60px; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-theme ul { |
|
||||||
max-width: 1022px; |
|
||||||
display: flex; |
|
||||||
flex-wrap: wrap; |
|
||||||
gap: 12px; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-theme ul a { |
|
||||||
font-size: 20px; |
|
||||||
font-weight: 600; |
|
||||||
line-height: 24px; |
|
||||||
color: var(--main_black); |
|
||||||
padding: 4px 24px; |
|
||||||
border: 1px solid #000; |
|
||||||
border-radius: 20px; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-theme ul a:hover, |
|
||||||
.anons-theme ul a.active { |
|
||||||
background: var(--main_black); |
|
||||||
color: var(--main_white); |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best { |
|
||||||
margin-bottom: 60px; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__title { |
|
||||||
font-size: 36px; |
|
||||||
line-height: 40px; |
|
||||||
font-weight: bold; |
|
||||||
color: var(--main_black); |
|
||||||
margin-bottom: 20px; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__card-wrap { |
|
||||||
display: grid; |
|
||||||
grid-template-columns: repeat(3, minmax(0, 1fr)); |
|
||||||
gap: 24px; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__card { |
|
||||||
padding-top: 293px; |
|
||||||
border-radius: 48px; |
|
||||||
overflow: hidden; |
|
||||||
position: relative; |
|
||||||
z-index: 1; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__card.light { |
|
||||||
padding-top: 0; |
|
||||||
border-radius: 0; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__card .main-img { |
|
||||||
position: absolute; |
|
||||||
top: 0; |
|
||||||
left: 0; |
|
||||||
width: 100%; |
|
||||||
height: 360px; |
|
||||||
z-index: -1; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__card .main-img img { |
|
||||||
width: 100%; |
|
||||||
height: 100%; |
|
||||||
object-fit: cover; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__card.light .main-img { |
|
||||||
position: static; |
|
||||||
height: 265px; |
|
||||||
} |
|
||||||
.anons-best__card.light .main-img img { |
|
||||||
border-radius: 30px; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__card-alerts { |
|
||||||
position: absolute; |
|
||||||
top: 21px; |
|
||||||
left: 17px; |
|
||||||
width: calc(100% - 34px); |
|
||||||
display: flex; |
|
||||||
flex-wrap: wrap; |
|
||||||
gap: 7px; |
|
||||||
z-index: 1; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__card-alerts li { |
|
||||||
padding: 6px 8px; |
|
||||||
font-size: 16px; |
|
||||||
line-height: 20px; |
|
||||||
font-weight: 500; |
|
||||||
color: var(--background); |
|
||||||
background: var(--main_black); |
|
||||||
border-radius: 30px; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__card-body { |
|
||||||
background: var(--accent-1); |
|
||||||
padding: 30px 17px 22px; |
|
||||||
border-radius: 48px 48px 0 0; |
|
||||||
color: var(--main_white); |
|
||||||
position: relative; |
|
||||||
height: 100%; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__card.light .anons-best__card-body { |
|
||||||
background: transparent; |
|
||||||
color: var(--main_black); |
|
||||||
padding: 12px 0 34px; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__card-body__title { |
|
||||||
font-size: 28px; |
|
||||||
font-weight: bold; |
|
||||||
line-height: 32px; |
|
||||||
text-transform: uppercase; |
|
||||||
margin-bottom: 14px; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__card.light .anons-best__card-body__title { |
|
||||||
font-size: 26px; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__card-body__datas { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
flex-wrap: wrap; |
|
||||||
gap: 6px 10px; |
|
||||||
max-width: 264px; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__card.light .anons-best__card-body__datas { |
|
||||||
color: var(--placeholder); |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__card-body__datas p { |
|
||||||
font-size: 14px; |
|
||||||
line-height: 16px; |
|
||||||
font-weight: 500; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__card-body__datas ul { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
gap: 10px; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__card-body__datas ul li { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
gap: 4px; |
|
||||||
font-size: 14px; |
|
||||||
line-height: 16px; |
|
||||||
font-weight: 500; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-best__card-body__datas ul .logo img { |
|
||||||
width: 24px; |
|
||||||
height: 24px; |
|
||||||
border-radius: 50%; |
|
||||||
object-fit: cover; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-article { |
|
||||||
margin-bottom: 40px; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-article__title { |
|
||||||
font-size: 36px; |
|
||||||
line-height: 40px; |
|
||||||
font-weight: bold; |
|
||||||
color: var(--main_black); |
|
||||||
margin-bottom: 20px; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-article__card-wrap { |
|
||||||
display: grid; |
|
||||||
grid-template-columns: repeat(3, minmax(0, 1fr)); |
|
||||||
gap: 40px 25px; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-article__more-link { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: center; |
|
||||||
} |
|
||||||
|
|
||||||
.anons-article__more-link a { |
|
||||||
background: var(--accent-3); |
|
||||||
color: var(--main_white); |
|
||||||
border-radius: 20px; |
|
||||||
border: 1px solid var(--main_white); |
|
||||||
padding: 16px 24px; |
|
||||||
font-size: 20px; |
|
||||||
font-weight: 600; |
|
||||||
line-height: 24px; |
|
||||||
text-transform: uppercase; |
|
||||||
} |
|
||||||
/* Anons end */ |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Author */ |
|
||||||
.author { |
|
||||||
padding: 111px 0 105px; |
|
||||||
} |
|
||||||
|
|
||||||
.author-content { |
|
||||||
max-width: 1022px; |
|
||||||
margin: 0 auto; |
|
||||||
background: #CAFF81; |
|
||||||
border-radius: 60px; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: space-between; |
|
||||||
padding: 35px 42px 35px 209px; |
|
||||||
position: relative; |
|
||||||
box-shadow: 6px 9px 20px rgba(0, 0, 0, 15%); |
|
||||||
} |
|
||||||
|
|
||||||
.author-content__star-1 { |
|
||||||
position: absolute; |
|
||||||
width: 74px; |
|
||||||
top: 18px; |
|
||||||
left: -15px; |
|
||||||
transform: translateX(-100%); |
|
||||||
} |
|
||||||
|
|
||||||
.author-content__star-2 { |
|
||||||
position: absolute; |
|
||||||
top: 28px; |
|
||||||
right: -24px; |
|
||||||
transform: translateX(100%); |
|
||||||
width: 37px; |
|
||||||
} |
|
||||||
|
|
||||||
.author-content__img { |
|
||||||
position: absolute; |
|
||||||
left: 9px; |
|
||||||
top: -43px; |
|
||||||
width: 167px; |
|
||||||
} |
|
||||||
|
|
||||||
.author-content__img.mb { |
|
||||||
display: none; |
|
||||||
} |
|
||||||
|
|
||||||
.author-content__title { |
|
||||||
color: var(--main_black); |
|
||||||
font-size: 36px; |
|
||||||
font-weight: bold; |
|
||||||
line-height: 40px; |
|
||||||
} |
|
||||||
|
|
||||||
.author-content__link { |
|
||||||
border-radius: 20px; |
|
||||||
background: var(--main_black); |
|
||||||
border: 1px solid var(--main_white); |
|
||||||
padding: 15px 24px; |
|
||||||
font-size: 20px; |
|
||||||
font-weight: 600; |
|
||||||
line-height: 24px; |
|
||||||
color: var(--main_white); |
|
||||||
flex-shrink: 0; |
|
||||||
} |
|
||||||
/* Author end */ |
|
||||||
|
|
||||||
/* Editorial */ |
|
||||||
.editorial { |
|
||||||
padding-bottom: 68px; |
|
||||||
} |
|
||||||
|
|
||||||
.editorial-head { |
|
||||||
position: relative; |
|
||||||
z-index: 1; |
|
||||||
max-width: 841px; |
|
||||||
margin-bottom: 37px; |
|
||||||
} |
|
||||||
|
|
||||||
.editorial-head__title { |
|
||||||
font-size: 82px; |
|
||||||
line-height: 96px; |
|
||||||
font-weight: bold; |
|
||||||
color: var(--main_white); |
|
||||||
text-transform: uppercase; |
|
||||||
} |
|
||||||
|
|
||||||
.editorial-head__img { |
|
||||||
position: absolute; |
|
||||||
z-index: -1; |
|
||||||
top: -14px; |
|
||||||
right: -20px; |
|
||||||
width: 221px; |
|
||||||
} |
|
||||||
|
|
||||||
.editorial-head__star { |
|
||||||
position: absolute; |
|
||||||
top: 8.26px; |
|
||||||
right: -13.5px; |
|
||||||
transform: translateX(100%); |
|
||||||
width: 87.5px; |
|
||||||
} |
|
||||||
|
|
||||||
.editorial-card__wrap { |
|
||||||
display: grid; |
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr)); |
|
||||||
gap: 31px 25px; |
|
||||||
position: relative; |
|
||||||
z-index: 1; |
|
||||||
} |
|
||||||
|
|
||||||
.editorial-card { |
|
||||||
border: 2px solid var(--creme-white); |
|
||||||
border-radius: 30px; |
|
||||||
display: flex; |
|
||||||
align-items: stretch; |
|
||||||
overflow: hidden; |
|
||||||
background: var(--linear); |
|
||||||
backdrop-filter: blur(28px); |
|
||||||
} |
|
||||||
|
|
||||||
.editorial-card .main-img { |
|
||||||
min-height: 282px; |
|
||||||
width: 207px; |
|
||||||
border-radius: 29px; |
|
||||||
overflow: hidden; |
|
||||||
flex-shrink: 0; |
|
||||||
} |
|
||||||
|
|
||||||
.editorial-card .main-img img { |
|
||||||
width: 100%; |
|
||||||
height: 100%; |
|
||||||
object-fit: cover; |
|
||||||
} |
|
||||||
|
|
||||||
.editorial-card__content { |
|
||||||
padding: 42px 19px 19px 35px; |
|
||||||
} |
|
||||||
|
|
||||||
.editorial-card__content-alerts { |
|
||||||
display: flex; |
|
||||||
flex-wrap: wrap; |
|
||||||
align-items: center; |
|
||||||
gap: 7px; |
|
||||||
margin-bottom: 17px; |
|
||||||
} |
|
||||||
|
|
||||||
.editorial-card__content-alerts a { |
|
||||||
background: var(--main_black); |
|
||||||
border-radius: 16px; |
|
||||||
padding: 6px 8px; |
|
||||||
font-size: 16px; |
|
||||||
font-weight: 500; |
|
||||||
line-height: 20px; |
|
||||||
color: var(--background); |
|
||||||
} |
|
||||||
|
|
||||||
.editorial-card__content-title { |
|
||||||
font-size: 28px; |
|
||||||
font-weight: bold; |
|
||||||
line-height: 32px; |
|
||||||
color: var(--grey-black); |
|
||||||
text-transform: uppercase; |
|
||||||
margin-bottom: 17px; |
|
||||||
} |
|
||||||
|
|
||||||
.editorial-card__content-data { |
|
||||||
display: flex; |
|
||||||
flex-wrap: wrap; |
|
||||||
gap: 5px 16px; |
|
||||||
color: var(--interface_hover); |
|
||||||
font-size: 16px; |
|
||||||
font-weight: 500; |
|
||||||
line-height: 20px; |
|
||||||
} |
|
||||||
|
|
||||||
.editorial-card__content-data ul { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
gap: 16px; |
|
||||||
} |
|
||||||
|
|
||||||
.editorial-card__content-data li { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
gap: 5px; |
|
||||||
} |
|
||||||
|
|
||||||
.editorial-card__content-data .logo img { |
|
||||||
width: 24px; |
|
||||||
height: 24px; |
|
||||||
border-radius: 50%; |
|
||||||
object-fit: cover; |
|
||||||
} |
|
||||||
/* Editorial end */ |
/* Editorial end */ |
@ -1,32 +1,4 @@ |
|||||||
/* Стили для планшетов */ |
/* Стили для планшетов */ |
||||||
@media only screen and (max-width: 992px) { |
@media only screen and (max-width: 992px) { |
||||||
.header-navs { |
|
||||||
display: none; |
|
||||||
} |
|
||||||
|
|
||||||
.header-container { |
|
||||||
height: 56px; |
|
||||||
padding: 0; |
|
||||||
} |
|
||||||
|
|
||||||
.header-bars { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: center; |
|
||||||
} |
|
||||||
|
|
||||||
.header-logo { |
|
||||||
font-size: 16px; |
|
||||||
line-height: 20px; |
|
||||||
gap: 8px; |
|
||||||
} |
|
||||||
|
|
||||||
.header-logo img { |
|
||||||
width: 31px; |
|
||||||
flex-shrink: 0; |
|
||||||
} |
|
||||||
|
|
||||||
.header-lang { |
|
||||||
display: none; |
|
||||||
} |
|
||||||
} |
} |
||||||
|
@ -1,5 +1,18 @@ |
|||||||
<?php |
<?php |
||||||
|
|
||||||
include_component('blog', 'featured-slider'); |
include_component('blog', 'featured-slider'); |
||||||
|
include_component('blog', 'themes'); |
||||||
|
include_component('blog', 'most-read'); |
||||||
|
include_component('blog', 'news-list'); |
||||||
|
include_component('blog', 'editorial'); |
||||||
|
|
||||||
|
wp_localize_script('blog-archive-posts-ajax-js', 'ajax', array( |
||||||
|
'ajax_url' => admin_url('admin-ajax.php'), |
||||||
|
)); |
||||||
|
|
||||||
$context = Timber::get_context(); |
$context = Timber::get_context(); |
||||||
|
|
||||||
|
$context['post_count'] = wp_count_posts()->publish; // Количество опубликованных постов |
||||||
|
$context['total_pages'] = ceil($context['post_count'] / get_option('posts_per_page')); // Общее количество страниц |
||||||
|
|
||||||
Timber::render('blog/components/archive/component-template.twig', $context); |
Timber::render('blog/components/archive/component-template.twig', $context); |
||||||
|
After Width: | Height: | Size: 145 KiB |
After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
@ -0,0 +1,14 @@ |
|||||||
|
{% set current_path = template_path ~ '/modules/blog/components/author-banner' %} |
||||||
|
|
||||||
|
<section class="author"> |
||||||
|
<div class="container"> |
||||||
|
<div class="author-content"> |
||||||
|
<img src="{{ current_path }}/assets/img/star-1.png" alt="" class="author-content__star-1"> |
||||||
|
<img src="{{ current_path }}/assets/img/star-2.png" alt="" class="author-content__star-2"> |
||||||
|
<img src="{{ current_path }}/assets/img/author-card.png" alt="" class="author-content__img"> |
||||||
|
<img src="{{ current_path }}/assets/img/author-card-mb.png" alt="" class="author-content__img mb"> |
||||||
|
<h2 class="author-content__title">ПРЕДЛОЖИТЕ СТАТЬЮ <br>ИЛИ СТАНЬТЕ АВТОРОМ</h2> |
||||||
|
<a href="#" class="author-content__link">НАПИШИТЕ НАМ</a> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</section> |
After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 310 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 2.6 KiB |
@ -1,2 +1,14 @@ |
|||||||
<?php |
<?php |
||||||
|
|
||||||
|
add_filter('timber/context', function($context) { |
||||||
|
$repeater = get_field('editorial', 'options'); |
||||||
|
if ($repeater) { |
||||||
|
foreach ($repeater as &$item) { |
||||||
|
if (!empty($item['post'])) { |
||||||
|
$item['post'] = Timber::get_post($item['post'], 'BlogPost'); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
$context['editorial'] = $repeater; |
||||||
|
return $context; |
||||||
|
}); |
||||||
|
@ -0,0 +1,38 @@ |
|||||||
|
{% 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">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 item in editorial %} |
||||||
|
{% set _post = item.post %} |
||||||
|
<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> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</li> |
||||||
|
{% endfor %} |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
</section> |
||||||
|
{% endif %} |
@ -1,166 +0,0 @@ |
|||||||
.home-swp { |
|
||||||
position: relative; |
|
||||||
} |
|
||||||
|
|
||||||
.home-swp__btn { |
|
||||||
position: absolute; |
|
||||||
bottom: 22px; |
|
||||||
left: 50%; |
|
||||||
transform: translateX(-50%); |
|
||||||
z-index: 2; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
gap: 24px; |
|
||||||
} |
|
||||||
|
|
||||||
.home-swp__btn button { |
|
||||||
border: 1px solid var(--main_black); |
|
||||||
background: var(--main_white); |
|
||||||
width: 56px; |
|
||||||
height: 56px; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: center; |
|
||||||
border-radius: 20px; |
|
||||||
} |
|
||||||
|
|
||||||
.home-swp .swiper-slide:not(.swiper-slide-active) { |
|
||||||
height: 0; |
|
||||||
overflow: hidden; |
|
||||||
} |
|
||||||
|
|
||||||
.home-card { |
|
||||||
border-radius: 60px; |
|
||||||
overflow: hidden; |
|
||||||
display: flex; |
|
||||||
align-items: flex-start; |
|
||||||
gap: 24px; |
|
||||||
position: relative; |
|
||||||
} |
|
||||||
|
|
||||||
.home-card.bg-yellow { |
|
||||||
background: var(--orange_80); |
|
||||||
} |
|
||||||
|
|
||||||
.home-card.bg-green { |
|
||||||
background: var(--green_90); |
|
||||||
} |
|
||||||
|
|
||||||
.home-card.bg-violet { |
|
||||||
background: var(--violet_90); |
|
||||||
} |
|
||||||
|
|
||||||
.home-card__img { |
|
||||||
width: 395px; |
|
||||||
border-radius: 60px; |
|
||||||
overflow: hidden; |
|
||||||
height: 393px; |
|
||||||
flex-shrink: 0; |
|
||||||
} |
|
||||||
|
|
||||||
.home-card__img img { |
|
||||||
width: 100%; |
|
||||||
height: 100%; |
|
||||||
object-fit: cover; |
|
||||||
} |
|
||||||
|
|
||||||
.home-card__content { |
|
||||||
padding: 32px 79px 0 0; |
|
||||||
} |
|
||||||
|
|
||||||
.home-card__content-title { |
|
||||||
font-size: 36px; |
|
||||||
font-weight: bold; |
|
||||||
line-height: 40px; |
|
||||||
text-transform: uppercase; |
|
||||||
max-width: 660px; |
|
||||||
margin-bottom: 10px; |
|
||||||
color: var(--interface_title); |
|
||||||
} |
|
||||||
|
|
||||||
.home-card__content-description { |
|
||||||
color: var(--interface_title); |
|
||||||
margin-bottom: 10px; |
|
||||||
font-size: 20px; |
|
||||||
font-weight: 500; |
|
||||||
line-height: 24px; |
|
||||||
display: -webkit-box; |
|
||||||
-webkit-line-clamp: 3; |
|
||||||
-webkit-box-orient: vertical; |
|
||||||
overflow: hidden; |
|
||||||
text-overflow: ellipsis; |
|
||||||
} |
|
||||||
|
|
||||||
.home-card__content-body { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
flex-wrap: wrap; |
|
||||||
gap: 12px; |
|
||||||
} |
|
||||||
|
|
||||||
.home-card__content-body__alerts { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
flex-wrap: wrap; |
|
||||||
gap: 12px; |
|
||||||
} |
|
||||||
|
|
||||||
.home-card__content-body__alerts li { |
|
||||||
background: var(--interface_hover); |
|
||||||
color: var(--background); |
|
||||||
border-radius: 16px; |
|
||||||
padding: 6px 8px; |
|
||||||
font-size: 16px; |
|
||||||
font-weight: 500; |
|
||||||
line-height: 20px; |
|
||||||
} |
|
||||||
|
|
||||||
.home-card__content-body__day { |
|
||||||
color: var(--interface_hover); |
|
||||||
font-size: 14px; |
|
||||||
font-weight: 500; |
|
||||||
line-height: 16px; |
|
||||||
} |
|
||||||
|
|
||||||
.home-card__content-body__time { |
|
||||||
font-size: 14px; |
|
||||||
font-weight: 500; |
|
||||||
line-height: 16px; |
|
||||||
color: var(--interface_hover); |
|
||||||
} |
|
||||||
|
|
||||||
.home-card__content-body__data { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
gap: 12px; |
|
||||||
} |
|
||||||
|
|
||||||
.home-card__content-body__data>div { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
gap: 4px; |
|
||||||
font-size: 14px; |
|
||||||
font-weight: 500; |
|
||||||
line-height: 16px; |
|
||||||
color: var(--interface_hover); |
|
||||||
} |
|
||||||
|
|
||||||
.home-card__content-body__data>div .main-img { |
|
||||||
width: 32px; |
|
||||||
height: 32px; |
|
||||||
border-radius: 50%; |
|
||||||
object-fit: cover; |
|
||||||
} |
|
||||||
|
|
||||||
.home-card__content-body__link { |
|
||||||
border: 1px solid #000000; |
|
||||||
border-radius: 28px; |
|
||||||
background: var(--main_white); |
|
||||||
position: absolute; |
|
||||||
right: 37px; |
|
||||||
bottom: 26px; |
|
||||||
padding: 8.5px 16px 12.5px; |
|
||||||
font-style: 20px; |
|
||||||
font-weight: 500; |
|
||||||
line-height: 24px; |
|
||||||
} |
|
@ -1,32 +0,0 @@ |
|||||||
/* Стили для планшетов */ |
|
||||||
@media only screen and (max-width: 992px) { |
|
||||||
.header-navs { |
|
||||||
display: none; |
|
||||||
} |
|
||||||
|
|
||||||
.header-container { |
|
||||||
height: 56px; |
|
||||||
padding: 0; |
|
||||||
} |
|
||||||
|
|
||||||
.header-bars { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: center; |
|
||||||
} |
|
||||||
|
|
||||||
.header-logo { |
|
||||||
font-size: 16px; |
|
||||||
line-height: 20px; |
|
||||||
gap: 8px; |
|
||||||
} |
|
||||||
|
|
||||||
.header-logo img { |
|
||||||
width: 31px; |
|
||||||
flex-shrink: 0; |
|
||||||
} |
|
||||||
|
|
||||||
.header-lang { |
|
||||||
display: none; |
|
||||||
} |
|
||||||
} |
|
@ -1,2 +1,14 @@ |
|||||||
<?php |
<?php |
||||||
|
|
||||||
|
add_filter('timber/context', function($context) { |
||||||
|
$repeater = get_field('featured', 'options'); |
||||||
|
if ($repeater) { |
||||||
|
foreach ($repeater as &$item) { |
||||||
|
if (!empty($item['post'])) { |
||||||
|
$item['post'] = Timber::get_post($item['post'], 'BlogPost'); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
$context['featured'] = $repeater; |
||||||
|
return $context; |
||||||
|
}); |
||||||
|
@ -1,2 +1,23 @@ |
|||||||
<?php |
<?php |
||||||
|
|
||||||
|
|
||||||
|
add_filter('timber/context', function($context) { |
||||||
|
$current_category = get_queried_object(); // Получаем текущую категорию |
||||||
|
|
||||||
|
$args = array( |
||||||
|
'post_type' => 'post', |
||||||
|
'posts_per_page' => 3, // Количество постов |
||||||
|
'orderby' => 'meta_value_num', |
||||||
|
'key' => 'post_views', // Поле плагина для подсчёта просмотров |
||||||
|
'order' => 'DESC', // Сортировка по убыванию |
||||||
|
|
||||||
|
// Условие для фильтрации по текущей категории |
||||||
|
'category__in' => $current_category ? array($current_category->term_id) : '', |
||||||
|
); |
||||||
|
|
||||||
|
$most_read_query = new WP_Query($args); |
||||||
|
$most_read = new Timber\PostQuery($most_read_query); |
||||||
|
|
||||||
|
$context['most_read'] = $most_read; |
||||||
|
return $context; |
||||||
|
}); |
||||||
|
@ -0,0 +1,28 @@ |
|||||||
|
<div class="anons-best"> |
||||||
|
<h2 class="anons-best__title">САМЫЕ ЧИТАЕМЫЕ:</h2> |
||||||
|
<ul class="anons-best__card-wrap"> |
||||||
|
{% for post in most_read %} |
||||||
|
<li class="anons-best__card"> |
||||||
|
<ul class="anons-best__card-alerts"> |
||||||
|
{% for category in post.categories %} |
||||||
|
<li> |
||||||
|
<a href="{{ category.link }}">{{ category.name }}</a> |
||||||
|
</li> |
||||||
|
{% endfor %} |
||||||
|
</ul> |
||||||
|
<a href="{{post.link}}" class="main-img"> |
||||||
|
<img src="{{post.thumbnail.src}}" alt="{{post.thumbnail.alt}}"> |
||||||
|
</a> |
||||||
|
<div class="anons-best__card-body"> |
||||||
|
<a href="{{post.link}}" class="anons-best__card-body__title">{{post.title}}</a> |
||||||
|
<div class="anons-best__card-body__datas"> |
||||||
|
<p>{{post.date}}</p> |
||||||
|
<p>время чтения: {{post.reading_time}}</p> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</li> |
||||||
|
{% endfor %} |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
|
||||||
|
|
@ -0,0 +1,21 @@ |
|||||||
|
jQuery(document).ready(function ($) { |
||||||
|
$('#ajax-load-blog').on('submit', function (e) { |
||||||
|
e.preventDefault() |
||||||
|
var data = $(this).serialize() |
||||||
|
$.ajax({ |
||||||
|
url: '/wp-admin/admin-ajax.php', // Use the AJAX URL from wp_localize_script
|
||||||
|
type: 'POST', |
||||||
|
data: data, |
||||||
|
success: function (response) { |
||||||
|
$(".anons-article__card-wrap").append(response) |
||||||
|
$('#page_num').val(Number($('#page_num').val()) + 1) |
||||||
|
if (Number($('#page_num').val()) >= Number($('#ajax-load-blog').data('total'))){ |
||||||
|
$('#ajax-load-blog').hide() |
||||||
|
} |
||||||
|
}, |
||||||
|
error: function (error) { |
||||||
|
|
||||||
|
} |
||||||
|
}); |
||||||
|
}); |
||||||
|
}); |
@ -0,0 +1,38 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
include_module('blog'); |
||||||
|
|
||||||
|
function get_posts_by_page_and_category($paged = 1, $category = '') { |
||||||
|
$args = [ |
||||||
|
'post_type' => 'post', |
||||||
|
'posts_per_page' => 9, // Adjust the number of posts per page |
||||||
|
'paged' => intval($paged) + 1, |
||||||
|
]; |
||||||
|
|
||||||
|
if (!empty($category)) { |
||||||
|
$args['tax_query'] = [ |
||||||
|
[ |
||||||
|
'taxonomy' => 'category', |
||||||
|
'field' => 'slug', // or 'term_id', 'name' depending on how you identify categories |
||||||
|
'terms' => $category, |
||||||
|
], |
||||||
|
]; |
||||||
|
} |
||||||
|
$q = new WP_Query($args); |
||||||
|
return new Timber\PostQuery($q); |
||||||
|
} |
||||||
|
|
||||||
|
function ajax_load_blog_posts() { |
||||||
|
$page_num = isset($_POST['page_num']) ? sanitize_text_field($_POST['page_num']) : ''; |
||||||
|
$context = Timber::context(); |
||||||
|
$context['posts'] = get_posts_by_page_and_category($page_num); |
||||||
|
$html = Timber::compile('/blog/components/news-list/component-template.twig', $context); |
||||||
|
echo $html; |
||||||
|
wp_die(); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
add_action('wp_ajax_load_blog_posts', 'ajax_load_blog_posts'); |
||||||
|
add_action('wp_ajax_nopriv_load_blog_posts', 'ajax_load_blog_posts'); |
||||||
|
|
||||||
|
|
@ -0,0 +1,22 @@ |
|||||||
|
{% for post in posts %} |
||||||
|
|
||||||
|
<li class="anons-best__card light"> |
||||||
|
<ul class="anons-best__card-alerts"> |
||||||
|
{% for category in post.categories %} |
||||||
|
<li> |
||||||
|
<a href="{{ category.link }}">{{ category.name }}</a> |
||||||
|
</li> |
||||||
|
{% endfor %} |
||||||
|
</ul> |
||||||
|
<a href="{{post.link}}" class="main-img"> |
||||||
|
<img src="{{post.thumbnail.src}}" alt="{{post.thumbnail.alt}}"> |
||||||
|
</a> |
||||||
|
<div class="anons-best__card-body"> |
||||||
|
<a href="{{post.link}}" class="anons-best__card-body__title">{{post.title}}</a> |
||||||
|
<div class="anons-best__card-body__datas"> |
||||||
|
<p>{{post.date}}</p> |
||||||
|
<p>время чтения: {{post.reading_time}}</p> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</li> |
||||||
|
{% endfor %} |
@ -0,0 +1,6 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
|
||||||
|
$context = Timber::get_context(); |
||||||
|
|
||||||
|
Timber::render('blog/components/single/component-template.twig', $context); |
@ -0,0 +1,49 @@ |
|||||||
|
{% extends 'layout/module.template.twig' %} |
||||||
|
|
||||||
|
|
||||||
|
{% block content %} |
||||||
|
|
||||||
|
<!-- Breadcrumb --> |
||||||
|
<section class="breadcrumb"> |
||||||
|
<div class="container"> |
||||||
|
<a href="{{ site.url }}">Главная</a> / |
||||||
|
<a href="{{ site.url }}">Блог</a> / |
||||||
|
<a href="{{ post.link }}">{{ post.name }}</a> |
||||||
|
</div> |
||||||
|
</section> |
||||||
|
<!-- Breadcrumb end --> |
||||||
|
|
||||||
|
<!-- Article home --> |
||||||
|
<section class="article-home"> |
||||||
|
<div class="container"> |
||||||
|
<h1>{{post.name}}</h1> |
||||||
|
<div class="article-home__data"> |
||||||
|
<ul class="article-home__data-alerts"> |
||||||
|
{% for category in post.categories %} |
||||||
|
<li> |
||||||
|
<a href="{{ category.link }}">{{ category.name }}</a> |
||||||
|
</li> |
||||||
|
{% endfor %} |
||||||
|
</ul> |
||||||
|
<p>{{post.date}}</p> |
||||||
|
<p>время чтения: {{post.reading_time}}</p> |
||||||
|
|
||||||
|
</div> |
||||||
|
<div class="article-home__card"> |
||||||
|
<img src="{{post.thumbnail.src}}" alt="{{post.thumbnail.alt}}"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</section> |
||||||
|
|
||||||
|
<!-- Article home end --> |
||||||
|
|
||||||
|
<!-- Article content --> |
||||||
|
<div class="article-content"> |
||||||
|
<div class="article-container"> |
||||||
|
{{post.content}} |
||||||
|
</div> |
||||||
|
<!-- Article content end --> |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{% endblock %} |
@ -1,2 +1,21 @@ |
|||||||
<?php |
<?php |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
add_filter('timber/context', function($context) { |
||||||
|
|
||||||
|
$categories = get_categories(); |
||||||
|
$current_category = get_queried_object(); |
||||||
|
|
||||||
|
if (isset($current_category) && !is_wp_error($current_category) && !empty($current_category->name)) { |
||||||
|
$category_name = $current_category->name; |
||||||
|
} else { |
||||||
|
$category_name = null; |
||||||
|
} |
||||||
|
|
||||||
|
$context['category_list'] = $categories; |
||||||
|
$context['current_category'] = $category_name; |
||||||
|
return $context; |
||||||
|
}); |
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,15 @@ |
|||||||
|
|
||||||
|
|
||||||
|
<div class="anons-theme"> |
||||||
|
<h3 class="anons-theme__title">Темы:</h3> |
||||||
|
<ul> |
||||||
|
<li> |
||||||
|
<a href="" class="{% if not current_category %} active {% endif %}">ВСЕ</a> |
||||||
|
</li> |
||||||
|
{% for category in category_list %} |
||||||
|
<li> |
||||||
|
<a href="{{ category.link }}" class="{% if current_category == category.name %} active {% endif %}">{{ category.name }}</a> |
||||||
|
</li> |
||||||
|
{% endfor %} |
||||||
|
</ul> |
||||||
|
</div> |
@ -0,0 +1,139 @@ |
|||||||
|
.texts { |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
gap: 48px; |
||||||
|
} |
||||||
|
|
||||||
|
.texts h2 { |
||||||
|
font-size: 36px; |
||||||
|
line-height: 40px; |
||||||
|
font-weight: bold; |
||||||
|
color: var(--grey-black); |
||||||
|
text-transform: uppercase; |
||||||
|
} |
||||||
|
|
||||||
|
.texts h3 { |
||||||
|
font-size: 24px; |
||||||
|
line-height: 28px; |
||||||
|
font-weight: bold; |
||||||
|
color: var(--grey-black); |
||||||
|
text-transform: uppercase; |
||||||
|
} |
||||||
|
|
||||||
|
.texts-description { |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
gap: 48px; |
||||||
|
} |
||||||
|
|
||||||
|
.texts-description p { |
||||||
|
color: var(--grey-black); |
||||||
|
font-size: 24px; |
||||||
|
line-height: 32px; |
||||||
|
font-weight: 500; |
||||||
|
} |
||||||
|
|
||||||
|
.texts-description a { |
||||||
|
display: inline; |
||||||
|
text-decoration: underline; |
||||||
|
} |
||||||
|
|
||||||
|
.texts ol { |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
gap: 12px; |
||||||
|
font-size: 24px; |
||||||
|
line-height: 32px; |
||||||
|
font-weight: 500; |
||||||
|
color: #191919; |
||||||
|
} |
||||||
|
|
||||||
|
.texts ol li { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
gap: 12px; |
||||||
|
} |
||||||
|
|
||||||
|
.texts ol h4 { |
||||||
|
background: var(--accent-1); |
||||||
|
border-radius: 5.2px; |
||||||
|
width: 32px; |
||||||
|
height: 32px; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: center; |
||||||
|
font-size: 24px; |
||||||
|
line-height: 32px; |
||||||
|
font-weight: 500; |
||||||
|
color: white; |
||||||
|
} |
||||||
|
|
||||||
|
.texts ul { |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
gap: 12px; |
||||||
|
} |
||||||
|
|
||||||
|
.texts ul li { |
||||||
|
padding-left: 22px; |
||||||
|
font-size: 24px; |
||||||
|
font-weight: 500; |
||||||
|
line-height: 32px; |
||||||
|
color: #191919; |
||||||
|
position: relative; |
||||||
|
} |
||||||
|
|
||||||
|
.texts ul li::before { |
||||||
|
content: ""; |
||||||
|
width: 10px; |
||||||
|
height: 10px; |
||||||
|
position: absolute; |
||||||
|
top: 50%; |
||||||
|
left: 0; |
||||||
|
transform: translateY(-50%); |
||||||
|
background: var(--accent-1); |
||||||
|
border-radius: 3px; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@media only screen and (max-width: 992px) { |
||||||
|
|
||||||
|
.texts h2 { |
||||||
|
font-size: 28px; |
||||||
|
line-height: 32px; |
||||||
|
} |
||||||
|
|
||||||
|
.texts h3 { |
||||||
|
font-size: 20px; |
||||||
|
line-height: 24px; |
||||||
|
} |
||||||
|
|
||||||
|
.texts-description p { |
||||||
|
font-size: 18px; |
||||||
|
line-height: 24px; |
||||||
|
} |
||||||
|
|
||||||
|
.texts ol { |
||||||
|
gap: 12px; |
||||||
|
} |
||||||
|
|
||||||
|
.texts ol li { |
||||||
|
font-size: 18px; |
||||||
|
line-height: 24px; |
||||||
|
} |
||||||
|
|
||||||
|
.texts ol li h4 { |
||||||
|
font-size: 18px; |
||||||
|
line-height: 24px; |
||||||
|
} |
||||||
|
|
||||||
|
.texts ul { |
||||||
|
gap: 12px; |
||||||
|
} |
||||||
|
|
||||||
|
.texts ul li { |
||||||
|
font-size: 18px; |
||||||
|
line-height: 24px; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,37 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
function texts_render_callback($block, $content = '', $is_preview = false, $post_id = 0) { |
||||||
|
$context = Timber::context(); |
||||||
|
$context['block'] = $block; |
||||||
|
$context['is_preview'] = $is_preview; |
||||||
|
$context['content'] = get_field('content'); |
||||||
|
Timber::render('modules/blog/editor-blocks/texts/editor-block-template.twig', $context); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
add_action('acf/init', function(){ |
||||||
|
if( function_exists('acf_register_block') ) { |
||||||
|
// register a testimonial block |
||||||
|
|
||||||
|
acf_register_block(array( |
||||||
|
'name' => 'gp_texts', |
||||||
|
'title' => __('GP - Texts'), |
||||||
|
'description' => __('A block to serve a text content'), |
||||||
|
'render_callback' => 'texts_render_callback', |
||||||
|
'category' => 'formatting', |
||||||
|
'icon' => 'admin-comments', |
||||||
|
'keywords' => array( 'texts', 'simple block', 'gp-block',), |
||||||
|
'mode' => 'preview', |
||||||
|
'enqueue_assets' => function(){ |
||||||
|
wp_enqueue_style('gp_util_style', get_template_directory_uri() . '/modules/layout/assets/css/gp-style-core.css', array(), '1.0', 'all'); |
||||||
|
wp_enqueue_style('gp_normalize', get_template_directory_uri() . '/modules/layout/assets/css/gp-style-normalize.css', array(), '1.0', 'all'); |
||||||
|
wp_enqueue_style('gp_texts_style', get_template_directory_uri() . '/modules/blog/editor-blocks/texts/assets/css/style.css', array(), '1.0', 'all'); |
||||||
|
} |
||||||
|
)); |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?> |
@ -0,0 +1,4 @@ |
|||||||
|
<section class="texts"> |
||||||
|
{{ content }} |
||||||
|
</section> |
||||||
|
|
@ -0,0 +1,33 @@ |
|||||||
|
<?php
|
||||||
|
|
||||||
|
class BlogPost extends \Timber\Post |
||||||
|
{ |
||||||
|
/** |
||||||
|
* Estimates time required to read a post. |
||||||
|
* |
||||||
|
* The words per minute are based on the English language, which e.g. is much |
||||||
|
* faster than German or French. |
||||||
|
* |
||||||
|
* @link https://www.irisreading.com/average-reading-speed-in-various-languages/ |
||||||
|
* |
||||||
|
* @return string |
||||||
|
*/ |
||||||
|
public function reading_time() |
||||||
|
{ |
||||||
|
$symb_per_minute = 2280; |
||||||
|
|
||||||
|
$symb = strlen(wp_strip_all_tags($this->content())); |
||||||
|
$minutes = round($symb / $symb_per_minute); |
||||||
|
|
||||||
|
/* translators: %s: Time duration in minute or minutes. */ |
||||||
|
return sprintf(_n('%s мин.', '%s мин.', $minutes), (int) $minutes); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
add_filter('timber/post/classmap', function ($classmap) { |
||||||
|
$custom_classmap = [ |
||||||
|
'post' => BlogPost::class, |
||||||
|
]; |
||||||
|
|
||||||
|
return array_merge($classmap, $custom_classmap); |
||||||
|
}); |
@ -0,0 +1,87 @@ |
|||||||
|
/* Header */ |
||||||
|
.header { |
||||||
|
background: var(--main_white); |
||||||
|
border-bottom: 1px solid var(--interface_title); |
||||||
|
position: fixed; |
||||||
|
top: 0; |
||||||
|
left: 0; |
||||||
|
width: 100%; |
||||||
|
z-index: 4; |
||||||
|
} |
||||||
|
|
||||||
|
.header-container { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: space-between; |
||||||
|
padding: 16px 0; |
||||||
|
} |
||||||
|
|
||||||
|
.header-bars { |
||||||
|
display: none; |
||||||
|
} |
||||||
|
|
||||||
|
.header-logo { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
gap: 8px; |
||||||
|
} |
||||||
|
|
||||||
|
.header-logo span { |
||||||
|
color: var(---main_black); |
||||||
|
font-size: 20px; |
||||||
|
text-transform: uppercase; |
||||||
|
} |
||||||
|
|
||||||
|
.header-navs { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
gap: 24px; |
||||||
|
} |
||||||
|
|
||||||
|
.header-navs__link { |
||||||
|
padding: 8px 12px; |
||||||
|
font-size: 16px; |
||||||
|
font-weight: bold; |
||||||
|
text-transform: uppercase; |
||||||
|
line-height: 20px; |
||||||
|
} |
||||||
|
|
||||||
|
.header-accordion {} |
||||||
|
|
||||||
|
.header-accordion__btn { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
gap: 4px; |
||||||
|
padding: 8px 12px; |
||||||
|
border-radius: 24px; |
||||||
|
background: var(--accent-2); |
||||||
|
cursor: pointer; |
||||||
|
user-select: none; |
||||||
|
font-size: 16px; |
||||||
|
font-weight: bold; |
||||||
|
line-height: 20px; |
||||||
|
color: var(---main_black); |
||||||
|
} |
||||||
|
|
||||||
|
.header-right { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
gap: 8px; |
||||||
|
} |
||||||
|
|
||||||
|
.header-lang__btn { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
cursor: pointer; |
||||||
|
user-select: none; |
||||||
|
gap: 4px; |
||||||
|
padding: 12px 15px; |
||||||
|
color: var(---main_black); |
||||||
|
font-size: 16px; |
||||||
|
font-weight: bold; |
||||||
|
line-height: 20px; |
||||||
|
} |
||||||
|
|
||||||
|
/* Header end */ |
||||||
|
|
||||||
|
|
@ -0,0 +1,32 @@ |
|||||||
|
/* Стили для планшетов */ |
||||||
|
@media only screen and (max-width: 992px) { |
||||||
|
.header-navs { |
||||||
|
display: none; |
||||||
|
} |
||||||
|
|
||||||
|
.header-container { |
||||||
|
height: 56px; |
||||||
|
padding: 0; |
||||||
|
} |
||||||
|
|
||||||
|
.header-bars { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: center; |
||||||
|
} |
||||||
|
|
||||||
|
.header-logo { |
||||||
|
font-size: 16px; |
||||||
|
line-height: 20px; |
||||||
|
gap: 8px; |
||||||
|
} |
||||||
|
|
||||||
|
.header-logo img { |
||||||
|
width: 31px; |
||||||
|
flex-shrink: 0; |
||||||
|
} |
||||||
|
|
||||||
|
.header-lang { |
||||||
|
display: none; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,4 @@ |
|||||||
|
/* Стили для ультрашироких экранов */ |
||||||
|
@media only screen and (min-width: 1400px) { |
||||||
|
|
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
@media (max-width: 1200px) { |
||||||
|
.header-navs { |
||||||
|
gap: 12px; |
||||||
|
} |
||||||
|
.header-navs__link { |
||||||
|
font-size: 14px; |
||||||
|
} |
||||||
|
.header-right { |
||||||
|
gap: 4px; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,4 @@ |
|||||||
|
<!-- Подключаем хуки ajax_wp стандартным способом |
||||||
|
данный файл подключается только при ajax запросах на сервер |
||||||
|
поэтому не нужно использовать его для хранени |
||||||
|
функций используемых вне ajax логики --> |
@ -0,0 +1,12 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
add_filter('timber/context', function($context) { |
||||||
|
#Подготавливаем данные для рендеринга |
||||||
|
#$context['field_name'] = get_field('field_name') |
||||||
|
return $context; |
||||||
|
}); |
||||||
|
|
||||||
|
$context = Timber::get_context(); |
||||||
|
|
||||||
|
# Если необходимо рендерим шаблон компонента |
||||||
|
#Timber::render('example/components/example/component-template.twig', $context); |
@ -1,4 +1,4 @@ |
|||||||
<?php |
<?php |
||||||
|
|
||||||
include_module('header'); |
include_module('header'); |
||||||
include_module('footer'); |
include_module('footer'); |
||||||
|
@ -0,0 +1,6 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
include_module('blog'); |
||||||
|
include_component('blog', 'single'); |
||||||
|
|
||||||
|
?> |