From 6c9eb10fdc07da6857ef9b3d83e30d17b920704d Mon Sep 17 00:00:00 2001 From: argoexpert press Date: Tue, 11 Jun 2024 12:54:22 +0300 Subject: [PATCH] new page interviews --- category-interviews.php | 50 ++++++------ frontend/dist/assets/main.css | 118 ++++++++++++++--------------- frontend/src/styles/pages/main.css | 9 ++- functions.php | 15 ++++ 4 files changed, 104 insertions(+), 88 deletions(-) diff --git a/category-interviews.php b/category-interviews.php index 4d0ba78..aaa49ca 100644 --- a/category-interviews.php +++ b/category-interviews.php @@ -1,28 +1,26 @@ - 10, // Количество постов для вывода - 'post_type' => 'post', // Тип постов для выборки (например, 'post', 'page', 'custom_post_type') - 'orderby' => 'date', // Сортировка по дате - 'order' => 'DESC', // Направление сортировки (DESC - по убыванию, ASC - по возрастанию) - 'category_name' => get_queried_object()->slug -); -$counter = 0; -query_posts($args); - -?> - - +
- - -
-

name ?>

+ +
+ +

name ?>

+
-
- - + 'post', + 'posts_per_page' => 10, + 'paged' => $paged, + 'category__in' => get_queried_object_id() + ); + $query = new WP_Query($args); + ?> + + have_posts()) : ?> + have_posts()) : $query->the_post(); ?> @@ -57,6 +55,10 @@ query_posts($args); На главную
+ + + +
+
- \ No newline at end of file + \ No newline at end of file diff --git a/frontend/dist/assets/main.css b/frontend/dist/assets/main.css index 2270d97..173dfab 100644 --- a/frontend/dist/assets/main.css +++ b/frontend/dist/assets/main.css @@ -601,7 +601,7 @@ button { margin-bottom: 5px; } -.advert-item__contact-email, .advert-item__contact-email a{ +.advert-item__contact-email { color: var(--secondary); }.article-item { padding: 1.2rem 1.25rem 0; @@ -988,16 +988,6 @@ button { margin-bottom: 14px; } -sub { - vertical-align: sub; - font-size: smaller; -} - -sup { - vertical-align: super; - font-size: smaller; -} - @media (max-width: 767px) { .article-single { border-top: 1px solid var(--gray); @@ -1101,7 +1091,7 @@ sup { flex-direction: column; gap: 5px; } -.contacts__block-email, .contacts__block-email a { +.contacts__block-email { color: var(--secondary); } @@ -1600,14 +1590,6 @@ sup { color: #2f2f2f; } - -.edition-title{ - font-weight: 700; - font-size: 2rem; - line-height: 2.4rem; -} - - @media (max-width: 767px) { .about { padding: 1.5rem 0.5rem; @@ -1632,37 +1614,49 @@ sup { } } .banner--header { - display: block; - max-width: 1440px; + height: 12rem; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; width: 100%; - margin: 0 auto; overflow: hidden; } +.banner--header img { + min-height: 100%; + max-height: 100%; +} -.banner--header IMG{ +.banner--header a { + display: -webkit-box; + display: -ms-flexbox; + display: flex; width: 100%; - height: auto; -} + height: 100%; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; +} @media (max-width: 767px) { .banner--header { - display: block; - max-width: 767px; - width: 100%; - /* height: 8rem; - position: relative; */ - + height: 8rem; + position: relative; } .banner--header img { - width: 100%; - height: auto; - /*position: absolute; + position: absolute; left: 50%; top: 50%; - transform: translate(-50%, -50%); - max-height: 100%;*/ + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + max-height: 100%; } }.breadcrumbs { background: #fff; @@ -2557,18 +2551,25 @@ h3, } .rating { - margin-right: 12px; -} - -.lang-switch{ - font-weight: bold; - font-size: 1.2em; -} - - .lang-switch a{ - color: #ff6900; - } - + padding: 15px; + margin: 5px; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + border-radius: 50%; + width: 50px; + height: 50px; + max-width: 50px; + max-height: 50px; + background-color: var(--secondary); + color: white; +} @media (max-width: 768px) { .nav { @@ -2584,15 +2585,6 @@ h3, .nav .menu-item:nth-child(2n - 2) { justify-self: right; } - - .rating { - margin-right: 0; - } - - .lang-switch{ - font-size: 1em; - } - } .menu-item a { @@ -3278,7 +3270,6 @@ a.pagination__item:hover { } .articles-preview__show-next { - color: var(--secondary); padding: 1.8rem 0 1.7rem; grid-column: span 2; width: 100%; @@ -3286,10 +3277,11 @@ a.pagination__item:hover { border-top: 0.1rem solid var(--gray); margin-top: -1px; font-family: 'Raleway', sans-serif; - font-weight: 700; + -webkit-transition: 0.3s; + transition: 0.3s; - font-size: 2rem; + font-size: 1.3rem; display: -webkit-box; display: -ms-flexbox; display: flex; @@ -3368,6 +3360,10 @@ a.pagination__item:hover { gap: 1.5rem; left: 3.9rem; bottom: 1.8rem; + background: rgba(0, 0, 0, 0.5); /* Черный фон с 50% прозрачностью */ + border-radius: 0.5rem; /* закруглим углы */ + width: 200px; + padding-left: 4px; } .banner-left { diff --git a/frontend/src/styles/pages/main.css b/frontend/src/styles/pages/main.css index c394c08..e017dcc 100644 --- a/frontend/src/styles/pages/main.css +++ b/frontend/src/styles/pages/main.css @@ -89,7 +89,6 @@ } .articles-preview__show-next { - color: var(--secondary); padding: 1.8rem 0 1.7rem; grid-column: span 2; width: 100%; @@ -97,9 +96,9 @@ border-top: 0.1rem solid var(--gray); margin-top: -1px; font-family: 'Raleway', sans-serif; - font-weight: 700; + transition: 0.3s; - font-size: 2rem; + font-size: 1.3rem; display: flex; justify-content: center; } @@ -163,6 +162,10 @@ gap: 1.5rem; left: 3.9rem; bottom: 1.8rem; + background: rgba(0, 0, 0, 0.5); /* Черный фон с 50% прозрачностью */ + border-radius: 0.5rem; /* закруглим углы */ + width: 200px; + padding-left: 4px; } .banner-left { diff --git a/functions.php b/functions.php index 31cb5da..a56af40 100644 --- a/functions.php +++ b/functions.php @@ -1053,6 +1053,7 @@ add_filter('template_include', 'use_custom_template_for_en_subcategories'); } +/** function add_custom_admin_menu() { add_menu_page( 'Update Posts Categories', // Заголовок страницы @@ -1063,6 +1064,20 @@ function add_custom_admin_menu() { ); } + +add_action('admin_menu', 'add_custom_admin_menu');*/ + +function add_custom_admin_menu() { + add_submenu_page( + 'tools.php', // Родительское меню (в данном случае "Инструменты") + 'Update Posts Categories', // Заголовок страницы + 'Update Categories EN', // Текст меню + 'manage_options', // Возможность доступа (только администраторы) + 'update-categories', // Уникальный идентификатор страницы + 'update_categories_callback' // Функция для отображения контента страницы + ); +} + add_action('admin_menu', 'add_custom_admin_menu');