feat: added why-program

gh-pages
Aliaksei Karzhou 1 year ago
parent 000de26ee4
commit 2c63221d7e
  1. 231
      assets/css/index.css
  2. 9
      assets/img/12-steps-bg.svg
  3. 26
      assets/js/sliders.js
  4. 235
      assets/scss/_l-why-program.scss
  5. 1
      assets/scss/index.scss
  6. 109
      index.html

@ -1332,3 +1332,234 @@ h3 {
text-align: center; text-align: center;
} }
} }
.why-program {
margin: 111px 0 114px;
}
@media (max-width: 768px) {
.why-program {
margin: 74px 0 89px;
}
}
.why-program .container {
position: relative;
}
.why-program__title {
margin: 21px 0 27px;
}
@media (max-width: 768px) {
.why-program__title {
margin: 21px 0 23px;
}
}
.why-program__video {
position: absolute;
top: 515px;
left: 16px;
right: 16px;
padding: 0 48px 32px;
overflow: hidden;
border-radius: 80px 40px;
background: url(../img/12-steps-bg.svg) right 12px bottom -70px no-repeat;
background-color: #609eff;
}
@media (max-width: 1240px) {
.why-program__video {
position: static;
margin: 0 0 30px;
}
}
@media (max-width: 992px) {
.why-program__video {
padding: 0 24px 24px;
border-radius: 30px 11px;
background: #609eff;
}
}
@media (max-width: 768px) {
.why-program__video {
font-size: 17px;
text-align: center;
}
}
.why-program__video-content {
height: 573px;
margin: 0 -48px 30px;
background-color: #878787;
}
@media (max-width: 992px) {
.why-program__video-content {
margin: 0 -24px 30px;
height: auto;
width: calc(100% + 48px);
aspect-ratio: 16/9;
}
}
.why-program__video-content > * {
display: block;
height: 100%;
width: 100%;
}
.why-program__video-text {
max-width: 812px;
font-weight: 500;
font-size: 24px;
line-height: 146%;
color: #ffffff;
}
@media (max-width: 992px) {
.why-program__video-text {
max-width: none;
}
}
@media (max-width: 768px) {
.why-program__video-text {
font-size: 17px;
text-align: center;
}
}
.why-program__video-text > b {
font-weight: 700;
}
.why-program__slider .swiper {
overflow: visible;
}
@media (max-width: 992px) {
.why-program__slider .swiper {
overflow: hidden;
}
}
.why-program__slider .swiper-wrapper {
position: static;
flex-wrap: wrap;
}
@media screen and (min-width: 992.1px) {
.why-program__slider .swiper-wrapper {
gap: 40px 30px;
}
}
@media (max-width: 992px) {
.why-program__slider .swiper-wrapper {
position: relative;
flex-wrap: nowrap;
}
}
.why-program__slider .swiper-slide {
position: static;
height: auto;
}
@media screen and (min-width: 992.1px) {
.why-program__slider .swiper-slide {
flex: 0 0 calc(33.3333333333% - 20px);
}
}
@media (max-width: 992px) {
.why-program__slider .swiper-slide {
position: relative;
}
}
.why-program__slider .swiper-slide:nth-child(-n+3) {
margin-bottom: 812px;
}
@media (max-width: 1240px) {
.why-program__slider .swiper-slide:nth-child(-n+3) {
margin: 0;
}
}
@media screen and (min-width: 1240.1px) {
.why-program__slider .swiper-slide:nth-child(1) {
flex: 0 1 27%;
}
}
@media screen and (min-width: 1240.1px) {
.why-program__slider .swiper-slide:nth-child(2) {
flex: 0 1 30%;
}
}
@media screen and (min-width: 1240.1px) {
.why-program__slider .swiper-slide:nth-child(3) {
flex: 1 1 30%;
}
}
@media screen and (min-width: 1240.1px) {
.why-program__slider .swiper-slide:nth-child(4) {
flex: 0 1 31%;
}
}
@media screen and (min-width: 1240.1px) {
.why-program__slider .swiper-slide:nth-child(5) {
flex: 0 1 33%;
}
}
@media screen and (min-width: 1240.1px) {
.why-program__slider .swiper-slide:nth-child(6) {
flex: 1 1 27%;
}
}
.why-program__slide {
height: 100%;
padding: 31px 38px;
box-sizing: border-box;
border-radius: 22px 40px;
background-color: #ffffff;
}
@media (max-width: 992px) {
.why-program__slide {
padding: 24px;
}
}
.why-program__slide-count {
margin: 0 0 6px;
font-weight: 700;
font-size: 59px;
line-height: 127%;
letter-spacing: 0.05em;
color: #ffffff;
-webkit-text-stroke: 1px #609eff;
}
@media (max-width: 992px) {
.why-program__slide-count {
text-align: center;
}
}
@media (max-width: 576px) {
.why-program__slide-count {
font-size: 50px;
}
}
.why-program__slide-title {
margin: 0 0 9px;
}
@media (max-width: 992px) {
.why-program__slide-title {
text-align: center;
}
}
.why-program__slide-text {
margin: 0;
font-weight: 400;
font-size: 17px;
line-height: 146%;
color: #878787;
}
.why-program__slide-text > b {
font-weight: 600;
}
@media (max-width: 992px) {
.why-program__slide-text {
font-size: 15px;
text-align: center;
}
}
.why-program__slider-controls {
display: none;
justify-content: center;
align-items: center;
gap: 24px;
margin: 35px 0 0;
}
@media (max-width: 992px) {
.why-program__slider-controls {
display: flex;
}
}

