add departure quest page

This commit is contained in:
Sergey Krylov 2021-05-18 14:59:10 +05:00
parent 49bd36f9f8
commit e2b00cf5dc
17 changed files with 1061 additions and 81 deletions

734
home.css Normal file
View File

@ -0,0 +1,734 @@
.ent-container p {
font-size: 24px;
letter-spacing: 0.5px;
text-align: center;
color: #1e212b;
max-width: 940px;
margin: 20px auto;
margin-bottom: 0; }
.quest-description__icons_main {
padding: 20px 0 !important;
color: #fff;
display: flex;
flex-direction: row;
justify-content: space-between; }
.quest-description__icons_main div {
padding: 0 !important; }
.quest-description__icons_main img {
height: 20px;
width: auto !important;
margin: 0 auto; }
.quest-description__icons_main .quest-age img {
height: 44px; }
.ent {
padding-top: 70px;
padding-bottom: 20px;
position: relative;
font-family: 'PT Sans', sans-serif; }
.ent-slider {
padding-top: 35px; }
.ent-container .owl-item:nth-child(4n+2) h3 {
color: #5CBAE9; }
.ent-container .owl-item:nth-child(4n+2) button {
color: #ffffff; }
.ent-container .owl-item:nth-child(4n+2) a {
background: url("../../img/icons/arkids.svg") center 1px no-repeat;
background-size: 102%; }
.ent-container .owl-item:nth-child(2n+3) h3 {
color: #F08D37; }
.ent-container .owl-item:nth-child(2n+3) button {
color: #ffffff; }
.ent-container .owl-item:nth-child(2n+3) a {
background: url("../../img/icons/faraon.svg") center 1px no-repeat;
background-size: 102%;
background-size: 102%; }
.ent-container .owl-item:nth-child(2n+4) h3 {
color: #33cc33; }
.ent-container .owl-item:nth-child(2n+4) button {
color: #ffffff; }
.ent-container .owl-item:nth-child(2n+4) a {
background: url("../../img/icons/departure-quests.svg") center 1px no-repeat;
background-size: 102%; }
.ent-container h2 {
margin: 0;
text-align: center;
font-size: 40px;
font-weight: 600;
letter-spacing: 0.5px;
color: #1e212b; }
.ent-container__quest {
height: 380px;
max-width: 360px;
border-radius: 20px;
position: relative; }
.ent-container__quest-overlay {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.43), rgba(0, 0, 0, 0.57));
z-index: 50;
border-radius: 20px; }
.ent-container__quest-content {
position: relative;
z-index: 99;
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100%; }
.ent-container__quest-content div {
padding: 40px;
padding-bottom: 0; }
.ent-container__quest-content h3 {
font-size: 32px;
font-weight: 600;
letter-spacing: 0.4px;
margin-bottom: 12px;
color: red; }
.ent-container__quest-content p {
color: #ffffff;
font-size: 22px !important;
letter-spacing: 0.5px; }
.ent-container__quest-content a {
background: transparent;
width: 100%;
background-size: 360px 72px;
height: 74px;
padding: 23px;
display: block;
position: absolute;
transition: 0.2s;
bottom: 0;
left: 0;
right: 0;
z-index: 70;
border-radius: 0 0 20px 20px;
overflow: hidden;
background: url("../../img/icons/eger.svg") center 1px no-repeat;
background-size: 102%; }
.ent-container__quest-content a:hover {
height: 80px; }
.ent-container__quest-content a:hover button {
font-size: 22px; }
.ent-container__quest-content a button {
background: transparent;
transition: 0.2s;
border: none;
font-size: 18px;
font-weight: 600;
letter-spacing: 0.4px;
text-align: center;
width: 100%;
color: #ffffff;
text-decoration: none;
font-size: 18px;
font-weight: 600;
letter-spacing: 0.4px;
text-align: center;
text-transform: uppercase;
outline: none; }
.ent .ent-container__quest-content h3 {
font-size: 32px; }
.ent .ent-container__quest-content p {
font-size: 16px;
text-align: left; }
.ent .ent-container__quest-content a button {
text-align: center; }
@media screen and (max-width: 576px) {
.ent-container__quest-content br {
display: none; }
.ent {
margin-top: 0;
padding-top: 40px !important;
padding-bottom: 0px; }
.ent:before, .ent:after {
display: none !important; }
.ent-slider {
padding-top: 0; }
.ent-container h2 {
font-size: 28px !important; }
.ent-container p {
font-size: 16px !important; }
.ent-container__quest {
height: 280px !important;
margin-top: 25px;
max-width: 260px !important; }
.ent-container__quest-content div {
padding: 15px; }
.ent-container__quest-content h3 {
font-size: 20px !important; }
.ent-container__quest-content p {
font-size: 14px !important; }
.ent .owl-item:nth-child(3n+1) h3 {
color: #5CBAE9; }
.ent .owl-item:nth-child(3n+1) a {
background-size: 360px 70px;
background: url("../../img/icons/arkids.svg") center 1px no-repeat; }
.ent .owl-item:nth-child(3n+1) a button {
color: #ffffff; }
.ent .owl-item:nth-child(3n+2) h3 {
color: #F08D37; }
.ent .owl-item:nth-child(3n+2) a {
background-size: 360px 70px;
background: url("../../img/icons/faraon.svg") center 1px no-repeat; }
.ent .owl-item:nth-child(3n+2) a button {
color: #ffffff; }
.ent .owl-item:nth-child(3n) h3 {
color: red; }
.ent .owl-item:nth-child(3n) a {
background-size: 360px 70px;
background: url("../../img/icons/eger.svg") center 1px no-repeat !important; }
.ent .owl-item:nth-child(3n) a button {
color: #ffffff; }
.ent .owl-item:nth-child(2n+4) h3 {
color: #33cc33; }
.ent .owl-item:nth-child(2n+4) button {
color: #ffffff; }
.ent .owl-item:nth-child(2n+4) a {
background: url("../../img/icons/departure-quests.svg") center 1px no-repeat !important;
background-size: 360px 70px; } }
.discount {
padding-top: 40px;
background: #f2f2f2; }
.discount h2 {
color: #1e212b;
font-family: 'PT Sans', sans-serif;
font-size: 40px;
font-weight: 600;
letter-spacing: 0.5px;
line-height: normal;
margin-bottom: 40px;
text-align: center; }
.discount .owl-carousel .owl-item img {
width: auto;
max-height: 280px; }
.discount-slider {
position: relative;
max-width: 1200px;
margin-right: auto;
margin-left: auto; }
.discount-slider__prev {
align-items: center;
background-color: #f2f2f2;
border-radius: 50%;
color: #dc3545;
cursor: pointer;
display: flex;
font-size: 32px;
height: 55px;
justify-content: center;
left: -70px;
position: absolute;
top: 50%;
transform: translateY(-27px);
width: 55px; }
.discount-slider__next {
align-items: center;
background-color: #f2f2f2;
border-radius: 50%;
color: #dc3545;
cursor: pointer;
display: flex;
font-size: 32px;
height: 55px;
justify-content: center;
position: absolute;
right: -70px;
top: 50%;
transform: translateY(-27px);
width: 55px; }
.discount-item {
font-family: 'PT Sans', sans-serif;
height: 536px;
margin-left: auto;
margin-right: auto;
position: relative;
width: 360px; }
.discount-item__badge {
align-items: center;
background: url("../../img/discount/promo-badge-small.png") center center no-repeat;
color: #ffffff;
display: flex;
font-size: 28px;
font-weight: 600;
height: 77px;
justify-content: center;
left: -51px;
position: absolute;
text-align: center;
top: 28px;
transform: rotateZ(-29deg);
width: 397px;
z-index: 3; }
.discount-item__content {
align-items: center;
border-radius: 39px;
border: 5px solid #ffffff;
box-shadow: 0 0 15px 0 rgba(41, 48, 55, 0.5);
display: flex;
flex-direction: column;
height: 100%;
padding: 80px 35px 20px 35px;
position: absolute; }
.discount-item__content p {
color: #ffffff;
font-size: 20px;
font-weight: 600;
letter-spacing: 0.1px;
line-height: 1.25;
margin: 0 0 12px 0;
text-align: center; }
.discount-item__content button {
background-color: #fff;
border: none;
color: #dc3545;
width: 100%; }
.discount-item__content img {
height: 280px;
max-width: 100%; }
.discount-modal {
display: none;
font-family: 'PT Sans', sans-serif;
height: 100%;
position: fixed;
top: 0;
width: 100%;
z-index: 99999; }
.discount-modal-close {
color: #FFF;
cursor: pointer;
font-size: 20px;
font-style: normal;
line-height: 44px;
opacity: 0.65;
position: absolute;
right: -100px;
top: -50px; }
.discount-modal-layout {
background: rgba(0, 0, 0, 0.85);
height: 100%;
left: 0;
position: fixed;
top: 0;
width: 100%; }
.discount-modal-wrapper {
background: #ffffff;
border-radius: 39px;
border: 8px solid #ffffff;
height: 523px;
left: 50%;
position: relative;
top: 50%;
transform: translateX(-460px) translateY(-262px);
width: 920px;
z-index: 2; }
.discount-modal-slider {
height: 100%; }
.discount-modal-slider .owl-stage {
height: 100%; }
.discount-modal-slider .owl-stage-outer {
border-radius: 30px;
height: 100%;
padding: 0 !important; }
.discount-modal-slider .owl-stage-outer .owl-item {
height: 100%; }
.discount-modal-slider-nav {
align-items: center;
background-color: #f2f2f2;
border-radius: 50%;
color: #dc3545;
cursor: pointer;
display: flex;
font-size: 32px;
height: 55px;
justify-content: center;
position: absolute;
right: -100px;
top: 50%;
transform: translateY(-27px);
width: 55px; }
.discount-modal-slider-nav i {
transform: translateX(4px); }
.discount-modal-slider-nav-prev {
right: 0;
left: -100px; }
.discount-modal-slider-nav-prev i {
transform: translateX(-2px); }
.discount-modal-slider-item {
align-items: center;
background: #ffffff;
border-radius: 10px;
display: flex;
height: 100%;
justify-content: space-between;
position: relative; }
.discount-modal-slider-item img {
width: auto !important;
max-width: 100%; }
.discount-modal-slider-item-badge {
align-items: center;
background: url("../../img/discount/promo-badge-large.png") center center no-repeat;
color: #ffffff;
display: flex;
font-size: 26px;
font-weight: 600;
height: 77px;
justify-content: center;
left: -51px;
line-height: 77px;
position: absolute;
text-align: center;
top: 28px;
transform: rotateZ(-29deg);
width: 432px; }
.discount-modal-slider-item__img {
align-items: center;
display: flex;
height: 100%;
justify-content: center;
width: 360px; }
.discount-modal-slider-item__text {
align-self: flex-start;
display: flex;
flex-direction: column;
font-size: 20px;
height: 100%;
justify-content: space-between;
letter-spacing: 0.2px;
line-height: 1.5;
max-width: 540px;
padding: 10px 30px; }
.discount-modal-slider-item__text button {
background: #2bbb73;
border: none;
width: 295px; }
.discount-modal-slider-item__text button:hover {
background: #21925a; }
@media screen and (max-width: 576px) {
.discount {
padding-bottom: 20px;
padding-top: 20px; }
.discount h2 {
margin: 0 auto 20px auto; }
.discount-item {
height: 350px;
width: 260px;
max-width: 100%; }
.discount-item__badge {
align-items: center;
background: url(../../img/discount/promo-badge-small.png) center center no-repeat;
background-size: cover;
color: #fff;
display: flex;
font-size: 18px;
font-weight: 600;
height: 48px;
justify-content: center;
left: -31px !important;
position: absolute;
text-align: center;
top: 26px;
transform: rotateZ(-29deg);
width: 277px;
z-index: 3; }
.discount-item__content {
padding: 80px 10px; }
.discount-item__content img {
max-height: 123px !important; }
.discount-item__content p {
min-height: 50px;
font-size: 14px;
font-weight: normal; }
.discount-item__content button {
width: auto;
font-size: 16px; }
.discount-modal {
padding: 10px; }
.discount-modal-close {
display: none; }
.discount-modal .owl-stage-outer {
border-radius: 15px; }
.discount-modal-wrapper {
height: 470px;
left: 0;
max-width: 100%;
top: 50%;
transform: translateY(-225px); }
.discount-modal-slider-item {
flex-direction: column;
justify-content: center; }
.discount-modal-slider-item__img {
display: none; }
.discount-modal-slider-item-badge {
background: none;
color: #000000;
font-size: 24px;
height: 40px;
position: initial;
text-align: center;
transform: none; }
.discount-modal-slider-item__text {
font-size: 16px;
height: auto; }
.discount-modal-slider-item__text p {
margin: 5px 0 !important; }
.discount-modal-slider-item__text a {
display: none;
justify-content: center; }
.discount-modal-slider-item__text a button {
width: 200px;
font-size: 14px; } }
.present {
font-family: 'PT Sans', sans-serif;
padding-bottom: 20px;
padding-top: 60px; }
.present .container {
position: relative;
padding-top: 10px;
overflow: visible; }
.present .container::before {
content: '';
display: block;
width: 296px;
height: 293px;
background: url("../../img/present/cube-purple.png") center no-repeat;
position: absolute;
top: -100px;
left: -100px; }
.present .container::after {
content: '';
display: block;
width: 296px;
height: 293px;
background: url("../../img/present/cube-yellow.png") center no-repeat;
position: absolute;
top: -215px;
right: -100px; }
.present-layout {
padding-bottom: 30px; }
.present h2 {
text-align: center;
font-size: 40px;
font-weight: 600;
letter-spacing: 0.5px;
color: #1e212b;
line-height: normal;
margin-bottom: 75px; }
.present-item {
display: flex;
align-items: center;
position: relative;
margin-bottom: 70px; }
.present-item:last-child {
flex-direction: row-reverse;
margin-bottom: 15px; }
.present-item:last-child img {
left: -115px; }
.present-item:last-child .present-item__text {
right: 115px;
left: 115px;
padding: 70px 251px 0 100px;
border-radius: 20px 0 0 20px;
box-shadow: 0 0 15px 0 rgba(41, 48, 55, 0.5); }
.present-item img {
position: relative;
z-index: 2;
left: 115px;
width: 360px;
height: 360px; }
.present-item__text {
display: flex;
flex-direction: column;
align-items: flex-start;
width: 757px;
height: 360px;
position: absolute;
right: 115px;
top: 0;
background-color: #f2f2f2;
box-shadow: 0 0 15px 0 rgba(41, 48, 55, 0.5);
padding: 70px 100px 0 251px;
border-radius: 0 20px 20px 0;
z-index: 1; }
.present-item__text h3 {
font-size: 32px;
font-weight: 600;
line-height: 1.22;
letter-spacing: 0.3px;
margin: 0 0 10px 0; }
.present-item__text p {
margin: 22px 0;
max-width: 400px;
font-size: 22px;
line-height: 1.45;
letter-spacing: 0.5px; }
.present-item__text a {
font-size: 18px;
font-weight: 600;
letter-spacing: 1.2px;
text-align: center;
text-transform: uppercase;
text-decoration: none;
vertical-align: middle;
line-height: 1.3;
border: 0; }
.present-item__text a button {
width: 260px;
box-shadow: 0 2px 12px 0 rgba(56, 72, 95, 0.49); }
@media screen and (max-width: 1200px) {
.present-item__text {
max-width: 530px;
padding: 20px 25px; }
.present-item:last-child .present-item__text {
padding: 20px !important; } }
@media screen and (max-width: 770px) {
.present-item {
height: 250px; }
.present-item img {
max-height: 122px;
left: 0 !important;
right: 0 !important; }
.present-item__text {
max-width: 530px;
padding: 20px;
box-shadow: none;
position: relative;
right: 0 !important;
left: 0 !important;
height: auto; }
.present-item__text h3 {
font-size: 14px; }
.present-item__text p {
font-size: 14px; }
.present-item__text button {
width: 178px !important;
font-size: 16px; }
.present-item:last-child .present-item__text {
padding: 20px !important;
padding-right: 251px; } }
@media screen and (max-width: 576px) {
.present {
padding-bottom: 0; }
.present:before, .present:after {
display: none; }
.present-layout {
padding-bottom: 0; }
.present {
padding-left: 0;
padding-right: 0; }
.present h2 {
margin-bottom: 0;
margin-top: 20px; }
.present-item {
height: 200px;
margin-bottom: 0; }
.present-item img {
max-height: 110px; }
.present-item__text {
background: #fff;
max-width: 530px;
position: relative;
right: 0;
left: 0;
padding: 20px;
box-shadow: none;
height: auto; }
.present-item__text h3 {
font-size: 16px;
margin-bottom: 0; }
.present-item__text p {
margin-top: 10px;
margin-bottom: 10px; }
.present-item:last-child .present-item__text {
padding: 10px !important;
padding-right: 251px;
box-shadow: none; }
.present-item__text button {
max-width: 100px !important;
padding: 5px;
font-size: 14px !important; }
.present {
padding-top: 0; } }
.principals {
background: #f2f2f2;
padding-top: 40px;
padding-bottom: 30px;
max-width: 1200px;
margin-right: auto;
margin-left: auto; }
.principals .owl-stage {
display: flex;
align-items: center; }
.principals .owl-item img {
width: auto;
max-height: 104px; }
.principals h2 {
text-align: center;
font-size: 40px;
font-weight: 600;
letter-spacing: 0.5px;
color: #1e212b;
line-height: normal;
margin-bottom: 40px; }
.principals-slider {
padding: 0; }
.principals-slider__prev {
background-color: #f2f2f2;
font-size: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
width: 55px;
height: 55px;
color: #dc3545;
position: absolute;
top: 33%;
left: -100px;
transform: translateY(-27px);
cursor: pointer;
outline: none; }
.principals-slider__next {
background-color: #f2f2f2;
font-size: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
width: 55px;
height: 55px;
color: #dc3545;
position: absolute;
top: 33%;
right: -100px;
transform: translateY(-27px);
cursor: pointer; }
@media screen and (max-width: 480px) {
.principals {
padding-top: 20px !important;
padding-bottom: 0 !important; }
.principals h2 {
margin-bottom: 0; } }
div.places.places_home, div.places_home .places-layout {
background: #ffffff !important;
padding-top: 20px; }
@media screen and (max-width: 576px) {
div.places.places_home, div.places_home .places-layout {
padding-top: 0 !important; } }
/*# sourceMappingURL=home.css.map */

View File

@ -1,9 +1,23 @@
<?php $description = get_field('departure_description');?>
<div class="description"> <div class="quest-description container">
<div class="description_layout"> <div class="row justify-content-center">
<div class="description_text"> <div class="col-lg-2 col-md-12 quest-description__icons">
<h2>Выпускной для детей, оканчивающих садик или <br> начальную школу</h2> <div class="quest-people">
<p>На нашем детском выпускном все будет по-взрослому:<br>девочки в платьях, мальчики в костюмах, официальная и игровая части и диплом выпускника Armanty, как вишенка на торте.</p> <img src="<?php echo get_template_directory_uri() ?>/assets//img/quests/quest-people-big.svg" alt="">
<span><?php echo $description['players_min']?>-<?php echo $description['players_max']?> игроков</span>
</div>
<div class="quest-time">
<img src="<?php echo get_template_directory_uri() ?>/assets//img/quests/quest-time-big.svg" alt="">
<span><?php echo $description['time']?> минут</span>
</div>
<div class="quest-level">
<img src="<?php echo get_template_directory_uri() ?>/assets//img/quests/quest-key-big.svg" alt="">
<span><?php echo $description['complexity'] ?> из 5</span>
</div>
</div>
<div class="col-lg col-md-12 quest-description__text">
<?php the_post(); the_content() ?>
</div> </div>
</div> </div>
</div> </div>

View File

@ -0,0 +1,9 @@
<?php $gallery = get_field('departure_gallery', get_the_ID() - 10); ?>
<div class="holiday-photos holiday-block">
<h2><?php echo $gallery['title']; ?></h2>
<p><?php echo $gallery['description']; ?></p>
<?php echo do_shortcode('[print_gllr id=312]'); ?>
<!-- <a href="<?php echo get_page_link( 33 )?>"><button class="btn btn-danger btn-round">Смотреть фото в галерее</button></a> -->
</div>

View File

@ -0,0 +1,41 @@
<?php $packages = get_field('departure_packages');?>
<div class="packages">
<div class="holiday-block container">
<h2><?php echo $packages['title']?></h2>
<p><?php echo $packages['description']?></p>
<div class="owl-carousel packages-slider container">
<?php
$posts = get_posts( array(
'category' => 0,
'orderby' => 'date',
'order' => 'ASC',
'include' => array(),
'exclude' => array(),
'meta_key' => '',
'meta_value' =>'',
'post_type' => 'armanty_departure',
'posts_per_page' => 99,
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
) );
foreach( $posts as $post ){
setup_postdata($post);?>
<div class="packages-item">
<div>
<h3><?php the_title()?></h3>
<img src="<?php echo the_post_thumbnail_url() ?>" alt="">
<p class="packages-item__price"><span><?php the_field('offer_price')?></span><span style="font-size: 16px !important">₽</span></p>
<p class="packages-item__descr">предложение рассчитано до <?php the_field('offer_people')?> человек</p>
</div>
<div>
<?php the_field('offer_composition')?>
<a href="#order"><button class="btn btn-danger btn-round" data-package="<?php the_title()?>">Оставить заявку</button></a>
</div>
</div>
<?php
}
?>
</div>
</div>
</div>

View File

@ -34,50 +34,6 @@
<?php <?php
} }
?> ?>
<!-- <div class="packages-item">
<h3>Medium</h3>
<img src="<?php echo get_template_directory_uri() ?>/assets/img/holiday/icons/medium-1.svg" alt="">
<p class="packages-item__price">от <span>23 900</span> руб</p>
<p class="packages-item__descr">предложение рассчитано на 5 человек</p>
<ul>в программу входит:
<li>2 квеста</li>
<li>Прятки в темноте</li>
<li>Аренда большого конфренц-зала (1 час)</li>
<li>Украшение шарами</li>
<li>Мастер-класс на выбор</li>
</ul>
<a href="#order"><button class="btn btn-danger btn-round">Оставить заявку</button></a>
</div>
<div class="packages-item">
<h3>Maximum</h3>
<img src="<?php echo get_template_directory_uri() ?>/assets/img/holiday/icons/max-1.svg" alt="">
<p class="packages-item__price">от <span>23 900</span> руб</p>
<p class="packages-item__descr">предложение рассчитано на 5 человек</p>
<ul>в программу входит:
<li>2 квеста</li>
<li>Прятки в темноте</li>
<li>Аренда большого конфренц-зала (1 час)</li>
<li>Украшение шарами</li>
<li>Мастер-класс на выбор</li>
</ul>
<a href="#order"><button class="btn btn-danger btn-round">Оставить заявку</button></a>
</div>
<div class="packages-item">
<h3>Super</h3>
<img src="<?php echo get_template_directory_uri() ?>/assets/img/holiday/icons/super-1.svg" alt="">
<p class="packages-item__price">от <span>23 900</span> руб</p>
<p class="packages-item__descr">предложение рассчитано на 5 человек</p>
<ul>в программу входит:
<li>2 квеста</li>
<li>Прятки в темноте</li>
<li>Аренда большого конфренц-зала (1 час)</li>
<li>Украшение шарами</li>
<li>Мастер-класс на выбор</li>
</ul>
<a href="#order"><button class="btn btn-danger btn-round">Оставить заявку</button></a>
</div> -->
</div> </div>
</div> </div>
</div> </div>

View File

@ -24,7 +24,7 @@
foreach( $posts as $post ){ foreach( $posts as $post ){
setup_postdata($post);?> setup_postdata($post);?>
<div class="ent-container__quest" style="background: url('<?php echo the_post_thumbnail_url() ?>'); background-size: cover"> <div class="ent-container__quest <?php echo get_field('quest_alias', $post->ID);?>" style="background: url('<?php echo the_post_thumbnail_url() ?>'); background-size: cover">
<div class="ent-container__quest-overlay"></div> <div class="ent-container__quest-overlay"></div>
<div class="ent-container__quest-content"> <div class="ent-container__quest-content">
<div> <div>
@ -52,8 +52,38 @@
</div> </div>
<?php <?php
} }
// ID локально и на сайте могут отличаться, смотреть по URL в админке WP
$departure_id = 609;
$the_post = get_post($departure_id);
$description = get_field('departure_description', $departure_id);
?> ?>
<div class="ent-container__quest departure" style="background: url('<?php echo get_the_post_thumbnail_url($the_post) ?>'); background-size: cover">
<div class="ent-container__quest-overlay"></div>
<div class="ent-container__quest-content">
<div>
<h3><?php echo $the_post->post_title ?></h3>
<p style="margin-top: 20px; margin-bottom: 20px">Квест и программа на природе на вашей площадке</p>
<br>
<div class="quest-description__icons_main">
<div class="quest-people">
<img src="<?php echo get_template_directory_uri() ?>/assets//img/quests/quest-people-big-white.svg" alt="">
<span><?php echo $description['players_min']?>-<?php echo $description['players_max']?> игроков</span>
</div>
<div class="quest-time">
<img src="<?php echo get_template_directory_uri() ?>/assets//img/quests/quest-time-big-white.svg" alt="">
<span>от 2 часов</span>
</div>
<div class="quest-age">
<img src="https://armanty-quests.ru/wp-content/uploads/2020/03/5-1-1.png" alt="">
<!-- <i class="fa fa-child" aria-hidden="true"></i> -->
<!-- <span><?php echo the_field('quest_level'); ?> из 5</span> -->
</div>
</div>
</div>
<a href="<?php echo get_post_permalink($departure_id); ?>"><button>Подробнее</button></a>
</div>
</div>
</div> </div>
</div> </div>

View File

@ -5,11 +5,15 @@
?>"> ?>">
<div class="compound"> <div class="compound">
<div class="compound__text"> <div class="compound__text">
<!-- Выводим информацию о квестах -->
<?php <?php
if (is_page_template('templates/departure-quests.php')) {
echo the_field('departure_bottom_description');
} else {
// Выводим информацию о квестах
$post = get_post(8); $post = get_post(8);
$content = $post->post_content; $content = $post->post_content;
echo $content; echo $content;
}
?> ?>
</div> </div>

View File

@ -13,6 +13,6 @@
'img' => get_template_directory_uri() . '/assets/img', 'img' => get_template_directory_uri() . '/assets/img',
]; ];
$version = '1.0.8'; $version = '1.0.18';
} }
?> ?>

View File

@ -27,13 +27,13 @@
wp_enqueue_script( 'slick', 'https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.js', ['jquery'], $version, true); wp_enqueue_script( 'slick', 'https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.js', ['jquery'], $version, true);
if(is_front_page() || is_page ('24') || is_page('35') || is_page('56')){ if(is_front_page() || is_page ('24') || is_page('35') || is_page('56') || is_page ('609')){
wp_enqueue_script( 'main', $js . '/components/main.js', ['jquery'], $version, true); wp_enqueue_script( 'main', $js . '/components/main.js', ['jquery'], $version, true);
} }
if(is_page ('8')){ if(is_page ('8') || is_page ('609')){
wp_enqueue_script( 'quests', $js . '/components/quests.js', ['jquery'], $version, true); wp_enqueue_script( 'quests', $js . '/components/quests.js', ['jquery'], $version, true);
} }
if(is_page ('24')){ if(is_page ('24') || is_page ('609')){
wp_enqueue_script( 'quests', $js . '/components/holiday.js', ['jquery'], $version, true); wp_enqueue_script( 'quests', $js . '/components/holiday.js', ['jquery'], $version, true);
} }
if(is_page ('35')){ if(is_page ('35')){
@ -50,5 +50,9 @@
if (is_page_template('templates/graduation.php')) { if (is_page_template('templates/graduation.php')) {
wp_enqueue_script( 'graduation', $js . '/components/graduation.js', ['jquery'], $version, true); wp_enqueue_script( 'graduation', $js . '/components/graduation.js', ['jquery'], $version, true);
} }
if (is_page_template('templates/departure-quests.php')) {
wp_enqueue_script( 'departure-quests', $js . '/components/departure-quests.js', ['jquery'], $version, true);
}
}; };
?> ?>

View File

@ -36,6 +36,7 @@
if (is_page_template('templates/sales.php')) wp_enqueue_style('armanty_sales', $pagesStyle . '/sales.css', array(), $styleVersion); if (is_page_template('templates/sales.php')) wp_enqueue_style('armanty_sales', $pagesStyle . '/sales.css', array(), $styleVersion);
if (is_page_template('templates/single-quest.php')) wp_enqueue_style('armanty_single-quest', $pagesStyle . '/single-quest.css', array(), $styleVersion); if (is_page_template('templates/single-quest.php')) wp_enqueue_style('armanty_single-quest', $pagesStyle . '/single-quest.css', array(), $styleVersion);
if (is_page_template('templates/graduation.php')) wp_enqueue_style('armanty_graduation', $pagesStyle . '/graduation.css', array(), $styleVersion); if (is_page_template('templates/graduation.php')) wp_enqueue_style('armanty_graduation', $pagesStyle . '/graduation.css', array(), $styleVersion);
if (is_page_template('templates/departure-quests.php')) wp_enqueue_style('armanty_departure-quests', $pagesStyle . '/departure-quests.css', array(), $styleVersion);
wp_enqueue_style('armanty_holiday', $pagesStyle . '/holiday.css', array(), $styleVersion); wp_enqueue_style('armanty_holiday', $pagesStyle . '/holiday.css', array(), $styleVersion);
wp_enqueue_style('armanty_quests', $pagesStyle . '/quests.css', array(), $styleVersion); wp_enqueue_style('armanty_quests', $pagesStyle . '/quests.css', array(), $styleVersion);

View File

@ -217,7 +217,7 @@
'not_found' => 'Пакетов не найдено', 'not_found' => 'Пакетов не найдено',
'not_found_in_trash' => 'В корзине пакетных предложений не найдено', 'not_found_in_trash' => 'В корзине пакетных предложений не найдено',
'parent_item_colon' => '', 'parent_item_colon' => '',
'menu_name' => 'Выпускные &nbsp; пакеты' 'menu_name' => 'Выпускные пакеты'
), ),
'public' => true, 'public' => true,
@ -232,5 +232,34 @@
'menu_icon' => 'dashicons-tickets-alt', 'menu_icon' => 'dashicons-tickets-alt',
'supports' => array('title') 'supports' => array('title')
) ); ) );
register_post_type('armanty_departure', array(
'labels' => array(
'name' => 'Выездные пакеты', // Основное название типа записи
'singular_name' => 'Выездные пакет', // отдельное название записи типа Book
'add_new' => 'Добавить новый',
'add_new_item' => 'Добавить новый пакет',
'edit_item' => 'Редактировать пакет',
'new_item' => 'Новый пакет',
'view_item' => 'Посмотреть пакет',
'search_items' => 'Найти пакет',
'not_found' => 'Пакетов не найдено',
'not_found_in_trash' => 'В корзине пакетных предложений не найдено',
'parent_item_colon' => '',
'menu_name' => 'Выездные пакеты'
),
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'has_archive' => 'true', // если нужна страница архива тут указываем её ярлык а не true
'capability_type' => 'post',
'hierarchical' => false,
'menu_position' => 2,
'menu_icon' => 'dashicons-tickets-alt',
'supports' => array('title', 'thumbnail')
) );
} }
?> ?>

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="360" height="83" viewBox="0 0 4010.76 924.7" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd"><defs><linearGradient id="id0" gradientUnits="userSpaceOnUse" x1="2034.84" y1="939.19" x2="1975.92" y2="-14.49"><stop offset="0" stop-color="#f90"/><stop offset="1" stop-color="#ffbf00"/></linearGradient></defs><g id="Слой_x0020_1"><g id="Rectangle.svg"><g id="главная-страница"><g id="Все-развлечения-Состояния"><g id="Group-13"><g id="Group-14"><path d="M0 228.95C502.4 85.39 1157.09 9.29 1964.08.66c806.99-8.63 1489.21 67.46 2046.67 228.29V924.7H-.01V228.95z" fill="url(#id0)" id="Rectangle"/></g></g></g></g></g></g></svg>

