Fix | small fixes in blog templates

pull/5/head
Антон 4 months ago
parent a34e131e3d
commit c467185fee
  1. 9
      wp-content/themes/cosmopet/404.php
  2. 2
      wp-content/themes/cosmopet/modules/blog/components/archive/component-controller.php
  3. 12
      wp-content/themes/cosmopet/modules/blog/editor-blocks/block_img/assets/css/style.css
  4. 4
      wp-content/themes/cosmopet/modules/blog/editor-blocks/table/assets/css/style.css
  5. 12
      wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/assets/css/style.css
  6. 59
      wp-content/themes/cosmopet/templates/404.twig

@ -0,0 +1,9 @@
<?php
/**
* The template for displaying 404 pages (Not Found)
*/
$context = Timber::get_context();
Timber::render('templates/404.twig', $context);
?>

@ -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; // Количество опубликованных постов

@ -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;
}

@ -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;

@ -143,4 +143,14 @@
font-size: 18px;
line-height: 24px;
}
}
}
.article-content p {
color: var(--grey-black);
font-size: 24px;
/* line-height: 32px; */
font-weight: 500;
font-size: 18px;
line-height: 24px;
}

@ -0,0 +1,59 @@
{% extends 'layout.twig' %}
{% block content %}
<style>
:root {
--gradient-turquoise: linear-gradient(90deg, #00C4B4, #00A3E0);
}
.container {
text-align: center;
}
h1 {
font-size: 120px;
margin: 0;
background: var(--gradient-turquoise);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
p {
font-size: 24px;
color: #000000;
margin: 20px 0;
}
.btn-home {
display: inline-block;
padding: 10px 20px;
font-size: 18px;
color: #ffffff;
text-decoration: none;
border-radius: 5px;
background: var(--gradient-turquoise);
transition: transform 0.2s;
}
.btn-home:hover {
transform: scale(1.05);
}
</style>
<div class="container">
{% if current_lang == 'ru' %}
<h1>404</h1>
<p>Данной страницы не существует</p>
<a href="/" class="btn-home">На главную</a>
{% elseif current_lang == 'en' %}
<h1>404</h1>
<p>This page does not exist</p>
<a href="/" class="btn-home">Main page</a>
{% endif %}
</div>
{% endblock %}
Loading…
Cancel
Save