fix layout bugs

pull/1/head
parent ddf4d4dfd2
commit ff0243a894
  1. 3
      .gitignore
  2. 1
      wp-content/themes/cosmopet/functions.php
  3. 3
      wp-content/themes/cosmopet/modules/blog/components/archive/component-controller.php
  4. 111
      wp-content/themes/cosmopet/modules/blog/components/author-banner/assets/css/style.css
  5. 5
      wp-content/themes/cosmopet/modules/blog/components/single/assets/css/gp-style-tablet.css
  6. 2
      wp-content/themes/cosmopet/modules/blog/components/single/component-controller.php
  7. 13
      wp-content/themes/cosmopet/modules/blog/editor-blocks/image/assets/css/style.css
  8. 20
      wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v1/assets/css/style.css
  9. 19
      wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v2/assets/css/style.css
  10. 5
      wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/assets/css/style.css
  11. 0
      wp-content/themes/cosmopet/modules/blog/module.template.twig
  12. 0
      wp-content/themes/cosmopet/modules/example/module.template.twig
  13. 0
      wp-content/themes/cosmopet/modules/forms/module.template.twig
  14. 4
      wp-content/themes/cosmopet/modules/header/assets/css/gp-style-desktop.css
  15. 17
      wp-content/themes/cosmopet/modules/layout/assets/css/gp-style-core.css
  16. 60
      wp-content/themes/cosmopet/modules/popup/module.template.twig
  17. 0
      wp-content/themes/cosmopet/templates/blog/author-banner.twig
  18. 14
      wp-content/themes/cosmopet/templates/blog/blog-archive.twig
  19. 4
      wp-content/themes/cosmopet/templates/blog/blog-single.twig
  20. 0
      wp-content/themes/cosmopet/templates/blog/editorial.twig
  21. 0
      wp-content/themes/cosmopet/templates/blog/featured-slider.twig
  22. 0
      wp-content/themes/cosmopet/templates/blog/most-read.twig
  23. 0
      wp-content/themes/cosmopet/templates/blog/news-list.twig
  24. 0
      wp-content/themes/cosmopet/templates/blog/themes.twig
  25. 0
      wp-content/themes/cosmopet/templates/footer.twig
  26. 0
      wp-content/themes/cosmopet/templates/header_ENG.twig
  27. 0
      wp-content/themes/cosmopet/templates/header_RU.twig
  28. 6
      wp-content/themes/cosmopet/templates/layout.twig

3
.gitignore vendored

@ -35,6 +35,7 @@ wp-config.php
# htaccess # htaccess
/.htaccess /.htaccess
/*/.htaccess
# vendor files in themes # vendor files in themes
/wp-content/themes/*/vendor /wp-content/themes/*/vendor
# All plugins # All plugins
@ -43,6 +44,8 @@ wp-config.php
/wp-content/plugins /wp-content/plugins
/wp-content/backups-dup-lite /wp-content/backups-dup-lite
/wp-content/ai1wm-backups
/wp-content/uploads-webpc
# All themes # All themes
# #

@ -11,6 +11,7 @@ Timber\Timber::init();
Timber::$dirname = [ Timber::$dirname = [
[ [
'modules', 'modules',
'templates'
], ],
]; ];

@ -5,6 +5,7 @@ include_component('blog', 'themes');
include_component('blog', 'most-read'); include_component('blog', 'most-read');
include_component('blog', 'news-list'); include_component('blog', 'news-list');
include_component('blog', 'editorial'); include_component('blog', 'editorial');
include_component('blog', 'author-banner');
wp_localize_script('blog-archive-posts-ajax-js', 'ajax', array( wp_localize_script('blog-archive-posts-ajax-js', 'ajax', array(
'ajax_url' => admin_url('admin-ajax.php'), 'ajax_url' => admin_url('admin-ajax.php'),
@ -16,4 +17,4 @@ $context['blog_desc'] = get_field('blog_desc', 'options');
$context['post_count'] = wp_count_posts()->publish; // Количество опубликованных постов $context['post_count'] = wp_count_posts()->publish; // Количество опубликованных постов
$context['total_pages'] = ceil($context['post_count'] / get_option('posts_per_page')); // Общее количество страниц $context['total_pages'] = ceil($context['post_count'] / get_option('posts_per_page')); // Общее количество страниц
Timber::render('blog/components/archive/component-template.twig', $context); Timber::render('blog/blog-archive.twig', $context);

@ -0,0 +1,111 @@
/* Author */
.author {
padding: 111px 0 105px;
overflow: hidden;
}
.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;
}
@media only screen and (max-width: 992px) {
.author {
padding: 188px 0 36px;
}
.author-content {
padding: 109px 42px 35px;
flex-direction: column;
align-items: flex-start;
}
.author-content__start-1,
.author-content__start-2 {
display: none;
}
.author-content__img {
display: none;
left: 50%;
transform: translateX(-50%);
top: -180px;
width: 235px;
}
.author-content__img.mb {
display: block;
}
.author-content__title {
width: 100%;
font-size: 26px;
line-height: 32px;
margin-bottom: 16px;
}
.author-content__title br {
display: none;
}
.author-content__link {
width: 100%;
text-align: center;
padding: 11px;
}
}

