Лагерь: CSS
This commit is contained in:
parent
04611807cb
commit
d5339421de
@ -1417,175 +1417,84 @@ html {
|
|||||||
.mentors-wrapper {
|
.mentors-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 40px 30px;
|
gap: 30px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mentors__item {
|
.mentors__item {
|
||||||
width: calc(25% - 23px);
|
width: calc(25% - 23px);
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 10px;
|
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mentors__item_img {
|
.mentors__card {
|
||||||
border-radius: 30px;
|
background: #fff;
|
||||||
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;
|
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
background-color: #e7fff2;
|
overflow: hidden;
|
||||||
display: flex;
|
box-shadow: 0 2px 16px rgba(0,0,0,0.06);
|
||||||
gap: 10px;
|
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||||
}
|
|
||||||
|
|
||||||
.mentors__about-col {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 16px;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mentors__about-col_title {
|
.mentors__card:hover {
|
||||||
font-size: 20px;
|
transform: translateY(-4px);
|
||||||
line-height: 1.3;
|
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
|
||||||
font-weight: 600;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mentors__about-col_text {
|
.mentors__card-top {
|
||||||
font-size: 16px;
|
background: linear-gradient(135deg, #e0f4ff, #f0f9ff);
|
||||||
line-height: 1.3;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-additional__education {
|
|
||||||
width: 100%;
|
|
||||||
padding: 20px;
|
|
||||||
border-radius: 20px;
|
|
||||||
border: 2px solid #f0f0f0;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
justify-content: center;
|
||||||
|
padding: 28px 20px 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-additional__education_list ul {
|
.mentors__photo {
|
||||||
display: flex;
|
width: 120px;
|
||||||
flex-wrap: wrap;
|
height: 120px;
|
||||||
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;
|
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background-color: #3bb273;
|
object-fit: cover;
|
||||||
top: 5px;
|
border: 4px solid #fff;
|
||||||
left: 0;
|
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 */
|
/* mentors END */
|
||||||
|
|
||||||
|
|
||||||
/* routine */
|
/* routine */
|
||||||
.routine p {
|
.routine p {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|||||||
@ -653,27 +653,16 @@ function add_carbon() {
|
|||||||
->add_tab('👨🏫 Наставники', array(
|
->add_tab('👨🏫 Наставники', array(
|
||||||
Field::make( 'complex', 'mentors', 'Список наставников лагеря' )
|
Field::make( 'complex', 'mentors', 'Список наставников лагеря' )
|
||||||
->set_layout( 'tabbed-horizontal' )
|
->set_layout( 'tabbed-horizontal' )
|
||||||
->set_help_text( 'Каждый наставник — отдельная запись. Не более 4 для одной страницы.' )
|
->set_help_text( 'Каждый наставник — отдельная запись.' )
|
||||||
->add_fields( array(
|
->add_fields( array(
|
||||||
Field::make('association', 'mentor', 'Выберите наставника из списка')
|
Field::make( 'text', 'mentor_name', 'ФИО наставника' )
|
||||||
->set_width( 32 )
|
->set_width( 50 ),
|
||||||
->set_types(array(
|
Field::make( 'image', 'mentor_foto', 'Фото наставника' )
|
||||||
array(
|
->set_width( 50 ),
|
||||||
'type' => 'post',
|
|
||||||
'post_type' => 'teacher',
|
|
||||||
)
|
|
||||||
))
|
|
||||||
->set_max(1)
|
|
||||||
->set_help_text( 'Выберите одного преподавателя из записей типа «Учитель».' ),
|
|
||||||
Field::make( 'text', 'mentor_job', 'Должность в лагере' )
|
Field::make( 'text', 'mentor_job', 'Должность в лагере' )
|
||||||
->set_width( 68 ),
|
->set_width( 100 ),
|
||||||
Field::make( 'complex', 'mentor_directions', 'Направления работы' )
|
Field::make( 'textarea', 'mentor_about', 'О себе' )
|
||||||
->add_fields( array(
|
->set_help_text( 'Кратко о наставнике (показывается на карточке).' ),
|
||||||
Field::make( 'text', 'direction_name', 'Название направления' ),
|
|
||||||
))
|
|
||||||
->set_help_text( 'Например: «Робототехника», «Театр».' ),
|
|
||||||
Field::make( 'text', 'mentor_experience', 'Опыт работы (в годах)' )
|
|
||||||
->set_help_text( 'Текстом: «более 5 лет».' ),
|
|
||||||
))
|
))
|
||||||
))
|
))
|
||||||
->add_tab('⏰ Распорядок дня', array(
|
->add_tab('⏰ Распорядок дня', array(
|
||||||
|
|||||||
@ -247,7 +247,7 @@ $metrics = [
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="section-bg programs" data-bg="mint" itemscope itemtype="https://schema.org/ItemList">
|
<section class="section-reveal section-bg programs" data-bg="mint" itemscope itemtype="https://schema.org/ItemList">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2 class="camp_title" itemprop="name">Летние программы</h2>
|
<h2 class="camp_title" itemprop="name">Летние программы</h2>
|
||||||
<div class="programs__grid">
|
<div class="programs__grid">
|
||||||
@ -370,37 +370,42 @@ $metrics = [
|
|||||||
$mentors = carbon_get_post_meta($post_id, 'mentors' );
|
$mentors = carbon_get_post_meta($post_id, 'mentors' );
|
||||||
if (is_array($mentors)) {
|
if (is_array($mentors)) {
|
||||||
foreach ($mentors as $item) {
|
foreach ($mentors as $item) {
|
||||||
$mentor = $item['mentor'];
|
$mentorName = $item['mentor_name'] ?? '';
|
||||||
$mentorName = !empty($mentor[0]['id']) ? get_the_title($mentor[0]['id']) : '';
|
$mentor_job = $item['mentor_job'] ?? '';
|
||||||
$mentor_job = $item['mentor_job'];
|
$mentor_foto = $item['mentor_foto'] ?? 0;
|
||||||
$mentor_directions = $item['mentor_directions'];
|
$mentor_about = $item['mentor_about'] ?? '';
|
||||||
$HTMLdirection = "";
|
$mentor_about = $item['mentor_about'] ?? '';
|
||||||
$post_url = !empty($mentor[0]['id']) ? get_permalink($mentor[0]['id']) : '';
|
|
||||||
if (is_array($mentor_directions)) {
|
|
||||||
foreach ($mentor_directions as $direction) {$HTMLdirection .= "<span>" . esc_html($direction['direction_name'])."</span>";}
|
|
||||||
}
|
|
||||||
$teacher_foto = !empty($mentor[0]['id']) ? carbon_get_post_meta($mentor[0]['id'], 'teacher_avatar') : '';
|
|
||||||
?>
|
?>
|
||||||
<div class="mentors__item">
|
<div class="mentors__item">
|
||||||
<?php if ( $teacher_foto == '' ) { ?>
|
<div class="mentors__card">
|
||||||
<img class="mentors__item_img" loading="lazy" width="260" height="270" src="<?php echo $theme_uri; ?>/assets/images/no-photo.png" alt="">
|
<div class="mentors__card-top">
|
||||||
<?php } else { ?>
|
<?php if ( !$mentor_foto ) { ?>
|
||||||
<img class="mentors__item_img" loading="lazy" width="260" height="270" src="<?php echo wp_get_attachment_url($teacher_foto); ?>" alt="<?php echo get_post_meta( $teacher_foto, '_wp_attachment_image_alt', true ); ?>">
|
<img class="mentors__photo" loading="lazy" width="120" height="120" src="<?php echo $theme_uri; ?>/assets/images/no-photo.png" alt="">
|
||||||
<?php } ?>
|
<?php } else { ?>
|
||||||
<a href="<?php echo esc_url($post_url); ?>" class="mentors__item_name"><?php echo esc_html($mentorName); ?></a>
|
<img class="mentors__photo" loading="lazy" width="120" height="120" src="<?php echo wp_get_attachment_url($mentor_foto); ?>" alt="">
|
||||||
<a href="<?php echo esc_url($post_url); ?>" class="mentors__item_text"><?php echo esc_html($mentor_job); ?></a>
|
<?php } ?>
|
||||||
<button class="btn-details btn-mentors">Подробнее</button>
|
</div>
|
||||||
<div class="mentor-modal-content hidden">
|
<div class="mentors__card-body">
|
||||||
<?php
|
<span class="mentors__name"><?php echo esc_html($mentorName); ?></span>
|
||||||
$post_url = get_permalink($mentor[0]['id']);
|
<p class="mentors__job"><?php echo esc_html($mentor_job); ?></p>
|
||||||
$mentor_education = !empty($mentor[0]['id']) ? carbon_get_post_meta($mentor[0]['id'], 'teacher_education') : '';
|
<?php if ($mentor_about) : ?>
|
||||||
$mentor_experience = $item['mentor_experience'] ?? '';
|
<p class="mentors__about"><?php echo esc_html($mentor_about); ?></p>
|
||||||
$mentor_add_experience = !empty($mentor[0]['id']) ? carbon_get_post_meta($mentor[0]['id'], 'teacher_add_education') : '';
|
<?php endif; ?>
|
||||||
?>
|
</div>
|
||||||
<div class="HTMLdirection"><?php echo wp_kses_post($HTMLdirection); ?></div>
|
</div>
|
||||||
<div class="mentor_education"><?php echo esc_html($mentor_education); ?></div>
|
</div>
|
||||||
<div class="mentor_experience"><?php echo esc_html($mentor_experience); ?></div>
|
<div class="mentors__card-body">
|
||||||
<div class="mentor_add_experience"><?php echo esc_html($mentor_add_experience); ?></div>
|
<span class="mentors__name"><?php echo esc_html($mentorName); ?></span>
|
||||||
|
<p class="mentors__job"><?php echo esc_html($mentor_job); ?></p>
|
||||||
|
<?php if ($mentor_about) : ?>
|
||||||
|
<p class="mentors__about"><?php echo esc_html($mentor_about); ?></p>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mentor-modal-content hidden">
|
||||||
|
<div class="mentor-modal-education"><?php echo esc_html($mentor_education); ?></div>
|
||||||
|
<div class="mentor-modal-experience"><?php echo esc_html($mentor_exp); ?></div>
|
||||||
|
<div class="mentor-modal-additional"><?php echo esc_html($mentor_add_education); ?></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php }
|
<?php }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user