After

Width:  |  Height:  |  Size: 807 B

View File

@ -0,0 +1,43 @@
const packageSlider = document.querySelector('.packages-slider');
$(packageSlider).owlCarousel({
responsive: {
0 : {
margin: 10,
items: 1,
stagePadding: 60,
dots: false,
loop: true,
},
360: {
margin: 10,
items: 1,
stagePadding: 60,
dots: false,
loop:true,
autoWidth: false
},
480 : {
margin: 10,
stagePadding: 60,
items: 1,
nav: false,
dots: false,
normal: true
},
769 : {
margin: 30,
items: 3,
normal: true,
nav: false,
dots: false
},
1025 : {
margin: 30,
items: 3,
normal: true,
nav: false,
dots: false
}
}
});

View File

@ -1 +1,80 @@
@import "../parts/compound" @import "../parts/compound"
@import "../parts/packages"
.quest-description
margin-top: 40px
margin-bottom: 40px
font-family: 'PT Sans', sans-serif
&__icons
div
display: flex
flex-direction: column
justify-content: center
align-items: center
margin-bottom: 20px
padding-bottom: 20px
border-bottom: 1px solid #e6e6e6
font-size: 16px
color: #000000
&:nth-child(3)
border: none
img
margin-bottom: 15px
&__text
max-width: 800px
p
font-size: 20px
line-height: 1.4
letter-spacing: 0.2px
color: #363943
.notice
margin-top: 30px
p
font-size: 16px !important
color: #000000
font-style: italic
letter-spacing: -0.6px
.owl-item
display: flex
justify-content: center
.packages-item
height: 740px !important
@media screen and (max-width: 1200px)
.quest-description
&__text
p
font-size: 16px !important
.notice
p
font-size: 14px !important
letter-spacing: -0.6px
@media screen and (max-width: 768px)
.quest-description
&__icons
padding: 0
display: flex
flex-direction: row
justify-content: center
align-items: center
div
width: 33%
border: none
border-right: 1px solid #e6e6e6
&__text
padding: 0
.notice
p
line-height: 1.1
@media screen and (max-width: 576px)
.quest-description
&__text
padding: 0 15px
.packages-item
height: 670px