@ -46,7 +46,7 @@
flex-direction: column-reverse; flex-direction: column-reverse;
} }
.discount-description__2 { p.discount-description__2 {
font-size: 18px; font-size: 18px;
line-height: 24px; line-height: 24px;
font-weight: 500; font-weight: 500;
@ -54,8 +54,9 @@
margin-bottom: 21px; margin-bottom: 21px;
} }
.discount-description__1 { p.discount-description__1 {
margin-bottom: 0; margin-bottom: 0;
font-size: 12px; font-size: 12px;
line-height: 120%;
} }
} }

@ -3,4 +3,4 @@
include_component('blog', 'featured-slider'); include_component('blog', 'featured-slider');
$context = Timber::get_context(); $context = Timber::get_context();
Timber::render('blog/components/single/component-template.twig', $context); Timber::render('blog/blog-single.twig', $context);

@ -13,4 +13,15 @@
max-width: 740px; max-width: 740px;
max-height: 512px; max-height: 512px;
} }
/* Product card end */ /* Product card end */
@media (max-width: 992px) {
.product-card {
padding: 11px;
gap: 40px;
}
.product-card img {
max-width: 242px;
max-height: 167px;
}
}

@ -21,4 +21,24 @@
.list_v1 li img { .list_v1 li img {
flex-shrink: 0; flex-shrink: 0;
max-width: 54px; max-width: 54px;
}
@media (max-width: 992px) {
.list_v1{
gap: 24px;
}
.list_v1 li {
gap: 16px;
}
.list_v1 li img {
width: 37px;
}
.list_v1 li h3 {
font-size: 20px;
line-height: 24px;
gap: 16px;
}
} }

@ -32,3 +32,22 @@
color: var(--main_black); color: var(--main_black);
} }
/* block_lists */ /* block_lists */
@media (max-width: 992px) {
.block-list_block img {
flex-shrink: 0;
width: 66px;
height: 45px;
}
.block-list_block h3 {
font-size: 20px;
line-height: 24px;
}
.block-list_block p {
font-size: 18px;
line-height: 24px;
}
}

@ -133,5 +133,8 @@
font-size: 18px; font-size: 18px;
line-height: 24px; line-height: 24px;
} }
.texts p {
font-size: 18px;
line-height: 24px;
}
} }