@ -0,0 +1,9 @@
<svg width="342" height="342" viewBox="0 0 342 342" fill="none" xmlns="http://www.w3.org/2000/svg">
<g opacity="0.44">
<path opacity="0.921" fill-rule="evenodd" clip-rule="evenodd" d="M99.8615 11.6892C80.1571 10.2297 67.5766 18.9133 62.1213 37.74C60.084 56.9417 68.2111 69.522 86.5021 75.4803C100.671 78.1067 112.138 73.7649 120.903 62.4549C129.945 45.8146 127.607 31.008 113.889 18.035C109.476 15.1576 104.8 13.0424 99.8615 11.6892ZM98.5255 21.7088C85.1949 20.688 76.3998 26.4771 72.1408 39.076C70.9157 56.5529 79.0429 65.5705 96.5216 66.1287C108.554 63.6697 115.233 56.3221 116.561 44.0857C115.274 32.681 109.262 25.222 98.5255 21.7088Z" fill="white"/>
<path opacity="0.921" fill-rule="evenodd" clip-rule="evenodd" d="M178.014 75.8143C157.529 75.7028 137.044 75.8143 116.561 76.1483C109.316 76.7067 103.638 79.9357 99.5276 85.8338C93.713 98.9093 87.8128 111.935 81.8265 124.91C64.9048 125.132 47.9825 125.356 31.0608 125.578C16.7884 128.957 10.6651 137.974 12.6917 152.631C14.6896 160.418 19.4769 165.65 27.053 168.328C39.7117 169.091 52.4031 169.425 65.1272 169.33C77.8514 169.425 90.5428 169.091 103.201 168.328C110.687 165.517 115.696 160.285 118.231 152.631C121.219 159.589 124.335 166.492 127.582 173.338C128.104 174.302 127.992 175.193 127.248 176.01C114.821 181.333 102.576 187.01 90.5101 193.043C82.3181 201.334 80.6482 210.797 85.5003 221.432C95.9654 244.588 106.43 267.744 116.895 290.9C122.863 298.756 130.768 301.762 140.608 299.918C154.263 295.213 159.495 285.75 156.305 271.529C148.932 254.891 141.473 238.304 133.928 221.765C137.834 219.701 141.842 217.809 145.951 216.088C161.697 250.5 177.395 285.011 193.043 319.623C198.862 327.8 206.767 331.029 216.756 329.308C229.786 324.968 235.242 315.95 233.121 302.256C206.522 241.374 179.469 180.701 151.963 120.234C155.471 119.697 158.922 119.809 162.317 120.568C169.509 137.039 177.079 153.293 185.028 169.33C194.006 177.631 203.915 178.856 214.752 173.004C223.875 165.243 226.213 155.78 221.766 144.615C212.792 124.137 203.44 103.876 193.711 83.8299C189.365 79.2644 184.133 76.5925 178.014 75.8143ZM177.346 85.8338C157.306 85.7223 137.267 85.8338 117.229 86.1678C113.054 86.8618 109.826 88.9773 107.543 92.5135C101.324 106.497 94.9788 120.413 88.5062 134.262C69.638 135.141 50.7125 135.587 31.7288 135.598C23.987 138.05 20.9812 143.282 22.7112 151.295C24.4386 155.027 27.222 157.588 31.0608 158.976C53.7718 159.422 76.4827 159.422 99.1937 158.976C102.038 158.052 104.376 156.382 106.207 153.967C108.879 148.177 111.551 142.389 114.223 136.599C116.718 134.306 119.279 134.195 121.905 136.265C127.891 149.241 133.791 162.266 139.606 175.342C140.339 178.017 139.783 180.355 137.936 182.355C124.52 188.237 111.161 194.249 97.8577 200.39C92.4659 205.307 91.4639 210.984 94.8519 217.424C105.094 240.135 115.336 262.846 125.578 285.557C132.036 291.791 138.492 291.791 144.95 285.557C147.373 281.755 147.818 277.747 146.285 273.533C138.492 256.166 130.7 238.799 122.907 221.432C121.452 217.122 122.899 214.339 127.248 213.082C133.339 210.594 139.351 207.922 145.283 205.066C148.589 203.296 151.372 203.853 153.633 206.736C169.78 243.592 186.368 280.219 203.397 316.617C211.752 321.876 218.321 320.206 223.102 311.607C223.643 308.43 223.42 305.312 222.434 302.256C194.433 239.91 166.713 177.455 139.272 114.89C139.478 112.013 141.036 110.454 143.948 110.215C152.233 109.587 160.472 109.81 168.662 110.883C176.641 127.845 184.546 144.878 192.375 161.982C198.833 168.216 205.289 168.216 211.746 161.982C214.559 157.66 214.781 153.207 212.414 148.623C203.993 130.221 195.755 111.741 187.7 93.1815C185.396 88.98 181.945 86.5305 177.346 85.8338Z" fill="white"/>
<path opacity="0.925" fill-rule="evenodd" clip-rule="evenodd" d="M306.931 137.267C282.661 137.156 258.391 137.267 234.123 137.601C229.369 140.005 228.925 143.122 232.787 146.953C257.947 147.399 283.107 147.399 308.267 146.953C312.087 143.024 311.642 139.796 306.931 137.267Z" fill="white"/>
<path opacity="0.989" fill-rule="evenodd" clip-rule="evenodd" d="M328.307 165.99C296.911 165.879 265.517 165.99 234.123 166.324C231.451 169.218 231.451 172.113 234.123 175.008C265.518 175.453 296.912 175.453 328.307 175.008C330.951 172.002 330.951 168.997 328.307 165.99Z" fill="white"/>
<path opacity="0.923" fill-rule="evenodd" clip-rule="evenodd" d="M282.885 194.045C257.724 193.933 232.563 194.045 207.404 194.379C204.598 196.399 204.041 198.96 205.734 202.06C206.338 202.863 207.116 203.42 208.072 203.73C232.565 204.176 257.056 204.176 281.549 203.73C284.072 203.21 285.408 201.652 285.557 199.055C285.271 197.035 284.381 195.365 282.885 194.045Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

