2026-10-08 GLOBAL

This commit is contained in:
Dekart Deploy Bot 2026-10-08 17:37:39 +00:00
parent b233efce60
commit 0b220e0031
19 changed files with 18973 additions and 2850 deletions

View File

@ -0,0 +1,928 @@
/* removed dead legacy */
.info-block {
margin: 0 auto;
max-width: 1185px !important;
margin-top: -35px !important;
padding: 0 !important;
display: flex;
flex-wrap: wrap;
gap: 2px;
justify-content: center;
}
.info-block__item {
position: relative;
min-width: 180px;
max-width: 195px;
height: 120px;
display: flex;
align-items: center;
border-radius: 15px;
flex: 1;
flex-wrap: wrap;
}
.info-block__item-wrapper {
width: calc(100% - 10px);
height: calc(100% - 10px);
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
padding: 0 10px;
border: 2px solid #006DB7;
}
.info__block-item_number {
width: 48px;
height: 48px;
background: #FFFFFF;
border: 2px solid #013051;
display: flex;
color: #000;
font-family: 'Oswald';
font-weight: 600;
font-size: 22px;
border-radius: 50%;
flex-shrink: 0;
align-items: center;
justify-content: center;
}
.section-Mntitle-circle {
position: relative;
font-family: 'Oswald';
font-weight: 500;
font-size: 45px;
line-height: 55px;
display: flex;
align-items: center;
text-align: center;
color: #212121;
justify-content: center;
width: fit-content;
margin: 0 auto;
z-index: 1;
}
.disciplines__item {
flex: 1;
max-width: calc(25% - 50px);
min-width: 280px;
height: 300px;
padding: 30px 50px;
background: #FFFFFF;
border-radius: 20px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 30px;
border: 1px solid transparent;
transition: .3s;
}
/* preparation-block */
.preparation-block {
padding: 70px 0 100px;
background-color: #fff;
}
.preparation-block p {
padding-top: 40px;
font-family: 'Roboto';
font-weight: 300;
font-size: 18px;
line-height: 21px;
width: 85%;
}
/* preparation-block END */
/* advertising-block */
.advertising-block {
padding: 35px 0;
background-color: #1F1F1F;
color: #fff;
}
.advertising-block__text_text {
margin: 34px 0 50px;
font-weight: 400;
font-size: 18px;
line-height: 21px;
}
.teacher-description_text {
position: relative;
font-weight: 400;
font-size: 14px;
line-height: 22px;
padding-left: 20px;
padding-right: 20px;
}
.teacher-description_text::after {
content: '';
position: absolute;
top: 0;
left: 10px;
height: 100%;
width: 3px;
background: var(--main-background);
border-radius: 5px;
}
.teacher__rating {
position: relative;
width: 100%;
margin-top: 40px;
display: flex;
flex-direction: column;
align-items: center;
}
.teacher__rating-img {
position: relative;
top: 6px;
width: 260px;
border-radius: 46px;
overflow: hidden;
height: 260px;
margin-bottom: 16px;
display: flex;
align-items: center;
justify-content: center;
}
.teacher_stars {
padding-top: 18px;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
gap: 6px;
font-weight: 500;
font-size: 18px;
z-index: 1;
line-height: 28px;
background: #fff;
}
.teacher_name-wrapper {
position: relative;
margin-top: -14px;
width: 100%;
padding: 12px 0 18px;
background: #FFFFFF;
border-radius: 20px;
margin-bottom: 18px;
}
.teacher_name {
font-size: 22px;
color: var(--main-background) !important;
text-align: center;
width: 100%;
text-transform: uppercase;
line-height: 22px;
margin-bottom: 0;
justify-content: center;
background: #fff;
padding-top: 12px;
border-radius: 20px 20px 0 0;
}
.teacher-description_location {
width: 100%;
font-weight: 500;
font-size: 18px;
line-height: 28px;
text-align: center;
color: #A0A0A0;
z-index: 1;
background: #fff;
}
/* block-call END */
/* teacher-about */
.teacher-about {
padding-bottom: 22px;
}
.certificates_title {
margin-top: 18px;
font-size: 20px;
font-weight: 400;
line-height: 28px;
text-transform: uppercase;
color: #000;
text-align: center;
}
.page-rewiews {
background-color: #fff;
}
.about-teacher {
padding: 9px 9px !important;
margin-top: -70px !important;
}
.about-teacher-wrapper {
position: relative;
padding: 54px 75px 50px 90px;
display: flex;
gap: 90px;
background: #fff;
border-radius: 16px;
}
.teacher-description_text::after {
left: 0px;
}
.teacher_stars {
margin-top: 11px;
padding: 0;
}
.teacher__rating {
margin-top: 0;
height: auto;
background: #FFFFFF;
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
border-radius: 90px 90px 0 0;
padding-bottom: 5px;
}
.teacher__rating-img {
position: unset;
width: 100%;
height: 300px;
margin-bottom: 0;
}
.teacher_name-wrapper {
margin-top: 0;
padding: 0;
}
.teacher_name {
text-align: left;
font-family: 'Oswald';
font-style: normal;
font-size: 40px;
line-height: normal;
text-transform: uppercase;
margin-bottom: 40px;
justify-content: flex-start;
}
.teacher-about {
margin-top: 60px;
}
.certificates_title {
margin-top: 0px;
font-size: 26px;
margin-bottom: 26px;
}
.teacher-description_text {
font-family: 'Roboto';
font-weight: 400;
font-size: 26px;
line-height: 26px;
padding: 10px 0 10px 20px;
}
.banner-circle {
position: absolute;
border-radius: 50%;
background-color: #fff;
display: flex;
flex-direction: column;
gap: 10px;
font-family: 'Roboto';
display: flex;
align-items: center;
justify-content: center;
box-shadow: -2px 2px 2px rgba(0, 0, 0, 0.25);
}
.main-text-color {
font-weight: 900;
font-size: 40px;
background: radial-gradient(97.18% 216.64% at 17.11% 28.58%, #BF568E 0%, #975B97 21%, #006DB7 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
text-align: center;
line-height: 30px;
}
.cat-wrapper_item {
padding: 14px 40px;
font-weight: 400;
font-size: 18px;
line-height: 22px;
color: #000;
background-color: #F3F3F3;
border-radius: 25px;
cursor: pointer;
}
.block-new_title {
flex: 1;
height: calc(100% - 16px);
padding: 20px 10px;
font-family: 'Roboto';
font-size: 16px;
line-height: 18px;
display: flex;
align-items: center;
text-transform: uppercase;
border: 1px solid var(--main-blue);
border-radius: 0 10px 10px 0;
border-left: none;
background-color: #fff;
color: #000;
}
.about-col_item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 23px 28px;
background: #FFFFFF;
border-radius: 20px;
box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.1);
font-family: 'Roboto';
font-weight: 500;
font-size: 22px;
line-height: 26px;
color: #000000;
}
@media (width > 860px) and (width < 1280px) {
.info-block {
max-width: 92.58vw !important;
margin-top: -2.73vw !important;
gap: .16vw;
}
.info-block__item {
min-width: 14.06vw;
max-width: 15.23vw;
height: 9.38vw;
border-radius: 1.17vw;
}
.info-block__item-wrapper {
width: calc(100% - .78vw);
height: calc(100% - .78vw);
border-radius: .78vw;
padding: 0 .78vw;
border: .16vw solid #006DB7;
}
.info__block-item_number {
width: 3.75vw;
height: 3.75vw;
border: .16vw solid #013051;
font-size: 1.72vw;
}
.section-Mntitle-circle {
font-size: 3.52vw;
line-height: 4.3vw;
}
.disciplines__item {
max-width: calc(25% - 3.91vw);
min-width: 21.88vw;
height: 23.44vw;
padding: 2.34vw 3.91vw;
border-radius: 1.56vw;
gap: 2.34vw;
border: .08vw solid transparent;
}
.preparation-block {
padding: 5.47vw 0 7.81vw;
}
.preparation-block p {
padding-top: 3.13vw;
font-size: 1.41vw;
line-height: 1.64vw;
}
.advertising-block {
padding: 2.73vw 0;
}
.advertising-block__text_text {
margin: 2.66vw 0 3.91vw;
font-size: 1.41vw;
line-height: 1.64vw;
}
.teacher-description_text {
font-size: 1.09vw;
line-height: 1.72vw;
padding-left: 1.56vw;
padding-right: 1.56vw;
}
.teacher-description_text::after {
left: .78vw;
width: .23vw;
border-radius: .39vw;
}
.teacher__rating {
margin-top: 3.13vw;
}
.teacher__rating-img {
border-radius: 3.59vw;
height: 20.31vw;
margin-bottom: 1.25vw;
}
.teacher_stars {
padding-top: 1.41vw;
gap: .47vw;
font-size: 1.41vw;
line-height: 2.19vw;
}
.teacher_name {
font-size: 1.72vw;
line-height: 1.72vw;
padding-top: .94vw;
border-radius: 1.56vw 1.56vw 0 0;
}
.teacher-description_location {
font-size: 1.41vw;
line-height: 2.19vw;
}
.teacher-about {
padding-bottom: 1.72vw;
}
.certificates_title {
margin-top: 1.41vw;
font-size: 1.56vw;
line-height: 2.19vw;
}
.about-teacher {
padding: .7vw .7vw !important;
margin-top: -5.47vw !important;
}
.about-teacher-wrapper {
padding: 4.22vw 5.86vw 3.91vw 7.03vw;
gap: 7.03vw;
border-radius: 1.25vw;
}
.teacher-description_text::after {
left: 0vw;
}
.teacher_stars {
margin-top: .86vw;
}
.teacher__rating {
box-shadow: 0vw .31vw .31vw rgba(0, 0, 0, 0.25);
border-radius: 7.03vw 7.03vw 0 0;
padding-bottom: .39vw;
}
.teacher__rating-img {
height: 23.44vw;
}
.teacher_name {
font-size: 3.13vw;
margin-bottom: 3.13vw;
}
.teacher-about {
margin-top: 4.69vw;
}
.certificates_title {
margin-top: 0vw;
font-size: 2.03vw;
margin-bottom: 2.03vw;
}
.teacher-description_text {
font-size: 2.03vw;
line-height: 2.03vw;
padding: .78vw 0 .78vw 1.56vw;
}
.banner-circle {
gap: .78vw;
box-shadow: -.16vw .16vw .16vw rgba(0, 0, 0, 0.25);
}
.main-text-color {
font-size: 3.13vw;
line-height: 2.34vw;
}
.cat-wrapper_item {
padding: 1.09vw 3.13vw;
font-size: 1.41vw;
line-height: 1.72vw;
border-radius: 1.95vw;
}
.block-new_title {
height: calc(100% - 1.25vw);
padding: 1.56vw .78vw;
font-size: 1.25vw;
line-height: 1.41vw;
border: .08vw solid var(--main-blue);
border-radius: 0 .78vw .78vw 0;
}
.about-col_item {
padding: 1.8vw 2.19vw;
border-radius: 1.56vw;
box-shadow: .23vw .23vw .78vw rgba(0, 0, 0, 0.1);
font-size: 1.72vw;
line-height: 2.03vw;
}
}
@media (max-width: 860px) {
.info-block {
margin-top: 0 !important;
padding: 0 10px !important;
}
.info-block__item {
width: 50%;
min-width: 250px;
max-width: none;
border-radius: 10px;
flex: 1;
height: auto;
}
.info-block__item-wrapper {
width: calc(100% - 4px);
height: calc(100% - 4px);
border-radius: 4px;
padding: 6px;
}
.section-Mntitle-circle {
font-size: 26px;
line-height: 30px;
}
.disciplines__item {
flex: 0;
max-width: none;
min-width: auto;
min-width: calc(33% - 6px);
height: auto;
padding: 15px 0px 5px;
gap: 10px;
aspect-ratio: 1/1;
}
.info__block-item_number {
width: 35px;
height: 35px;
font-size: 16px;
}
.preparation-block {
padding: 60px 0;
}
.preparation-block p {
padding-top: 20px;
font-family: 'Roboto';
font-size: 16px;
line-height: normal;
width: 100%;
margin: 0;
}
.advertising-block {
position: relative;
padding: 35px 0 85px;
}
.advertising-block__text_text {
margin: 18px 0;
font-size: 16px;
line-height: normal;
text-align: center;
}
.advertising-label {
position: absolute;
bottom: 40px;
padding: 10px 40px;
display: flex;
flex-direction: column;
gap: 6px;
background-color: #303030;
border-radius: 15px;
align-items: center;
}
.advertising-label span {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-size: 14px;
line-height: 20px;
text-transform: uppercase;
color: #FFFFFF;
}
.banner-circle {
position: initial;
width: calc(33% - 10px);
height: auto;
aspect-ratio: 1/1;
}
.main-text-color {
font-size: 22px;
line-height: 18px;
}
.cat-wrapper_item {
padding: 9px 24px;
font-size: 16px;
flex-shrink: 0;
}
.block-new_title {
margin: 8px 0;
padding: 10px;
font-size: 12px;
}
.about-col_item {
position: relative;
padding: 10px 28px;
font-size: 18px;
line-height: normal;
flex-direction: column;
align-items: center;
gap: 5px;
}
.teacher-about {
padding-bottom: 0;
}
.teacher-about {
padding-bottom: 0;
margin-top: 0;
}
.about-teacher-wrapper {
position: relative;
padding: 0;
display: flex;
gap: 20px;
background: #fff;
border-radius: 0;
flex-direction: column;
}
.teacher-description_text {
position: relative;
font-weight: 400;
font-size: 14px;
line-height: 22px;
padding-left: 20px;
padding-right: 20px;
}
.teacher-description_text::after {
content: '';
position: absolute;
top: 0;
left: 10px;
height: 100%;
width: 3px;
background: var(--main-background);
border-radius: 5px;
}
.teacher__rating {
position: relative;
width: 100%;
margin-top: 10px;
display: flex;
flex-direction: column;
align-items: center;
background: transparent;
border-radius: 0;
box-shadow: none;
}
.teacher__rating-img {
position: relative;
top: 6px;
width: 260px;
border-radius: 50px;
overflow: hidden;
height: 260px;
margin-bottom: 16px;
display: flex;
align-items: center;
justify-content: center;
}
.teacher_stars {
padding-top: 18px;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
gap: 6px;
font-weight: 500;
font-size: 18px;
z-index: 1;
line-height: 28px;
background: #fff;
margin-top: 0;
}
.teacher_name-wrapper {
position: relative;
margin-top: -14px;
width: 100%;
padding: 12px 0 18px;
background: #FFFFFF;
border-radius: 20px;
margin-bottom: 18px;
}
.teacher_name {
font-size: 22px;
color: var(--main-background) !important;
text-align: center;
width: 100%;
text-transform: uppercase;
line-height: 22px;
margin-bottom: 0;
justify-content: center;
background: #fff;
padding-top: 12px;
border-radius: 20px 20px 0 0;
}
.teacher-description_location {
width: 100%;
font-weight: 500;
font-size: 18px;
line-height: 28px;
text-align: center;
color: #A0A0A0;
z-index: 1;
background: #fff;
}
}
.cta-final .btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 16px 40px;
background: white;
color: var(--accent);
border: none;
border-radius: var(--radius-pill);
font-size: 18px;
font-weight: 700;
font-family: 'Roboto', sans-serif;
cursor: pointer;
box-shadow: var(--shadow-lg);
transition: transform .15s;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,999 @@
/* reviews */
.teacher__stars_reviews {
color: #A0A0A0;
}
/* reviews */
.reviews {
background: #fff;
overflow: hidden;
}
.teacher-page .reviews {
padding: 40px 0;
}
.page-elementary-school .reviews .container{
background: rgba(254, 223, 111, 0.2);
border-radius: 20px;
padding: 20px 50px;
}
.reviews-wrapper {
position: relative;
display: flex;
gap: 30px 1%;
flex-wrap: wrap;
justify-content: space-between;
max-width: 1120px;
margin: 0 auto;
}
.reviews-owl {
padding: 6px;
}
.reviews__item {
position: relative;
width: 31%;
}
.page-rewiews .reviews__item-wrapper {
min-height: auto;
position: relative;
padding: 20px 40px;
display: flex;
flex-direction: column;
gap: 15px;
border-radius: 19px;
background-color: #fff;
justify-content: flex-start;
align-items: center;
}
.page-rewiews .reviews__item {
width: calc(50% - 10px);
min-height: auto;
}
.reviews__item-wrapper {
position: relative;
padding: 30px 40px 60px 70px;
display: flex;
flex-direction: column;
gap: 15px;
border-radius: 19px;
background-color: #fff;
height: 100%;
}
.reviews__item:before {
content: "";
position: absolute;
inset: -2px;
z-index: -1;
border-radius: 19px;
background: linear-gradient(90deg, #BF568E, #006DB7);
}
.page-rewiews .reviews__item::before {
content: '';
position: absolute;
top: -4px;
left: -4px;
width: calc(100% + 8px);
height: calc(100% + 8px);
background: linear-gradient(101.53deg, #BF568E 6.59%, #006DB7 94.96%);
border-radius: 24px;
z-index: 0;
}
.reviews__item-client {
display: flex;
align-items: center;
gap: 16px;
}
.reviews__item-client_avatar {
height: 50px;
width: 50px;
border-radius: 50%;
overflow: hidden;
background-color: #D9D9D9;
display: flex;
color: #fff;
align-items: center;
justify-content: center;
font-size: 28px;
font-weight: 500;
}
.reviews__item-client_avatar-img {
width: 100%;
height: auto;
object-fit: cover;
}
.reviews__item-client_name{
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: normal;
color: #000000;
}
.page-rewiews .reviews__item-client_name,
.page-rewiews .reviews__item-client_stars span,
.page-rewiews .reviews__kurs,
.page-rewiews .reviews__item-client_text {
font-size: 18px;
}
.reviews__item-client_lavel {
margin-top: 5px;
opacity: .5;
}
.reviews__item-client_stars {
margin-top: 6px;
display: flex;
align-items: center;
}
.reviews__item-client_stars span {
margin-left: 20px;
font-size: 14px;
opacity: .5;
}
.reviews__kurs {
font-weight: 500;
font-size: 16px;
line-height: 19px;
margin: 0;
}
.reviews__kurs span {
color: #7C7C7C;
}
.reviews__kurs a {
color: #000;
}
.reviews__item-client_text {
position: relative;
overflow: hidden;
font-weight: 300;
font-size: 14px;
color: #000000;
max-height: 100vw;
transition: 1s;
}
.reviews__item-client_text.more {
max-height: 95px;
}
.reviews .more .btn-more {
background: transparent;
}
.reviews_hiden {
max-height: 0px;
transition: 3s;
overflow: hidden;
}
.frame_reviews {
width: 100%;
height: 100%;
}
@media screen and (max-width: 991px) {
.reviews-wrapper {
flex-direction: column;
flex-wrap: nowrap;
gap: 30px;
align-items: center;
}
.page-rewiews .reviews__item {
width: calc(100% - 12px);
}
}
.review-block {
padding: 18px;
}
.reviews .owl-item {
padding: 6px;
}
.reviews-owl-next,
.reviews-owl-prev {
top: calc(50% + 30px);
}
.reviews-owl-next {
right: 30px;
}
.reviews-owl-prev {
left: 30px;
}
.reviews__item-client {
gap: 20px;
}
.reviews__item-client_avatar {
height: 57px;
width: 57px;
}
.reviews__kurs {
font-weight: 500;
font-size: 14px;
line-height: 19px;
letter-spacing: 0;
}
.reviews-wrapper .owl-nav {
display: flex;
justify-content: space-between;
}
.video_preview {
width: 100%;
object-fit: cover;
height: 100%;
}
@media (width > 860px) and (width < 1280px) {
.teacher-page .reviews {
padding: 3.13vw 0;
}
.page-elementary-school .reviews .container {
border-radius: 1.56vw;
padding: 1.56vw 3.91vw;
}
.reviews-wrapper {
gap: 2.34vw 1%;
max-width: 87.5vw;
}
.reviews-owl {
padding: .47vw;
}
.page-rewiews .reviews__item-wrapper {
padding: 1.56vw 3.13vw;
gap: 1.17vw;
}
.page-rewiews .reviews__item {
width: calc(50% - .78vw);
}
.reviews__item-wrapper {
padding: 2.34vw 3.13vw 4.69vw 5.47vw;
gap: 1.17vw;
border-radius: 1.48vw;
}
.reviews__item-wrapper:before {
inset: -.16vw;
border-radius: 1.48vw;
}
.reviews__item::before {
top: -.47vw;
left: -.47vw;
width: calc(100% + .94vw);
height: calc(100% + .94vw);
border-radius: 1.95vw;
}
.reviews__item-client {
gap: 1.25vw;
}
.reviews__item-client_avatar {
height: 3.91vw;
width: 3.91vw;
font-size: 2.19vw;
}
.reviews__item-client_name {
font-size: 1.09vw;
}
.page-rewiews .reviews__item-client_name,
.page-rewiews .reviews__item-client_stars span,
.page-rewiews .reviews__kurs,
.page-rewiews .reviews__item-client_text {
font-size: 1.41vw;
}
.reviews__item-client_lavel {
margin-top: .39vw;
}
.reviews__item-client_stars {
margin-top: .47vw;
}
.reviews__item-client_stars span {
margin-left: 1.56vw;
font-size: 1.09vw;
}
.reviews__kurs {
font-size: 1.25vw;
line-height: 1.48vw;
}
.reviews__item-client_text {
font-size: 1.09vw;
max-height: 100vw;
}
.reviews__item-client_text.more {
max-height: 7.42vw;
}
.reviews_hiden {
max-height: 0vw;
}
.review-block {
padding: 1.41vw;
}
.reviews .owl-item {
padding: .47vw;
}
.reviews-owl-next,
.reviews-owl-prev {
top: calc(50% + 2.34vw);
}
.reviews-owl-next {
right: 2.34vw;
}
.reviews-owl-prev {
left: 2.34vw;
}
.reviews__item-client {
gap: 1.56vw;
}
.reviews__item-client_avatar {
height: 4.45vw;
width: 4.45vw;
}
.reviews__kurs {
font-size: 1.09vw;
line-height: 1.48vw;
}
}
@media (max-width: 860px) {
.reviews-wrapper-more {
margin-top: 0;
}
.reviews__item-wrapper {
padding: 20px 30px;
}
.reviews-owl-next, .reviews-owl-prev {
top: 50%;
}
.page-elementary-school .reviews .container {
padding: 20px 35px;
}
.reviews-owl-next {
right: 10px;
}
.reviews-owl-prev {
left: 10px;
}
.review-block {
padding: 10px;
}
.reviews__item-client_avatar {
height: 40px;
width: 40px;
}
.reviews__item-client_avatar {
font-size: 20px;
}
.page-rewiews .reviews__item-client_name, .page-rewiews .reviews__item-client_stars span, .page-rewiews .reviews__kurs, .page-rewiews .reviews__item-client_text {
font-size: 16px;
}
.page-rewiews .reviews__item-client_name {
font-weight: 500;
}
.page-rewiews .reviews__item::before {
top: -3px;
left: -3px;
width: calc(100% + 6px);
height: calc(100% + 6px);
}
.page-rewiews .reviews__item-wrapper {
padding: 10px;
gap: 5px;
border-radius: 22px;
}
.page-rewiews .reviews__kurs {
margin: 0;
}
.reviews__item-client_stars span {
font-size: 16px;
}
.teacher__stars_reviews {
color: #A0A0A0;
}
.reviews__item {
width: 100%;
}
}
.review-card__footer {
display: flex;
align-items: center;
gap: 12px;
margin-top: 8px;
}
.review-card__date {
margin-left: auto;
font-size: 13px;
color: var(--color-text-muted);
white-space: nowrap;
}
.review-card__btn-more {
display: inline-block;
padding: 0;
border: none;
background: none;
color: var(--accent);
font-weight: 600;
font-size: 14px;
cursor: pointer;
align-self: flex-start;
}
.review-card__btn-more:hover {
text-decoration: underline;
}
.review-card__text--clamped {
position: relative;
max-height: 120px;
overflow: hidden;
transition: max-height .4s ease;
}
.review-card__text--clamped.review-card__text--expanded {
max-height: 2000px;
}
.review-card__text--clamped:not(.review-card__text--expanded)::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 40px;
background: linear-gradient(transparent, var(--color-bg));
}
.review-card__teacher-link {
color: var(--accent);
text-decoration: underline;
text-underline-offset: 3px;
text-decoration-color: currentColor;
transition: color .2s, font-weight .2s;
font-weight: 500;
}
.review-card__teacher-link:hover {
color: var(--accent-hover);
font-weight: 700;
}
.reviews-cards .lw-scroll-x {
overflow: visible;
padding: 0;
}
.reviews-cards .lw-grid--3 {
display: flex;
flex-wrap: wrap;
gap: 24px;
justify-content: center;
}
.reviews-cards .lw-grid--3 .lw-card {
width: calc(33.33% - 16px);
min-width: 280px;
padding: 24px;
border-radius: 20px;
box-shadow: 0 2px 16px rgba(0,0,0,0.06);
border: 1.5px solid rgba(0,0,0,0.12);
transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.reviews-cards .lw-grid--3 .lw-card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
border-color: rgba(124, 58, 237, 0.15);
background: var(--accent-light);
}
@media (max-width: 1200px) {
.reviews-cards .lw-grid--3 .lw-card {
width: calc(50% - 12px);
min-width: 280px;
}
}
@media (max-width: 768px) {
.reviews-cards .lw-scroll-x {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
padding-bottom: 8px;
}
.reviews-cards .lw-grid--3 {
display: flex;
gap: 16px;
overflow-x: auto;
scroll-snap-type: x mandatory;
flex-wrap: nowrap;
justify-content: flex-start;
padding-bottom: 4px;
}
.reviews-cards .lw-grid--3 .lw-card {
flex: 0 0 88vw;
scroll-snap-align: start;
position: relative;
}
.reviews-cards .lw-card > .lw-flex.lw-flex--row {
flex-wrap: wrap;
gap: 8px 12px;
align-items: flex-start;
}
.reviews-cards .lw-card .lw-avatar {
flex-shrink: 0;
}
.reviews-cards .lw-card > .lw-flex.lw-flex--row > .lw-flex.lw-flex--col {
flex: 1;
min-width: 0;
padding-right: 90px;
}
.reviews-cards .lw-card .lw-badge--verified {
margin-top: 6px;
margin-left: 0;
}
.reviews-cards .lw-card .lw-stars {
position: absolute;
top: 24px;
right: 24px;
margin-top: 0;
}
}
@media (max-width: 480px) {
.reviews-cards .lw-grid--3 .lw-card {
padding: 16px;
}
.reviews-cards .lw-card .lw-stars {
top: 16px;
right: 16px;
}
}
.reviews-loadmore {
text-align: center;
margin-top: 32px;
}
.reviews-loadmore__btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 14px 36px;
font-size: 16px;
font-weight: 600;
color: var(--accent);
background: var(--accent-light);
border: 2px solid var(--accent);
border-radius: 12px;
cursor: pointer;
transition: background var(--transition-fast), transform var(--transition-fast);
}
.reviews-loadmore__btn:hover {
background: rgba(124, 58, 237, 0.15);
transform: translateY(-2px);
}
.reviews-loadmore__btn:active {
transform: translateY(0);
}
.reviews-loadmore__btn:disabled {
opacity: 0.5;
cursor: default;
transform: none;
}
@media (max-width: 768px) {
.reviews-loadmore {
display: none;
}
}
.teachers-card__reviews {
font-size: 0.8125rem;
font-weight: 600;
color: var(--color-primary, #2563EB);
text-decoration: none;
border-bottom: 1px solid transparent;
transition: border-color .2s, color .2s;
}
.teachers-card__reviews:hover {
border-bottom-color: currentColor;
}
/* Отзывы «как на главной» (reviews-front) */
.reviews-front-section {
position: relative;
padding: 48px 0;
content-visibility: auto;
contain-intrinsic-size: auto 700px;
background-color: var(--color-bg-alt, #F8FAFC);
background-image: radial-gradient(circle 250px at 80% 0%, rgba(37,99,235,0.07) 0%, transparent 70%);
}
.reviews-front-section .section-header--centered {
margin-bottom: 40px;
}
.reviews-front__grid {
display: flex;
flex-wrap: wrap;
gap: 20px;
margin-bottom: 32px;
}
.reviews-front__card {
width: 100%;
background: linear-gradient(90deg, #BF568E, #006DB7);
border-radius: 21px;
padding: 2px;
}
.reviews-front__card-inner {
padding: 24px 28px;
display: flex;
flex-direction: column;
gap: 12px;
border-radius: 19px;
background: #FFFFFF;
height: 100%;
}
@media (min-width: 768px) {
.reviews-front__card {
width: calc(50% - 10px);
}
.reviews-front__card:last-child:nth-child(odd) {
margin: 0 auto;
}
}
@media (min-width: 1024px) {
.reviews-front__card {
width: calc(33.33% - 14px);
}
}
.reviews-front__header {
display: flex;
align-items: center;
gap: 12px;
}
.reviews-front__avatar {
width: 57px;
height: 57px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
overflow: hidden;
font-size: 1.375rem;
font-weight: 700;
color: #fff;
}
.reviews-front__avatar-img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 50%;
}
.reviews-front__avatar-letter {
line-height: 1;
}
.reviews-front__client-data {
flex: 1;
}
.reviews-front__name {
font-weight: 600;
font-size: 1rem;
color: var(--color-text, #0F172A);
}
.reviews-front__stars {
display: flex;
align-items: center;
gap: 4px;
}
.reviews-front__stars svg {
display: block;
}
.reviews-front__date {
font-size: 0.8125rem;
color: var(--color-text-light, #64748B);
margin-left: auto;
}
.reviews-front__teacher {
font-size: 0.875rem;
color: var(--color-text-muted, #475569);
margin: 0;
}
.reviews-front__teacher span {
font-weight: 600;
color: var(--color-text, #0F172A);
}
.reviews-front__text {
font-size: 0.875rem;
line-height: 1.6;
color: var(--color-text-muted, #475569);
flex: 1;
}
.reviews-front__badge {
display: inline-flex;
align-items: center;
gap: 5px;
font-size: 0.75rem;
font-weight: 600;
color: #059669;
margin-top: 4px;
}
.reviews-front__badge svg {
flex-shrink: 0;
}
.reviews-front__all-link {
text-align: center;
}
.reviews-front__scroll-hint {
display: none;
font-size: 0.8125rem;
color: var(--color-text-muted, #475569);
text-align: right;
margin-bottom: 8px;
animation: comparison-fade 3s ease-out forwards;
animation-delay: 1s;
opacity: 0;
}
.reviews-link__btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 14px 32px;
border: none;
border-radius: var(--radius-sm, 12px);
font-family: inherit;
font-size: 0.95rem;
font-weight: 700;
color: var(--color-text-on-dark);
cursor: pointer;
background: var(--pksh-gradient-btn-bright);
text-decoration: none;
transition: transform var(--transition-fast), box-shadow var(--transition-fast);
box-shadow: var(--pksh-btn-shadow-bright);
white-space: nowrap;
}
.reviews-link__btn:hover {
transform: translateY(-2px);
box-shadow: var(--pksh-btn-shadow-bright-hover);
}
.reviews-link__btn:focus-visible {
outline: 3px solid var(--color-primary);
outline-offset: 3px;
}
@media (max-width: 768px) {
.reviews-front-section {
padding: 32px 0;
}
.reviews-front__scroll-hint {
display: block;
}
.reviews-front__wrap {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
padding: 2px;
scrollbar-width: thin;
}
.reviews-front__wrap::-webkit-scrollbar {
height: 4px;
}
.reviews-front__wrap::-webkit-scrollbar-track {
background: var(--color-border, #E2E8F0);
border-radius: 2px;
}
.reviews-front__wrap::-webkit-scrollbar-thumb {
background: var(--color-primary, #2563EB);
border-radius: 2px;
}
.reviews-front__grid {
flex-wrap: nowrap;
width: max-content;
gap: 16px;
}
.reviews-front__card {
width: 280px;
flex-shrink: 0;
}
.reviews-front__card-inner {
padding: 20px;
}
.teachers-card__reviews { padding-block: 8px; }
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -406,13 +406,13 @@
.page-family-classes .family-hero { padding-block: clamp(36px, 5vw, 56px); }
@media (max-width: 860px) {
/* шапка фиксированная — hero не должен уходить под меню (крошки видны) */
.page-family-classes .family-hero { padding-top: 96px; padding-bottom: 40px; }
}
.page-family-classes .price-block { padding-block: clamp(40px, 5vw, 72px); }
.page-family-classes .reviews-front-section { padding-block: clamp(40px, 5vw, 64px); }
/* Иконка-маркер у заголовков карточек (декор, SVG) */
.page-family-classes .family-card__title { position: relative; padding-left: 30px; }
.page-family-classes .family-card__title::before {
content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);

View File

@ -77,7 +77,7 @@ document.addEventListener("click", function (event) {
document.querySelector('html').style = "";
return;
}
// Клик по фону (затемнению) — закрыть модалку
if (target === modalRequestForm) {
modalRequestForm.classList.remove('is-open');
document.querySelector('html').style = "";
@ -140,7 +140,7 @@ document.querySelectorAll('.header-menu').forEach(item => {
item.classList.add('hover-effect');
});
/* ── "Читать ещё" (expand/collapse long reviews) ── */
(function() {
'use strict';
document.querySelectorAll('.review-card__btn-more').forEach(function(btn) {
@ -156,7 +156,7 @@ document.querySelectorAll('.header-menu').forEach(item => {
});
})();
/* ── Reveal animation (IntersectionObserver) ── */
(function() {
'use strict';
var revealElements = document.querySelectorAll('.reveal');
@ -217,7 +217,7 @@ document.querySelectorAll('.header-menu').forEach(item => {
function paint() {
ticking = false;
// читаем геометрию до записи (в этом же кадре записи ещё не было)
var doc = document.documentElement;
var maxScroll = doc.scrollHeight - doc.clientHeight;
var scrollTop = window.pageYOffset || doc.scrollTop;
@ -238,7 +238,7 @@ document.querySelectorAll('.header-menu').forEach(item => {
window.requestAnimationFrame(paint);
})();
/* ── Desktop Sticky CTA — show after hero ── */
(function() {
var sticky = document.querySelector('.sticky-cta-desktop');
var hero = document.querySelector('.banner');
@ -246,7 +246,7 @@ document.querySelectorAll('.header-menu').forEach(item => {
var observer = new IntersectionObserver(function(entries) {
entries.forEach(function(entry) {
// Show sticky CTA when hero is NOT visible (scrolled past)
sticky.classList.toggle('visible', !entry.isIntersecting);
});
}, { threshold: 0 });
@ -274,7 +274,7 @@ document.querySelectorAll('.mystyle-accordion-trigger').forEach(trigger => {
const item = this.closest('.mystyle-accordion-item');
if (!item) return;
const isOpen = item.classList.contains('active');
// Закрываем все другие аккордеоны в том же контейнере
const parent = item.parentElement;
if (parent) {
parent.querySelectorAll('.mystyle-accordion-item.active').forEach(other => {

View File

@ -66,6 +66,6 @@
window.addEventListener('scroll', onScroll, { passive: true });
}
// Клик по плейсхолдеру — немедленная загрузка
mapEl.addEventListener('click', activate);
})();

View File

@ -3260,8 +3260,28 @@ function enqueue_template_specific_styles()
'1.1'
);
}
$__tpl = basename((string) get_page_template());
$__teachers_tpls = array( 'page-elementary-school.php', 'page-after-school.php', 'page-teachers.php', 'page-foto.php', 'page-podgotovka-k-shkole.php', 'page-class.php', 'page-semejnye-klassy.php', 'page-course.php', 'page-o-nas.php', 'page-camp.php', 'page-reviews.php', 'single-course.php', 'single-teacher.php' );
$__reviews_tpls = array( 'page-camp.php', 'page-elementary-school.php', 'page-after-school.php', 'page-podgotovka-k-shkole.php', 'page-semejnye-klassy.php', 'page-contacts.php', 'page-foto.php', 'page-reviews.php', 'single-teacher.php' );
if (is_front_page() || is_singular('teacher') || is_singular('course') || is_tax(array( 'courses', 'subject' )) || in_array($__tpl, $__teachers_tpls, true)) {
$__t = dekart_css_asset('main-teachers.css');
wp_enqueue_style('main-teachers-style', $__t['url'], array(), $__t['ver']);
}
if (is_front_page() || is_singular('teacher') || is_singular('course') || is_tax(array( 'courses', 'subject' )) || in_array($__tpl, $__reviews_tpls, true)) {
$__r = dekart_css_asset('main-reviews.css');
wp_enqueue_style('main-reviews-style', $__r['url'], array(), $__r['ver']);
}
if (is_page_template('page-semejnye-klassy.php')) {
// page-semejnye-klassy.min.css инлайнится в header.php вместе с main.min.css
$family_css = dekart_css_asset('page-semejnye-klassy.css');
wp_enqueue_style(
'family-classes-style',
$family_css['url'],
array(),
$family_css['ver']
);
wp_enqueue_script(
'family-classes-script',
get_template_directory_uri() . '/assets/js/semejnye-klassy.js',
@ -3404,9 +3424,7 @@ function dekart_ping_indexnow($post_id, $post)
));
}
/**
* CrUX — Chrome User Experience Report.
*/
add_action('load-post.php', function () {
@ -3467,6 +3485,9 @@ add_filter('style_loader_tag', static function ($tag, $handle) {
return $tag;
}
$defer = ( 'block-library-global-styles' === $handle );
if (in_array($handle, array( 'main-teachers-style', 'main-reviews-style' ), true)) {
$defer = true;
}
if ('front-page-style' === $handle && is_front_page()) {
$defer = true;
@ -4443,7 +4464,7 @@ add_filter('rest_endpoints', static function (array $endpoints): array {
return $endpoints;
});
/* ── Honest timer: end-of-month deadline ── */
function dekart_get_honest_deadline(): string
{
@ -5516,7 +5537,7 @@ function dekart_branch_settings_page()
this.parentElement.classList.toggle('collapsed');
});
});
// Соцсети и мессенджеры: их JS инициализируется внутри секции «СОЦСЕТИ И МЕССЕНДЖЕРЫ»
// Соцсети и мессенджеры: JS внутри секции
</script>
<?php submit_button('Сохранить настройки филиала'); ?>
@ -5820,7 +5841,7 @@ add_action('admin_enqueue_scripts', 'dekart_admin_teacher_tab_assets');
function dekart_admin_branch_tab_assets($hook)
{
if (! isset($_GET['page']) || $_GET['page'] !== 'branch-settings') { // phpcs:ignore WordPress.Security.NonceVerification
if (! isset($_GET['page']) || $_GET['page'] !== 'branch-settings') {
return;
}

View File

@ -45,7 +45,7 @@ if (is_front_page()) {
<?php
// CSS12
// CSS счётчиков (выводится ниже)
?>
<style id="reset-css-inline">/*! reset.css inline */ *{margin:0;padding:0;box-sizing:border-box}html{scroll-behavior:smooth}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img{max-width:100%;height:auto;display:block}a{color:inherit;text-decoration:none}button{cursor:pointer;font:inherit}ul,ol{list-style:none}table{border-collapse:collapse}input,textarea,select{font:inherit}</style>
@ -61,21 +61,18 @@ if (is_front_page()) {
?><link rel="preload" as="style" href="<?php echo esc_url($main_css_url); ?>" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="<?php echo esc_url($main_css_url); ?>"></noscript>
<?php elseif (is_page_template('page-semejnye-klassy.php')) :
// Полный CSS инлайном: геометрия всех блоков есть с первого рендера → нет сдвига при позднем main.css
$css_base = get_template_directory_uri() . '/assets/css/';
$bundle = '';
foreach (array( 'main.min.css', 'page-semejnye-klassy.min.css' ) as $rel) {
$path = get_template_directory() . '/assets/css/' . $rel;
if (file_exists($path)) {
$bundle .= (string) file_get_contents($path) . "\n";
}
$critical_family = get_template_directory() . '/assets/css/critical-family.css';
if (file_exists($critical_family)) {
$critical_css = (string) file_get_contents($critical_family);
$critical_css = preg_replace('#url\((?!(?:\'|")?(?:data:|https?:|//|/))#i', 'url(' . get_template_directory_uri() . '/assets/css/', $critical_css);
echo '<style id="critical-family-css">' . $critical_css . '</style>' . "\n";
}
// url() в инлайне резолвятся от документа — делаем абсолютными
$bundle = preg_replace('#url\((?!(?:\'|")?(?:data:|https?:|//|/))#i', 'url(' . $css_base, $bundle);
if ('' !== trim($bundle)) {
echo '<style id="family-css-inline">' . $bundle . '</style>' . "\n";
}
?>
$main_css = dekart_css_asset('main.css');
$main_css_url = $main_css['url'] . '?ver=' . $main_css['ver'];
?><link rel="preload" as="style" href="<?php echo esc_url($main_css_url); ?>" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="<?php echo esc_url($main_css_url); ?>"></noscript>
<?php else :
$main_css = dekart_css_asset('main.css'); ?>
<link rel="stylesheet" href="<?php echo esc_url($main_css['url'] . '?ver=' . $main_css['ver']); ?>" media="all">
@ -88,13 +85,17 @@ if (is_front_page()) {
<noscript><link rel="stylesheet" href="<?php echo esc_url(get_template_directory_uri() . '/assets/vendor/swiper/swiper-bundle.min.css'); ?>"></noscript>
<?php endif; ?>
<link rel="preload" as="style" href="<?php echo esc_url(get_template_directory_uri() . '/assets/css/fonts.css?ver=' . filemtime(get_template_directory() . '/assets/css/fonts.css')); ?>" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="<?php echo esc_url(get_template_directory_uri() . '/assets/css/fonts.css?ver=' . filemtime(get_template_directory() . '/assets/css/fonts.css')); ?>"></noscript>
<?php if (is_front_page()) : ?>
<?php
$fonts_css = get_template_directory() . '/assets/css/fonts.css';
if (file_exists($fonts_css)) {
$fonts_inline = (string) file_get_contents($fonts_css);
$fonts_inline = preg_replace('#url\((?!(?:\'|")?(?:data:|https?:|//|/))#i', 'url(' . get_template_directory_uri() . '/assets/css/', $fonts_inline);
echo '<style id="fonts-inline">' . $fonts_inline . '</style>' . "\n";
}
?>
<link rel="preload" as="font" type="font/woff2" crossorigin href="<?php echo esc_url(get_template_directory_uri() . '/assets/fonts/Roboto-400.woff2'); ?>">
<link rel="preload" as="font" type="font/woff2" crossorigin href="<?php echo esc_url(get_template_directory_uri() . '/assets/fonts/Roboto-600.woff2'); ?>">
<link rel="preload" as="font" type="font/woff2" crossorigin href="<?php echo esc_url(get_template_directory_uri() . '/assets/fonts/PlusJakartaSans-700.woff2'); ?>">
<?php endif; ?>
<?php
?>

View File

@ -70,11 +70,12 @@ function dekart_css_asset(string $rel): array
$dir = get_template_directory() . '/assets/css/';
$uri = get_template_directory_uri() . '/assets/css/';
$min = preg_replace('/\.css$/', '.min.css', $rel);
$file = ( $min !== $rel && file_exists($dir . $min) ) ? $min : $rel;
if ($min !== $rel && file_exists($dir . $min)) {
return array( 'url' => $uri . $min, 'ver' => filemtime($dir . $min) );
}
return array( 'url' => $uri . $rel, 'ver' => filemtime($dir . $rel) );
$ver = substr(md5_file($dir . $file) ?: (string) filemtime($dir . $file), 0, 8);
return array( 'url' => $uri . $file, 'ver' => $ver );
}
if (defined('WP_CLI') && WP_CLI) {

View File

@ -0,0 +1,113 @@
<?php
$root = dirname(__DIR__);
$main = file_get_contents($root . '/assets/css/main.css');
$page = file_get_contents($root . '/assets/css/page-semejnye-klassy.css');
function keeps(string $sel): bool
{
$s = trim($sel);
if ('' === $s) {
return false;
}
// база
if (in_array($s, array( ':root', 'html', 'body', 'main', '.main-page', '.ds-container', '.section-bg', '.section-bg::before', '.btn-primary', '.btn-primary:hover', '.btn-primary:focus-visible' ), true)) {
return true;
}
foreach (array( '.ds-hero__visual', '.ds-hero__photo', '.ds-hero__float', '.ds-hero__deco', '.ds-hero__sparkle', '.ds-hero__msg', '.ds-hero__messengers' ) as $skip) {
if (0 === strpos($s, $skip)) {
return false;
}
}
if (0 === strpos($s, '.page-family-classes')) {
return ( false !== strpos($s, '.family-hero') || false !== strpos($s, 'main svg') );
}
// шапка/меню и hero — первый экран
foreach (array( '.header', '.top-header-row', '.bottom-header-row', '.menu-wrapper', '.add-menu', '.inter-lk', '.icon-links', '.icon-close-menu', '.btn-close-menu', '.btn-free-lesson-header', '.burger', '.mobile', '.desktop', '.header-tel', '.dk-icon', '.ds-hero', '.breadcrumbs', '.fa-home', '.family-hero', '.page-family-classes' ) as $prefix) {
if (0 === strpos($s, $prefix)) {
return true;
}
}
return false;
}
function parse_css(string $css, $media = null): array
{
$out = array();
$i = 0;
$n = strlen($css);
$sel_start = 0;
while ($i < $n) {
$c = $css[$i];
if ('{' === $c) {
$sel = trim(substr($css, $sel_start, $i - $sel_start));
$depth = 1;
$j = $i + 1;
while ($j < $n && $depth > 0) {
if ('{' === $css[$j]) {
$depth++;
} elseif ('}' === $css[$j]) {
$depth--;
}
$j++;
}
$block = substr($css, $sel_start, $j - $sel_start);
if (0 === strpos($sel, '@media') || 0 === strpos($sel, '@supports')) {
$inner = substr($css, $i + 1, $j - $i - 2);
$out = array_merge($out, parse_css($inner, $sel));
} elseif (0 !== strpos($sel, '@')) {
$out[] = array( $media, $sel, $block );
}
$i = $j;
$sel_start = $i;
continue;
}
if ('}' === $c) {
$sel_start = $i + 1;
}
$i++;
}
return $out;
}
function build(array $rules): string
{
$out = array();
$open = null;
foreach ($rules as $r) {
list($media, $sel, $block) = $r;
$keep = false;
foreach (explode(',', $sel) as $one) {
if (keeps($one)) {
$keep = true;
break;
}
}
if (! $keep) {
continue;
}
if ($media !== $open) {
if ($open !== null) {
$out[] = '}';
}
if ($media !== null) {
$out[] = $media . ' {';
}
$open = $media;
}
$out[] = $block;
}
if ($open !== null) {
$out[] = '}';
}
return implode("\n", $out);
}
$css = build(array_merge(parse_css($main), parse_css($page)));
file_put_contents($root . '/assets/css/critical-family.css', $css);
echo 'critical-family.css: ' . strlen($css) . " bytes; gzip=" . strlen(gzencode($css, 9)) . "\n";

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,198 @@
<?php
$root = dirname(__DIR__) . '/assets/css/';
$main = file_get_contents(dirname(__DIR__) . '/tools/main.source.css');
function parse_css(string $css, $media = null): array
{
$out = array();
$n = strlen($css);
$i = 0;
$ss = 0;
$in_str = '';
$in_com = false;
while ($i < $n) {
$c = $css[$i];
$next = ($i + 1 < $n) ? $css[$i + 1] : '';
if ($in_com) {
if ('*' === $c && '/' === $next) {
$in_com = false;
$i += 2;
continue;
}
$i++;
continue;
}
if ('' !== $in_str) {
if ('\\' === $c) {
$i += 2;
continue;
}
if ($c === $in_str) {
$in_str = '';
}
$i++;
continue;
}
if ('/' === $c && '*' === $next) {
$in_com = true;
$i += 2;
continue;
}
if ("'" === $c || '"' === $c) {
$in_str = $c;
$i++;
continue;
}
if ('{' === $c) {
$sel = trim(substr($css, $ss, $i - $ss));
$j = $i + 1;
$d = 1;
$s2 = '';
$cm = false;
while ($j < $n && $d > 0) {
$cc = $css[$j];
$nn = ($j + 1 < $n) ? $css[$j + 1] : '';
if ($cm) {
if ('*' === $cc && '/' === $nn) {
$cm = false;
$j += 2;
continue;
}
$j++;
continue;
}
if ('' !== $s2) {
if ('\\' === $cc) {
$j += 2;
continue;
}
if ($cc === $s2) {
$s2 = '';
}
$j++;
continue;
}
if ('/' === $cc && '*' === $nn) {
$cm = true;
$j += 2;
continue;
}
if ("'" === $cc || '"' === $cc) {
$s2 = $cc;
$j++;
continue;
}
if ('{' === $cc) {
$d++;
} elseif ('}' === $cc) {
$d--;
}
$j++;
}
$block = substr($css, $ss, $j - $ss);
if (0 === strpos($sel, '@media') || 0 === strpos($sel, '@supports')) {
$inner = substr($css, $i + 1, $j - $i - 2);
$out = array_merge($out, parse_css($inner, $sel));
} elseif (0 !== strpos($sel, '@')) {
$out[] = array( $media, $sel, $block );
}
$i = $j;
$ss = $i;
continue;
}
if ('}' === $c) {
$ss = $i + 1;
}
$i++;
}
return $out;
}
$dead = array(
'.teacher_name', '.teacher_name-wrapper', '.teacher__rating', '.teacher__rating-img',
'.teacher_stars', '.teacher-about', '.teacher-about::before', '.teacher-description_text',
'.teacher-description_text::after', '.teacher-description_location', '.teacher-description_location::before',
'.info-block', '.info-block__item', '.info-block__item-wrapper', '.info__block-item_number',
'.advertising-block', '.advertising-block__text_text', '.advertising-label', '.advertising-label span',
'.preparation-block', '.preparation-block p', '.block-new', '.block-new_title',
'.page-rewiews', '.main-text-color', '.section-Mntitle-circle', '.banner-circle',
'.certificates_title', '.about-teacher', '.about-teacher-wrapper', '.about-col_item',
'.cat-wrapper_item', '.disciplines__item', '.cta-final .btn', '.map-club__item',
);
function render(array $rules): string
{
$out = array();
$open = null;
foreach ($rules as $r) {
list($media, $sel, $block) = $r;
if ($media !== $open) {
if ($open !== null) {
$out[] = '}';
}
if ($media !== null) {
$out[] = $media . ' {';
}
$open = $media;
}
$out[] = $block;
}
if ($open !== null) {
$out[] = '}';
}
return implode("\n", $out) . "\n";
}
$rules = parse_css($main);
$core = $teachers = $reviews = $removed = array();
foreach ($rules as $r) {
list($media, $sel, $block) = $r;
$sel_clean = preg_replace('#/\*.*?\*/#s', '', $sel);
$selectors = array_map(function ($s) {
return preg_replace('/\s+/', ' ', trim($s));
}, explode(',', $sel_clean));
$is_dead = false;
foreach ($selectors as $one) {
if (in_array($one, $dead, true)) {
$is_dead = true;
break;
}
}
if ($is_dead) {
$removed[] = $r;
continue;
}
$all_t = true;
$all_v = true;
foreach ($selectors as $one) {
if (! preg_match('/teacher|mentor/i', $one)) {
$all_t = false;
}
if (! preg_match('/reviews?/i', $one)) {
$all_v = false;
}
}
if ($all_t) {
$teachers[] = $r;
}
if ($all_v) {
$reviews[] = $r;
}
if (! $all_t && ! $all_v) {
$core[] = $r;
}
}
file_put_contents($root . 'main.css', render($core));
file_put_contents($root . 'main-teachers.css', "/* teachers */\n" . render($teachers));
file_put_contents($root . 'main-reviews.css', "/* reviews */\n" . render($reviews));
file_put_contents($root . '_unused-legacy.css', "/* removed dead legacy */\n" . render($removed));
echo 'core: ' . count($core) . ", teachers: " . count($teachers) . ", reviews: " . count($reviews) . ", removed: " . count($removed) . "\n";