@ -321,7 +321,7 @@ display: none;
.header__menu-block{ .header__menu-block{
position: absolute; position: absolute;
top: 72px; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
@ -720,7 +720,7 @@ padding-top: 72px;
display: block; display: block;
} }
.header__menu-block{ .header__menu-block{
top: 56px; top: 0;
} }
.header__content::after{ .header__content::after{
left: 0; left: 0;

@ -136,4 +136,21 @@ body {
textarea{ textarea{
font-family: inherit; font-family: inherit;
}
@media (max-width: 992px) {
.indent {
padding: 36px 24px;
gap: 24px;
}
.indent-title {
font-size: 26px;
line-height: 32px;
}
.indent p {
font-size: 18px;
line-height: 24px;
}
} }

@ -1,60 +0,0 @@
{% set current_path = template_path ~ '/modules/footer' %}
<footer class="footer">
<div class="container">
<div class="footer-top">
<div class="footer-content__wrap">
<div class="footer-content">
<a href="/" class="logo">
<img src="{{ current_path }}/assets/img/logo-green.svg" alt="">
<span>сosmopet</span>
</a>
<p class="footer-content__address">
{{adres}}
</p>
<ul>
{% for item in email_list %}
<li>
<p>{{item.name}}</p>
<a href="mailto:{{item.email}}">{{item.email}}</a>
</li>
{% endfor %}
</ul>
</div>
<div class="footer-top__link">
<a href="#" class="link-black">{{ function('pll_e', 'Чат бот с ветеринаром') }}</a>
<a href="#" class="link-white">{{ function('pll_e', 'Калькулятор рациона') }}</a>
</div>
</div>
<form class="footer-contact">
<h3 class="footer-contact__title">{{ function('pll_e', 'Форма обратной связи') }}</h3>
<input type="text" placeholder="{{ function('pll_e', 'Ваше имя') }}" class="form-inp">
<input type="email" placeholder="{{ function('pll_e', 'Эл.почта') }}" class="form-inp">
<textarea class="form-textarea" name="" placeholder="{{ function('pll_e', 'Текст обращения') }}" id=""></textarea>
<button class="footer-contact__submit" type="submit">{{ function('pll_e', 'Отправить') }}</button>
</form>
</div>
<div class="footer-bottom">
<ul class="footer-network">
<li>
<a href="#">
<img src="{{ current_path }}/assets/img/footer-network-1.svg" alt="">
</a>
</li>
<li>
<a href="#">
<img src="{{ current_path }}/assets/img/footer-network-2.svg" alt="">
</a>
</li>
<li>
<a href="#">
<img src="{{ current_path }}/assets/img/footer-network-3.svg" alt="">
</a>
</li>
</ul>
<a href="#">Соглашение о конфиденциальности</a>
<a href="#">Декларация соответствия корма</a>
<a href="#">Декларация соответствия лакомств</a>
</div>
</div>
</footer>
<!-- Footer end -->

@ -1,4 +1,4 @@
{% extends 'layout/module.template.twig' %} {% extends 'layout.twig' %}
{% block content %} {% block content %}
@ -8,7 +8,7 @@
<div class="container"> <div class="container">
<h1 class="home-title">{{blog_title}}</h1> <h1 class="home-title">{{blog_title}}</h1>
<p class="home-description">{{blog_desc}}</p> <p class="home-description">{{blog_desc}}</p>
{% include '/blog/components/featured-slider/component-template.twig' %} {% include '/blog/featured-slider.twig' %}
</div> </div>
</section> </section>
<!-- Home end --> <!-- Home end -->
@ -16,14 +16,14 @@
<!-- Anons --> <!-- Anons -->
<section class="anons"> <section class="anons">
<div class="container"> <div class="container">
{% include '/blog/components/themes/component-template.twig' %} {% include '/blog/themes.twig' %}
{% include '/blog/components/most-read/component-template.twig' %} {% include '/blog/most-read.twig' %}
<div class="anons-article"> <div class="anons-article">
<h2 class="anons-article__title">{{ function('pll_e', 'ВСЕ СТАТЬИ') }}</h2> <h2 class="anons-article__title">{{ function('pll_e', 'ВСЕ СТАТЬИ') }}</h2>
<ul class="anons-article__card-wrap"> <ul class="anons-article__card-wrap">
{% include '/blog/components/news-list/component-template.twig' %} {% include '/blog/news-list.twig' %}
</ul> </ul>
</div> </div>
{% if total_pages > 1 %} {% if total_pages > 1 %}
@ -39,11 +39,11 @@
<!-- Anons end --> <!-- Anons end -->
<!-- Author --> <!-- Author -->
{% include '/blog/components/author-banner/component-template.twig' %} {% include '/blog/author-banner.twig' %}
<!-- Author end --> <!-- Author end -->
<!-- Editorial --> <!-- Editorial -->
{% include '/blog/components/editorial/component-template.twig' %} {% include '/blog/editorial.twig' %}
<!-- Editorial end --> <!-- Editorial end -->
{% endblock %} {% endblock %}

@ -1,4 +1,4 @@
{% extends 'layout/module.template.twig' %} {% extends 'layout.twig' %}
{% block content %} {% block content %}
@ -46,7 +46,7 @@
<!-- Article content end --> <!-- Article content end -->
<section class="home other-home"> <section class="home other-home">
<div class="container"> <div class="container">
{% include '/blog/components/featured-slider/component-template.twig' %} {% include '/blog/featured-slider.twig' %}
</div> </div>
</section> </section>

@ -21,10 +21,10 @@
{% if current_lang == 'en' %} {% if current_lang == 'en' %}
{% include 'header/module.template_ENG.twig' %} {% include 'header_ENG.twig' %}
{% elseif current_lang == 'fr' %} {% elseif current_lang == 'fr' %}
{% else %} {% else %}
{% include 'header/module.template_RU.twig' %} {% include 'header_RU.twig' %}
{% endif %} {% endif %}
@ -33,7 +33,7 @@
{% endblock %} {% endblock %}
</main> </main>
{% include 'footer/module.template.twig' %} {% include 'footer.twig' %}
</div> </div>
{{ function('wp_footer') }} {{ function('wp_footer') }}
</body> </body>
Loading…
Cancel
Save