View File

@ -33,22 +33,29 @@
padding-top: 35px padding-top: 35px
&-container &-container
.owl-item .owl-item
&:nth-child(4n+2) .arkids
h3 h3
color: #5CBAE9 color: #5CBAE9 !important
button
color: #ffffff
a a
background: url('../../img/icons/arkids.svg') center 1px no-repeat background: url('../../img/icons/arkids.svg') center 1px no-repeat !important
background-size: 102% .zhezl
&:nth-child(2n+3)
h3 h3
color: #F08D37 color: #F08D37 !important
button
color: #ffffff
a a
background: url('../../img/icons/faraon.svg') center 1px no-repeat background: url('../../img/icons/faraon.svg') center 1px no-repeat !important
background-size: 102% .eger
h3
color: red
a
background: url('../../img/icons/eger.svg') center 1px no-repeat !important
.owl-item .ent-container__quest.departure
h3
color: #33cc33 !important
button
color: #ffffff !important
a
background: url('../../img/icons/departure-quests.svg') center 1px no-repeat !important
h2 h2
margin: 0 margin: 0
text-align: center text-align: center
@ -140,6 +147,10 @@
@media screen and (max-width: 576px) @media screen and (max-width: 576px)
.ent-container__quest-content
br
display: none
.ent .ent
margin-top: 0 margin-top: 0
padding-top: 40px !important padding-top: 40px !important
@ -166,7 +177,7 @@
font-size: 14px !important font-size: 14px !important
.owl-item .owl-item
// background-size: cover // background-size: cover
&:nth-child(3n+1) .arkids
h3 h3
color: #5CBAE9 color: #5CBAE9
a a
@ -174,7 +185,7 @@
background: url('../../img/icons/arkids.svg') center 1px no-repeat background: url('../../img/icons/arkids.svg') center 1px no-repeat
button button
color: #ffffff color: #ffffff
&:nth-child(3n+2) .zhezl
h3 h3
color: #F08D37 color: #F08D37
a a
@ -182,7 +193,7 @@
background: url('../../img/icons/faraon.svg') center 1px no-repeat background: url('../../img/icons/faraon.svg') center 1px no-repeat
button button
color: #ffffff color: #ffffff
&:nth-child(3n) .eger
h3 h3
color: red color: red
a a
@ -190,3 +201,12 @@
background: url('../../img/icons/eger.svg') center 1px no-repeat !important background: url('../../img/icons/eger.svg') center 1px no-repeat !important
button button
color: #ffffff color: #ffffff
.owl-item .ent-container__quest.departure
h3
color: #33cc33
button
color: #ffffff
a
background: url('../../img/icons/departure-quests.svg') center 1px no-repeat
background-size: 360px 70px

View File

@ -0,0 +1,15 @@
<?php
/*
* Template Name: Выездные квесты/Departure quests
*/
?>
<?php
get_header();
get_template_part('parts/quests/quests-header');
get_template_part('parts/departure-quests/description');
get_template_part('parts/departure-quests/packages');
get_template_part('parts/departure-quests/gallery');
get_template_part('parts/home/order');
get_template_part('parts/quests/compound');
get_footer();
?>