diff --git a/wp-content/themes/dekart/assets/css/camp.css b/wp-content/themes/dekart/assets/css/camp.css index 9500453..1e10689 100644 --- a/wp-content/themes/dekart/assets/css/camp.css +++ b/wp-content/themes/dekart/assets/css/camp.css @@ -1417,175 +1417,84 @@ html { .mentors-wrapper { display: flex; flex-wrap: wrap; - gap: 40px 30px; + gap: 30px; justify-content: center; } .mentors__item { width: calc(25% - 23px); - display: flex; - flex-direction: column; - gap: 10px; - align-items: center; } -.mentors__item_img { - border-radius: 30px; - width: 100%; - height: auto; - max-height: 270px; - object-fit: contain; -} - -.mentors__item_name { - font-size: 26px; - line-height: 1.2; - color: #212121; - font-weight: 600; - text-align: center; - flex: 1; -} - -.mentors__item_text { - font-size: 18px; - line-height: 1.3; - color: #929292; - font-weight: 500; - text-align: center; - margin-bottom: 10px; -} - -/* modal-mentors */ -.modal-mentors-wrapper { - position: relative; - padding: 50px; - width: 90%; - height: 100%; - border-radius: 0; - background-color: #fff; - display: flex; - gap: 40px; - color: #212121; - height: fit-content; - max-height: 80%; - border-radius: 30px; -} - -.modal-mentors__content { - flex: 1; - display: flex; - flex-direction: column; - gap: 20px; - overflow-y: auto; -} - -.modal-mentors__content p { - margin-bottom: 0; -} - -.modal-mentors__content svg { - min-width: 30px; - width: 30px; - height: 30px; -} - -.modal-mentors_name { - font-size: 43px; - font-weight: 600; -} - -.modal-mentors_job { - font-size: 26px; - line-height: 1.25; - font-weight: 600; -} - -.modal-mentors__directions { - display: flex; - flex-wrap: wrap; - gap: 10px; -} - -.modal-mentors__directions span { - padding: 10px 20px; - background-color: #3bb273; - color: #fff; - font-size: 16px; - line-height: 1; - font-weight: 400; - border-radius: 30px; -} - -.modal-mentors__about { - display: flex; - gap: 20px; -} - -.about-item { - width: 50%; - padding: 20px; +.mentors__card { + background: #fff; border-radius: 20px; - background-color: #e7fff2; - display: flex; - gap: 10px; -} - -.mentors__about-col { + overflow: hidden; + box-shadow: 0 2px 16px rgba(0,0,0,0.06); + transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; - gap: 16px; + height: 100%; } -.mentors__about-col_title { - font-size: 20px; - line-height: 1.3; - font-weight: 600; +.mentors__card:hover { + transform: translateY(-4px); + box-shadow: 0 8px 32px rgba(0,0,0,0.1); } -.mentors__about-col_text { - font-size: 16px; - line-height: 1.3; - font-weight: 500; -} - -.modal-additional__education { - width: 100%; - padding: 20px; - border-radius: 20px; - border: 2px solid #f0f0f0; +.mentors__card-top { + background: linear-gradient(135deg, #e0f4ff, #f0f9ff); display: flex; - gap: 10px; + justify-content: center; + padding: 28px 20px 20px; } -.modal-additional__education_list ul { - display: flex; - flex-wrap: wrap; - gap: 10px 30px; - font-size: 16px; - line-height: 1.3; - font-weight: 500; -} - -.modal-additional__education_list li { - width: calc(50% - 20px); - position: relative; - padding-left: 20px; -} - -.modal-additional__education_list li::before { - content: '\2022'; - position: absolute; - width: 6px; - height: 6px; +.mentors__photo { + width: 120px; + height: 120px; border-radius: 50%; - background-color: #3bb273; - top: 5px; - left: 0; + object-fit: cover; + border: 4px solid #fff; + box-shadow: 0 4px 12px rgba(0,0,0,0.08); +} + +.mentors__card-body { + padding: 16px 20px 20px; + display: flex; + flex-direction: column; + gap: 8px; + flex: 1; +} + +.mentors__name { + font-family: Montserrat, sans-serif; + font-size: 20px; + font-weight: 700; + line-height: 1.25; + color: #1c2b2d; + text-align: center; +} + +.mentors__job { + font-family: Inter, sans-serif; + font-size: 14px; + line-height: 1.4; + color: #777; + text-align: center; + margin: 0; +} + +.mentors__about { + font-family: Inter, sans-serif; + font-size: 14px; + line-height: 1.5; + color: #555; + text-align: center; + margin: 4px 0 0; } -/* modal-mentors END */ /* mentors END */ + /* routine */ .routine p { margin-bottom: 0; diff --git a/wp-content/themes/dekart/functions.php b/wp-content/themes/dekart/functions.php index b19b78e..4059d84 100644 --- a/wp-content/themes/dekart/functions.php +++ b/wp-content/themes/dekart/functions.php @@ -653,27 +653,16 @@ function add_carbon() { ->add_tab('👨‍🏫 Наставники', array( Field::make( 'complex', 'mentors', 'Список наставников лагеря' ) ->set_layout( 'tabbed-horizontal' ) - ->set_help_text( 'Каждый наставник — отдельная запись. Не более 4 для одной страницы.' ) + ->set_help_text( 'Каждый наставник — отдельная запись.' ) ->add_fields( array( - Field::make('association', 'mentor', 'Выберите наставника из списка') - ->set_width( 32 ) - ->set_types(array( - array( - 'type' => 'post', - 'post_type' => 'teacher', - ) - )) - ->set_max(1) - ->set_help_text( 'Выберите одного преподавателя из записей типа «Учитель».' ), + Field::make( 'text', 'mentor_name', 'ФИО наставника' ) + ->set_width( 50 ), + Field::make( 'image', 'mentor_foto', 'Фото наставника' ) + ->set_width( 50 ), Field::make( 'text', 'mentor_job', 'Должность в лагере' ) - ->set_width( 68 ), - Field::make( 'complex', 'mentor_directions', 'Направления работы' ) - ->add_fields( array( - Field::make( 'text', 'direction_name', 'Название направления' ), - )) - ->set_help_text( 'Например: «Робототехника», «Театр».' ), - Field::make( 'text', 'mentor_experience', 'Опыт работы (в годах)' ) - ->set_help_text( 'Текстом: «более 5 лет».' ), + ->set_width( 100 ), + Field::make( 'textarea', 'mentor_about', 'О себе' ) + ->set_help_text( 'Кратко о наставнике (показывается на карточке).' ), )) )) ->add_tab('⏰ Распорядок дня', array( diff --git a/wp-content/themes/dekart/page-camp.php b/wp-content/themes/dekart/page-camp.php index 0f1495b..dbedc1a 100644 --- a/wp-content/themes/dekart/page-camp.php +++ b/wp-content/themes/dekart/page-camp.php @@ -247,7 +247,7 @@ $metrics = [ -
+

Летние программы

@@ -370,37 +370,42 @@ $metrics = [ $mentors = carbon_get_post_meta($post_id, 'mentors' ); if (is_array($mentors)) { foreach ($mentors as $item) { - $mentor = $item['mentor']; - $mentorName = !empty($mentor[0]['id']) ? get_the_title($mentor[0]['id']) : ''; - $mentor_job = $item['mentor_job']; - $mentor_directions = $item['mentor_directions']; - $HTMLdirection = ""; - $post_url = !empty($mentor[0]['id']) ? get_permalink($mentor[0]['id']) : ''; - if (is_array($mentor_directions)) { - foreach ($mentor_directions as $direction) {$HTMLdirection .= "" . esc_html($direction['direction_name'])."";} - } - $teacher_foto = !empty($mentor[0]['id']) ? carbon_get_post_meta($mentor[0]['id'], 'teacher_avatar') : ''; + $mentorName = $item['mentor_name'] ?? ''; + $mentor_job = $item['mentor_job'] ?? ''; + $mentor_foto = $item['mentor_foto'] ?? 0; + $mentor_about = $item['mentor_about'] ?? ''; + $mentor_about = $item['mentor_about'] ?? ''; ?>
- - - - <?php echo get_post_meta( $teacher_foto, '_wp_attachment_image_alt', true ); ?> - - - - - +
+ +

+ +

+ +
+
+