@ -1,4 +1,5 @@
let factsSwiper = null; let factsSwiper = null;
let whyProgramSwiper = null;
let init = false; let init = false;
@ -31,9 +32,34 @@ function swiperMode() {
prevEl: '.facts .button--prev', prevEl: '.facts .button--prev',
}, },
}); });
whyProgramSwiper = new Swiper('.why-program .swiper', {
loop: true,
slidesPerView: 1,
spaceBetween: 30,
breakpoints: {
320: {
slidesPerView: 1.2,
},
480: {
slidesPerView: 1.4,
},
576: {
slidesPerView: 2,
},
700: {
slidesPerView: 2.4,
},
},
navigation: {
nextEl: '.why-program .button--next',
prevEl: '.why-program .button--prev',
},
});
} }
} else { } else {
if (factsSwiper !== null) factsSwiper.destroy(); if (factsSwiper !== null) factsSwiper.destroy();
if (whyProgramSwiper !== null) whyProgramSwiper.destroy();
init = false; init = false;
} }
} }

@ -0,0 +1,235 @@
.why-program {
margin: 111px 0 114px;
@include tablet {
margin: 74px 0 89px;
}
& .container {
position: relative;
}
&__title {
margin: 21px 0 27px;
@include tablet {
margin: 21px 0 23px;
}
}
&__video {
position: absolute;
top: 515px;
left: 16px;
right: 16px;
padding: 0 48px 32px;
overflow: hidden;
border-radius: 80px 40px;
background: url(../img/12-steps-bg.svg) right 12px bottom -70px no-repeat;
background-color: $blue;
@include desktop {
position: static;
margin: 0 0 30px;
}
@include laptop {
padding: 0 24px 24px;
border-radius: 30px 11px;
background: $blue;
}
@include tablet {
font-size: 17px;
text-align: center;
}
&-content {
height: 573px;
margin: 0 -48px 30px;
background-color: $grey;
@include laptop {
margin: 0 -24px 30px;
height: auto;
width: calc(100% + 48px);
aspect-ratio: 16 / 9;
}
& > * {
display: block;
height: 100%;
width: 100%;
}
}
&-text {
max-width: 812px;
font-weight: 500;
font-size: 24px;
line-height: 146%;
color: $white;
@include laptop {
max-width: none;
}
@include tablet {
font-size: 17px;
text-align: center;
}
& > b {
font-weight: 700;
}
}
}
&__slider {
& .swiper {
overflow: visible;
@include laptop {
overflow: hidden;
}
&-wrapper {
position: static;
flex-wrap: wrap;
@media screen and (min-width: 992.1px) {
gap: 40px 30px;
}
@include laptop {
position: relative;
flex-wrap: nowrap;
}
}
&-slide {
position: static;
height: auto;
@media screen and (min-width: 992.1px) {
flex: 0 0 calc(100% / 3 - 30px / 3 * 2);
}
@include laptop {
position: relative;
}
&:nth-child(-n + 3) {
margin-bottom: 812px;
@include desktop {
margin: 0;
}
}
&:nth-child(1) {
@media screen and (min-width: 1240.1px) {
flex: 0 1 27%;
}
}
&:nth-child(2) {
@media screen and (min-width: 1240.1px) {
flex: 0 1 30%;
}
}
&:nth-child(3) {
@media screen and (min-width: 1240.1px) {
flex: 1 1 30%;
}
}
&:nth-child(4) {
@media screen and (min-width: 1240.1px) {
flex: 0 1 31%;
}
}
&:nth-child(5) {
@media screen and (min-width: 1240.1px) {
flex: 0 1 33%;
}
}
&:nth-child(6) {
@media screen and (min-width: 1240.1px) {
flex: 1 1 27%;
}
}
}
}
}
&__slide {
height: 100%;
padding: 31px 38px;
box-sizing: border-box;
border-radius: 22px 40px;
background-color: $white;
@include laptop {
padding: 24px;
}
&-count {
margin: 0 0 6px;
font-weight: 700;
font-size: 59px;
line-height: 127%;
letter-spacing: 0.05em;
color: $white;
-webkit-text-stroke: 1px $blue;
@include laptop {
text-align: center;
}
@include mobile {
font-size: 50px;
}
}
&-title {
margin: 0 0 9px;
@include laptop {
text-align: center;
}
}
&-text {
margin: 0;
font-weight: 400;
font-size: 17px;
line-height: 146%;
color: $grey;
& > b {
font-weight: 600;
}
@include laptop {
font-size: 15px;
text-align: center;
}
}
}
&__slider-controls {
display: none;
justify-content: center;
align-items: center;
gap: 24px;
margin: 35px 0 0;
@include laptop {
display: flex;
}
}
}

