From 04f420083fbb14df320bba87043f66d3f057aa09 Mon Sep 17 00:00:00 2001 From: Andrei-10 Date: Thu, 10 Apr 2025 08:00:33 +0000 Subject: [PATCH] dev_10_task4067 (#5) Fix | small fixes in blog templates --- wp-content/themes/cosmopet/404.php | 9 +++ .../archive/component-controller.php | 2 +- .../block_img/assets/css/style.css | 12 +++- .../editor-blocks/table/assets/css/style.css | 4 +- .../editor-blocks/texts/assets/css/style.css | 12 +++- wp-content/themes/cosmopet/templates/404.twig | 59 +++++++++++++++++++ 6 files changed, 93 insertions(+), 5 deletions(-) create mode 100644 wp-content/themes/cosmopet/404.php create mode 100644 wp-content/themes/cosmopet/templates/404.twig diff --git a/wp-content/themes/cosmopet/404.php b/wp-content/themes/cosmopet/404.php new file mode 100644 index 0000000..1a6ea06 --- /dev/null +++ b/wp-content/themes/cosmopet/404.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/wp-content/themes/cosmopet/modules/blog/components/archive/component-controller.php b/wp-content/themes/cosmopet/modules/blog/components/archive/component-controller.php index 0a4b8a1..34d5fc6 100644 --- a/wp-content/themes/cosmopet/modules/blog/components/archive/component-controller.php +++ b/wp-content/themes/cosmopet/modules/blog/components/archive/component-controller.php @@ -11,7 +11,7 @@ wp_localize_script('blog-archive-posts-ajax-js', 'ajax', array( 'ajax_url' => admin_url('admin-ajax.php'), )); -$context = Timber::get_context(); +$context = Timber::context(); $context['blog_title'] = get_field('blog_title', 'options'); $context['blog_desc'] = get_field('blog_desc', 'options'); $context['post_count'] = wp_count_posts()->publish; // Количество опубликованных постов diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/block_img/assets/css/style.css b/wp-content/themes/cosmopet/modules/blog/editor-blocks/block_img/assets/css/style.css index 2cfc48c..01e05de 100644 --- a/wp-content/themes/cosmopet/modules/blog/editor-blocks/block_img/assets/css/style.css +++ b/wp-content/themes/cosmopet/modules/blog/editor-blocks/block_img/assets/css/style.css @@ -1,4 +1,3 @@ - /* Article block */ .article-block__head { display: grid; @@ -174,3 +173,14 @@ line-height: 20px; } } + +.article-block__item-content ul { + width: 100%; + background: var(--bg-light-grey); + border-radius: 24px; + display: flex; + flex-direction: column; + align-items: flex-start; + padding: 20px; + gap: 24px; +} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/table/assets/css/style.css b/wp-content/themes/cosmopet/modules/blog/editor-blocks/table/assets/css/style.css index 5ef95e0..31496f6 100644 --- a/wp-content/themes/cosmopet/modules/blog/editor-blocks/table/assets/css/style.css +++ b/wp-content/themes/cosmopet/modules/blog/editor-blocks/table/assets/css/style.css @@ -14,12 +14,12 @@ display: flex; align-items: flex-start; justify-content: space-between; - gap: 18px; + gap: 0px; } .article-table__item { display: flex; - width: calc(100% / 3 - 36px / 3); + width: 50%; align-items: stretch; border: 1px solid #E1E1E1; text-align: center; diff --git a/wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/assets/css/style.css b/wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/assets/css/style.css index b6cc6df..acb0be6 100644 --- a/wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/assets/css/style.css +++ b/wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/assets/css/style.css @@ -143,4 +143,14 @@ font-size: 18px; line-height: 24px; } -} \ No newline at end of file +} + +.article-content p { + color: var(--grey-black); + font-size: 24px; + /* line-height: 32px; */ + font-weight: 500; + font-size: 18px; + line-height: 24px; +} + diff --git a/wp-content/themes/cosmopet/templates/404.twig b/wp-content/themes/cosmopet/templates/404.twig new file mode 100644 index 0000000..c8773d1 --- /dev/null +++ b/wp-content/themes/cosmopet/templates/404.twig @@ -0,0 +1,59 @@ +{% extends 'layout.twig' %} + +{% block content %} + + + + +
+ {% if current_lang == 'ru' %} +

404

+

Данной страницы не существует

+ На главную + {% elseif current_lang == 'en' %} +

404

+

This page does not exist

+ Main page + {% endif %} +
+ +{% endblock %} \ No newline at end of file