@ -23,3 +23,4 @@
@import './l-reviews'; @import './l-reviews';
@import './l-step-by-step'; @import './l-step-by-step';
@import './l-twelve-steps'; @import './l-twelve-steps';
@import './l-why-program';

@ -833,6 +833,115 @@
</div> </div>
</div> </div>
</section> </section>
<section class="why-program">
<div class="container">
<div class="tag">Эффективность программы</div>
<h2 class="why-program__title">
Почему программа 12 шагов <br />
<span>эффективна для лечения зависимостей</span>
</h2>
<div class="why-program__video">
<div class="why-program__video-content">
<iframe
width="560"
height="315"
src="https://www.youtube.com/embed/XIMLoLxmTDw?si=wFzm5etjCkaNdMl5"
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerpolicy="strict-origin-when-cross-origin"
allowfullscreen
></iframe>
</div>
<div class="why-program__video-text">
<b>
Ее принципы основаны на самопомощи, взаимной поддержке и укреплении силы воли через
самовнушение или веру во внешние силы по выбору человека.
</b>
Программа нацелена не только на избавление от конкретной зависимости, но и на
выработку новых сценариев жизни, в которых нет места пагубной привычке
</div>
</div>
<div class="why-program__slider">
<div class="swiper">
<div class="swiper-wrapper">
<div class="swiper-slide">
<div class="why-program__slide">
<h3 class="why-program__slide-title">Компклесный подход</h3>
<p class="why-program__slide-text">
Участник программы проходит детоксикацию организма под наблюдением врача, а
также избавляется от триггеров провоцирующих зависимость
</p>
</div>
</div>
<div class="swiper-slide">
<div class="why-program__slide">
<h3 class="why-program__slide-title">Восстановление личности</h3>
<p class="why-program__slide-text">
Повышается самооценка, восстанавливается гармония и баланс в жизни,
вырабатываются новые здоровые жизненные ценности и приоритеты
</p>
</div>
</div>
<div class="swiper-slide">
<div class="why-program__slide">
<h3 class="why-program__slide-title">Формирование новых стратегий</h3>
<p class="why-program__slide-text">
Участники учатся управлять желаниями и эмоциями, распознавать триггеры,
провоцирующие тягу. Они вырабатывают новые здоровые стратегии построения жизни
без зависимостей
</p>
</div>
</div>
<div class="swiper-slide">
<div class="why-program__slide">
<h3 class="why-program__slide-title">Устранение первопричин</h3>
<p class="why-program__slide-text">
Человек осознает истоки зависимого поведения: деструктивные внутренние
убеждения, психологические травмы, стрессовые ситуации из прошлого. Это
помогает предотвратить будущие срывы после реабилитации
</p>
</div>
</div>
<div class="swiper-slide">
<div class="why-program__slide">
<h3 class="why-program__slide-title">Пожизненное сопровождение</h3>
<p class="why-program__slide-text">
После завершения программы центр продолжает сопровождать выпускников, помогая
им с ресоциализацией, трудоустройством, налаживанием быта. Организуются
регулярные встречи, консультации в случае рецидивов
</p>
</div>
</div>
<div class="swiper-slide">
<div class="why-program__slide">
<h3 class="why-program__slide-title">Групповая поддержка</h3>
<p class="why-program__slide-text">
Участники мотивируют и вдохновляют друг друга. На примере реальных ситуаций
они отрабатывают навыки преодоления тяги и могут получить помощь тех, кто уже
прошел этот путь
</p>
</div>
</div>
</div>
</div>
</div>
<div class="why-program__slider-controls">
<button class="button button--prev"></button>
<button class="button button--next"></button>
</div>
</div>
</section>
</main> </main>
<script src="./assets/js/swiper-bundle.min.js" defer></script> <script src="./assets/js/swiper-bundle.min.js" defer></script>

Loading…
Cancel
Save