Compare commits
14 Commits
master
...
dev_10_fix
Author | SHA1 | Date |
---|---|---|
|
c74600377a | 2 months ago |
|
39ef43e7fd | 2 months ago |
|
0866502381 | 2 months ago |
|
eb9c7b7b27 | 2 months ago |
|
076af73a9b | 2 months ago |
|
8180ba14cf | 2 months ago |
|
272909cf61 | 2 months ago |
|
ad9ed0fb00 | 2 months ago |
|
fdab7e2422 | 2 months ago |
|
3176223154 | 2 months ago |
|
3f0fc9e260 | 2 months ago |
|
fc73740773 | 2 months ago |
|
62cced0e1a | 2 months ago |
|
fb9a459246 | 2 months ago |
After Width: | Height: | Size: 1.5 KiB |
@ -0,0 +1,9 @@ |
|||||||
|
<IfModule mod_mime.c> |
||||||
|
AddType application/octet-stream .wpress |
||||||
|
</IfModule> |
||||||
|
<IfModule mod_dir.c> |
||||||
|
DirectoryIndex index.php |
||||||
|
</IfModule> |
||||||
|
<IfModule mod_autoindex.c> |
||||||
|
Options -Indexes |
||||||
|
</IfModule> |
@ -0,0 +1 @@ |
|||||||
|
Kangaroos cannot jump here |
@ -0,0 +1 @@ |
|||||||
|
Kangaroos cannot jump here |
@ -0,0 +1,3 @@ |
|||||||
|
User-agent: * |
||||||
|
Disallow: /ai1wm-backups/ |
||||||
|
Disallow: /wp-content/ai1wm-backups/ |
@ -0,0 +1,13 @@ |
|||||||
|
<configuration> |
||||||
|
<system.webServer> |
||||||
|
<staticContent> |
||||||
|
<mimeMap fileExtension=".wpress" mimeType="application/octet-stream" /> |
||||||
|
</staticContent> |
||||||
|
<defaultDocument> |
||||||
|
<files> |
||||||
|
<add value="index.php" /> |
||||||
|
</files> |
||||||
|
</defaultDocument> |
||||||
|
<directoryBrowse enabled="false" /> |
||||||
|
</system.webServer> |
||||||
|
</configuration> |
@ -1,49 +0,0 @@ |
|||||||
/* Стили для загрузки корзины на single странице */ |
|
||||||
|
|
||||||
.product-incart__wrap.loading { |
|
||||||
position: relative; |
|
||||||
pointer-events: none; |
|
||||||
opacity: 0.7; |
|
||||||
} |
|
||||||
|
|
||||||
.product-incart__wrap.loading::before { |
|
||||||
content: ''; |
|
||||||
position: absolute; |
|
||||||
top: 0; |
|
||||||
left: 0; |
|
||||||
right: 0; |
|
||||||
bottom: 0; |
|
||||||
background: rgba(255, 255, 255, 0.8); |
|
||||||
z-index: 10; |
|
||||||
} |
|
||||||
|
|
||||||
.product-incart__wrap.loading::after { |
|
||||||
content: ''; |
|
||||||
position: absolute; |
|
||||||
top: 50%; |
|
||||||
left: 50%; |
|
||||||
width: 20px; |
|
||||||
height: 20px; |
|
||||||
margin: -10px 0 0 -10px; |
|
||||||
border: 2px solid #f3f3f3; |
|
||||||
border-top: 2px solid #3498db; |
|
||||||
border-radius: 50%; |
|
||||||
animation: spin 1s linear infinite; |
|
||||||
z-index: 11; |
|
||||||
} |
|
||||||
|
|
||||||
@keyframes spin { |
|
||||||
0% { transform: rotate(0deg); } |
|
||||||
100% { transform: rotate(360deg); } |
|
||||||
} |
|
||||||
|
|
||||||
/* Стили для кнопок во время загрузки */ |
|
||||||
.product-incart__wrap.loading .product-incart__btn { |
|
||||||
opacity: 0.5; |
|
||||||
pointer-events: none; |
|
||||||
} |
|
||||||
|
|
||||||
/* Стили для счетчика во время загрузки */ |
|
||||||
.product-incart__wrap.loading .product-incart__count { |
|
||||||
opacity: 0.5; |
|
||||||
} |
|
@ -1,746 +0,0 @@ |
|||||||
.order{ |
|
||||||
display: flex; |
|
||||||
} |
|
||||||
.order__title{ |
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 700; |
|
||||||
font-size: 24px; |
|
||||||
line-height: 117%; |
|
||||||
text-transform: uppercase; |
|
||||||
color: var(--text-black); |
|
||||||
} |
|
||||||
.order__contacts{ |
|
||||||
width: calc(50% - 0.5px); |
|
||||||
|
|
||||||
padding: 24px; |
|
||||||
|
|
||||||
border-right: 1px solid #121212; |
|
||||||
} |
|
||||||
.order-contacts__header{ |
|
||||||
display: flex; |
|
||||||
justify-content: space-between; |
|
||||||
align-items: center; |
|
||||||
} |
|
||||||
.order-contacts__form{ |
|
||||||
margin-top: 24px; |
|
||||||
} |
|
||||||
.order-contacts__delivery{ |
|
||||||
margin-top: 47.5px; |
|
||||||
|
|
||||||
padding-top: 48px; |
|
||||||
|
|
||||||
border-top: 1px solid var(--background-grey); |
|
||||||
} |
|
||||||
|
|
||||||
.order-contacts-deliver__item{ |
|
||||||
margin-top: 24px; |
|
||||||
} |
|
||||||
.order-contacts-deliver__date{ |
|
||||||
padding: 8px; |
|
||||||
|
|
||||||
border-radius: 24px; |
|
||||||
|
|
||||||
background: var(--background-grey); |
|
||||||
} |
|
||||||
.order-contacts-deliver__date .form-input-radio__item{ |
|
||||||
margin-top: 24px; |
|
||||||
} |
|
||||||
.order-contacts-deliver__date .form-input-radio__item:first-child{ |
|
||||||
margin-top: 0; |
|
||||||
} |
|
||||||
.order__your{ |
|
||||||
width: calc(50% - 0.5px); |
|
||||||
|
|
||||||
padding: 24px 24px 24px 48px; |
|
||||||
|
|
||||||
background: var(--background-grey); |
|
||||||
} |
|
||||||
.order-your__products{ |
|
||||||
margin-top: 48px; |
|
||||||
} |
|
||||||
.order-your-products__item{ |
|
||||||
margin-top: 16px; |
|
||||||
|
|
||||||
display: flex; |
|
||||||
justify-content: space-between; |
|
||||||
} |
|
||||||
.order-your-products__left{ |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
} |
|
||||||
.order-your-products__img{ |
|
||||||
width: 40px; |
|
||||||
aspect-ratio: 1; |
|
||||||
|
|
||||||
border-radius: 16px; |
|
||||||
} |
|
||||||
.order-your-products__content{ |
|
||||||
margin-left: 16px; |
|
||||||
} |
|
||||||
.order-your-products__name{ |
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 500; |
|
||||||
font-size: 12px; |
|
||||||
line-height: 133%; |
|
||||||
color: var(--text-black); |
|
||||||
|
|
||||||
text-decoration: none; |
|
||||||
} |
|
||||||
.order-your-products__description{ |
|
||||||
margin-top: 8px; |
|
||||||
|
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 500; |
|
||||||
font-size: 12px; |
|
||||||
line-height: 133%; |
|
||||||
color: var(--text-6); |
|
||||||
} |
|
||||||
.order-your-products__description span{ |
|
||||||
font-weight: 700; |
|
||||||
} |
|
||||||
.order-your-products__description span::before{ |
|
||||||
margin-left: 3px; |
|
||||||
|
|
||||||
content: 'x '; |
|
||||||
} |
|
||||||
.order-your-products__right{ |
|
||||||
display: flex; |
|
||||||
} |
|
||||||
.order-your-products__count{ |
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 700; |
|
||||||
font-size: 12px; |
|
||||||
line-height: 133%; |
|
||||||
text-align: right; |
|
||||||
color: var(--text-6); |
|
||||||
} |
|
||||||
.order-your-products__count::before{ |
|
||||||
content: 'x'; |
|
||||||
} |
|
||||||
.order-your-products__price{ |
|
||||||
margin-left: 16px; |
|
||||||
|
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 700; |
|
||||||
font-size: 12px; |
|
||||||
line-height: 133%; |
|
||||||
text-align: right; |
|
||||||
color: var(--text-black); |
|
||||||
} |
|
||||||
|
|
||||||
.order-your__calculation{ |
|
||||||
margin-top: 48px; |
|
||||||
} |
|
||||||
.order-your__promo{ |
|
||||||
display: flex; |
|
||||||
} |
|
||||||
.order-your-promo__button{ |
|
||||||
margin-left: 8px; |
|
||||||
} |
|
||||||
.order-your-calculation__item{ |
|
||||||
margin-top: 24px; |
|
||||||
|
|
||||||
display: flex; |
|
||||||
justify-content: space-between; |
|
||||||
align-items: center; |
|
||||||
} |
|
||||||
.order-your-calculation__title{ |
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 500; |
|
||||||
font-size: 20px; |
|
||||||
line-height: 120%; |
|
||||||
color: var(--text-black); |
|
||||||
} |
|
||||||
.order-your-calculation__value{ |
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 700; |
|
||||||
font-size: 20px; |
|
||||||
line-height: 200%; |
|
||||||
text-transform: uppercase; |
|
||||||
text-align: right; |
|
||||||
color: var(--text-black); |
|
||||||
} |
|
||||||
|
|
||||||
.order-your-calculation__value--discount{ |
|
||||||
background: var(--gradient-red); |
|
||||||
background-clip: text; |
|
||||||
-webkit-background-clip: text; |
|
||||||
-webkit-text-fill-color: transparent; |
|
||||||
} |
|
||||||
|
|
||||||
.order-your-calculation__description{ |
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 500; |
|
||||||
font-size: 12px; |
|
||||||
line-height: 133%; |
|
||||||
text-align: right; |
|
||||||
color: var(--text-9); |
|
||||||
} |
|
||||||
.order-your-calculation__line{ |
|
||||||
margin-top: 23px; |
|
||||||
border: 1px solid var(--background-9); |
|
||||||
} |
|
||||||
.order-your-calculation__result{ |
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 700; |
|
||||||
font-size: 24px; |
|
||||||
line-height: 117%; |
|
||||||
text-transform: uppercase; |
|
||||||
color: var(--text-black); |
|
||||||
} |
|
||||||
.order-your-calculation__submit{ |
|
||||||
margin-top: 48px; |
|
||||||
} |
|
||||||
|
|
||||||
@media only screen and (max-width: 1200px) { |
|
||||||
.order{ |
|
||||||
display: block; |
|
||||||
} |
|
||||||
.order__contacts, .order__your{ |
|
||||||
border: none; |
|
||||||
width: 100%; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
@media only screen and (max-width: 720px) { |
|
||||||
.order__title{ |
|
||||||
max-width: 181px; |
|
||||||
|
|
||||||
font-size: 20px; |
|
||||||
line-height: 120%; |
|
||||||
} |
|
||||||
.order__your{ |
|
||||||
margin-top: 16px; |
|
||||||
} |
|
||||||
.order__contacts{ |
|
||||||
padding: 24px 16px; |
|
||||||
} |
|
||||||
.order__your{ |
|
||||||
padding: 40px 16px 9px 16px; |
|
||||||
} |
|
||||||
.order-your__promo{ |
|
||||||
display: block; |
|
||||||
} |
|
||||||
.order-your-promo__button{ |
|
||||||
margin-left: 0; |
|
||||||
margin-top: 24px; |
|
||||||
|
|
||||||
width: 100%; |
|
||||||
} |
|
||||||
.order-your-products__content{ |
|
||||||
max-width: 164px; |
|
||||||
} |
|
||||||
.order-your-products__count, .order-your-products__price{ |
|
||||||
flex-shrink: 0; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* toggle */ |
|
||||||
.toggle{ |
|
||||||
padding-top: 26px; |
|
||||||
padding-bottom: 25px; |
|
||||||
|
|
||||||
border-bottom: 1px solid var(--text-3); |
|
||||||
|
|
||||||
position: relative; |
|
||||||
} |
|
||||||
.toggle::after{ |
|
||||||
content: ''; |
|
||||||
|
|
||||||
position: absolute; |
|
||||||
top: 24px; |
|
||||||
right: 0; |
|
||||||
|
|
||||||
width: 24px; |
|
||||||
aspect-ratio: 1; |
|
||||||
|
|
||||||
background-image: url(../img/svg/main/black-x.svg); |
|
||||||
transform: rotate(45deg); |
|
||||||
transition: transform .2s; |
|
||||||
pointer-events: none; |
|
||||||
} |
|
||||||
.toggle.active::after{ |
|
||||||
transform: rotate(0deg); |
|
||||||
} |
|
||||||
.toggle__title{ |
|
||||||
padding-right: 30px; |
|
||||||
|
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 700; |
|
||||||
font-size: 16px; |
|
||||||
line-height: 125%; |
|
||||||
color: var(--text-black); |
|
||||||
|
|
||||||
cursor: pointer; |
|
||||||
} |
|
||||||
.toggle__block-content{ |
|
||||||
height: 0; |
|
||||||
overflow: hidden; |
|
||||||
|
|
||||||
transition: height .2s ease-out; |
|
||||||
} |
|
||||||
.toggle__content{ |
|
||||||
padding-top: 24px; |
|
||||||
} |
|
||||||
.toggle-content__item{ |
|
||||||
margin: 12px -12px -12px -12px; |
|
||||||
|
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
flex-wrap: wrap; |
|
||||||
} |
|
||||||
.toggle-content__item:first-child{ |
|
||||||
margin-top: 0; |
|
||||||
} |
|
||||||
.toggle-content__element{ |
|
||||||
margin: 12px; |
|
||||||
} |
|
||||||
.toggle-content__element--width-perc-100{ |
|
||||||
width: 100%; |
|
||||||
} |
|
||||||
.toggle-content__element--width-perc-50{ |
|
||||||
width: calc(50% - 24px); |
|
||||||
} |
|
||||||
.toggle__text{ |
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 400; |
|
||||||
font-size: 20px; |
|
||||||
line-height: 120%; |
|
||||||
color: var(--text-black); |
|
||||||
} |
|
||||||
/* toggle */ |
|
||||||
|
|
||||||
/* checkbox */ |
|
||||||
.checkbox{ |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
|
|
||||||
cursor: pointer; |
|
||||||
} |
|
||||||
.checkbox__state{ |
|
||||||
border-radius: 4px; |
|
||||||
|
|
||||||
width: 18px; |
|
||||||
height: 18px; |
|
||||||
|
|
||||||
border: 2px solid var(--background-black); |
|
||||||
background: var(--background-white); |
|
||||||
|
|
||||||
flex-shrink: 0; |
|
||||||
} |
|
||||||
.checkbox.active .checkbox__state{ |
|
||||||
background-color: var(--background-black); |
|
||||||
|
|
||||||
background-image: url(../img/svg/main/arrow-selected-white.svg); |
|
||||||
background-repeat: no-repeat; |
|
||||||
background-position: center; |
|
||||||
} |
|
||||||
.checkbox__input{ |
|
||||||
display: none; |
|
||||||
} |
|
||||||
.checkbox__label{ |
|
||||||
padding-left: 8px; |
|
||||||
|
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 400; |
|
||||||
font-size: 20px; |
|
||||||
line-height: 120%; |
|
||||||
color: var(--text-dark); |
|
||||||
|
|
||||||
cursor: pointer; |
|
||||||
} |
|
||||||
.checkbox__label a{ |
|
||||||
color: #76ce75; |
|
||||||
|
|
||||||
text-decoration: none; |
|
||||||
} |
|
||||||
.checkbox--small{ |
|
||||||
margin-top: 24px; |
|
||||||
} |
|
||||||
.checkbox--small .checkbox__label{ |
|
||||||
padding-left: 24px; |
|
||||||
|
|
||||||
font-weight: 500; |
|
||||||
font-size: 12px; |
|
||||||
line-height: 133%; |
|
||||||
} |
|
||||||
/* checkbox */ |
|
||||||
|
|
||||||
|
|
||||||
@media (max-width: 720px) { |
|
||||||
.modal-map__control{ |
|
||||||
flex-wrap: wrap; |
|
||||||
} |
|
||||||
.modal-map-control__item{ |
|
||||||
width: calc(100% - 24px); |
|
||||||
} |
|
||||||
.form__full-mobile{ |
|
||||||
width: 100%; |
|
||||||
border-radius: 0; |
|
||||||
border: none; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
.container{ |
|
||||||
max-width: 100% !important; |
|
||||||
padding: 0; |
|
||||||
} |
|
||||||
|
|
||||||
.col, .col-1, .col-10, .col-11, .col-12, .col-2, .col-20_0, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-auto, .col-lg, .col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-20_0, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-auto, .col-md, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-20_0, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-auto, .col-sm, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-auto, .col-xl, .col-xl-1, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-auto{ |
|
||||||
padding: 0; |
|
||||||
} |
|
||||||
|
|
||||||
.page-title{ |
|
||||||
display: none; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
.modal-map-control-item__input{ |
|
||||||
display: none; |
|
||||||
} |
|
||||||
|
|
||||||
.page .main-page-wrapper{ |
|
||||||
background: #fff !important; |
|
||||||
} |
|
||||||
|
|
||||||
.modal-map-control-item__content{ |
|
||||||
width: 100%; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
.woocommerce-shipping-methods{ |
|
||||||
display: flex; |
|
||||||
} |
|
||||||
.visually-hidden { |
|
||||||
position: absolute !important; |
|
||||||
clip: rect(1px 1px 1px 1px); |
|
||||||
clip: rect(1px, 1px, 1px, 1px); |
|
||||||
padding: 0 !important; |
|
||||||
border: 0 !important; |
|
||||||
height: 1px !important; |
|
||||||
width: 1px !important; |
|
||||||
overflow: hidden; |
|
||||||
} |
|
||||||
.modal-map-control__item{ |
|
||||||
display: flex; |
|
||||||
flex-direction: column; |
|
||||||
} |
|
||||||
.modal-map-control__item > label { |
|
||||||
flex-grow: 1; |
|
||||||
display: flex; |
|
||||||
flex-direction: column; |
|
||||||
position: relative; |
|
||||||
} |
|
||||||
.modal-map-control__item > label > *{ |
|
||||||
flex-grow: 1; |
|
||||||
} |
|
||||||
.modal-map-control__item:nth-child(n){ |
|
||||||
margin: 12px; |
|
||||||
margin-bottom: 12px; |
|
||||||
} |
|
||||||
.modal-map-control-item__title{ |
|
||||||
text-align: left; |
|
||||||
} |
|
||||||
.modal-map-control__item > label{ |
|
||||||
margin-bottom: 0; |
|
||||||
} |
|
||||||
.open-pvz-btn{ |
|
||||||
position: absolute !important; |
|
||||||
clip: rect(1px 1px 1px 1px); |
|
||||||
clip: rect(1px, 1px, 1px, 1px); |
|
||||||
padding: 0 !important; |
|
||||||
border: 0 !important; |
|
||||||
height: 1px !important; |
|
||||||
width: 1px !important; |
|
||||||
overflow: hidden; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
.order-contacts__delivery.loading{ |
|
||||||
position: relative; |
|
||||||
min-height: 110px; |
|
||||||
} |
|
||||||
.order-contacts__delivery.loading::before{ |
|
||||||
content: ''; |
|
||||||
z-index: 150; |
|
||||||
height: 100%; |
|
||||||
width: 100%; |
|
||||||
position: absolute; |
|
||||||
top: 0; |
|
||||||
left: 0; |
|
||||||
background-color: rgba(255,255,255, .6); |
|
||||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid' width='200' height='200' style='shape-rendering: auto; display: block; background: transparent;'%3E%3Cg%3E%3Ccircle stroke-dasharray='164.93361431346415 56.97787143782138' r='35' stroke-width='10' stroke='%23000000' fill='none' cy='50' cx='50'%3E%3CanimateTransform keyTimes='0;1' values='0 50 50;360 50 50' dur='1s' repeatCount='indefinite' type='rotate' attributeName='transform'/%3E%3C/circle%3E%3Cg/%3E%3C/g%3E%3C!-- %5Bldio%5D generated by https://loading.io --%3E%3C/svg%3E"); |
|
||||||
background-size: 48px; |
|
||||||
background-position: center; |
|
||||||
background-repeat: no-repeat; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
.shop_table .woocommerce-shipping-totals{ |
|
||||||
display:none; |
|
||||||
} |
|
||||||
|
|
||||||
.amount{ |
|
||||||
color: inherit; |
|
||||||
} |
|
||||||
|
|
||||||
.order-your-products__item{ |
|
||||||
align-items: center; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
.wc_payment_methods.payment_methods.methods{ |
|
||||||
display: none; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
.woocommerce-terms-and-conditions-wrapper{ |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
.woocommerce-privacy-policy-text p{ |
|
||||||
color: #121212 !important; |
|
||||||
font-size: 14px; |
|
||||||
} |
|
||||||
|
|
||||||
.woocommerce-privacy-policy-text a{ |
|
||||||
color: #121212 !important; |
|
||||||
font-size: 14px; |
|
||||||
text-decoration: underline; |
|
||||||
} |
|
||||||
|
|
||||||
.woocommerce-terms-and-conditions-checkbox-text a{ |
|
||||||
color: #121212 !important; |
|
||||||
font-size: 14px; |
|
||||||
text-decoration: underline; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.woocommerce-checkout.processing { |
|
||||||
position: relative; |
|
||||||
opacity: 0.5; |
|
||||||
pointer-events: none; |
|
||||||
} |
|
||||||
|
|
||||||
.woocommerce-checkout .blockUI.blockOverlay { |
|
||||||
position: absolute; |
|
||||||
top: 0; |
|
||||||
left: 0; |
|
||||||
width: 100%; |
|
||||||
height: 100%; |
|
||||||
background-color: rgba(242, 242, 242, 0.7) !important; |
|
||||||
z-index: 9999; |
|
||||||
} |
|
||||||
|
|
||||||
.woocommerce-checkout .blockUI-message { |
|
||||||
position: absolute; |
|
||||||
top: 50%; |
|
||||||
left: 50%; |
|
||||||
transform: translate(-50%, -50%); |
|
||||||
z-index: 10000; |
|
||||||
font-size: 16px; |
|
||||||
color: #333; |
|
||||||
} |
|
||||||
|
|
||||||
.cabinet-card__button{ |
|
||||||
padding: 8px 8px 6px 0; |
|
||||||
|
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 600; |
|
||||||
font-size: 20px; |
|
||||||
line-height: 120%; |
|
||||||
color: var(--text-black); |
|
||||||
|
|
||||||
background: none; |
|
||||||
border: none; |
|
||||||
|
|
||||||
position: relative; |
|
||||||
|
|
||||||
text-decoration: none; |
|
||||||
} |
|
||||||
.cabinet-card__button::before{ |
|
||||||
content: ''; |
|
||||||
|
|
||||||
position: absolute; |
|
||||||
bottom: 6px; |
|
||||||
|
|
||||||
width: calc(100% - 8px); |
|
||||||
height: 1px; |
|
||||||
|
|
||||||
background: var(--text-black); |
|
||||||
|
|
||||||
transition: opacity .2s ease-out; |
|
||||||
} |
|
||||||
.cabinet-card__button:hover{ |
|
||||||
opacity: .8; |
|
||||||
} |
|
||||||
|
|
||||||
.form-agreement{ |
|
||||||
display: flex; |
|
||||||
} |
|
||||||
.form-agreement__check{ |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
margin-top: 1rem; |
|
||||||
} |
|
||||||
.form-agreement__square{ |
|
||||||
width: 18px; |
|
||||||
aspect-ratio: 1; |
|
||||||
|
|
||||||
border-radius: 4px; |
|
||||||
|
|
||||||
border: 2px solid var(--background-black); |
|
||||||
} |
|
||||||
.form-agreement__label{ |
|
||||||
margin-left: 8px; |
|
||||||
|
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 400; |
|
||||||
font-size: 20px; |
|
||||||
line-height: 120%; |
|
||||||
color: var(--text-black); |
|
||||||
} |
|
||||||
.form-agreement__input{ |
|
||||||
display: none; |
|
||||||
} |
|
||||||
.form-agreement__input:checked + .form-agreement__square{ |
|
||||||
border: none; |
|
||||||
background: var(--gradient-blue); |
|
||||||
|
|
||||||
position: relative; |
|
||||||
} |
|
||||||
.form-agreement__input:checked + .form-agreement__square::after{ |
|
||||||
content: ''; |
|
||||||
|
|
||||||
position: absolute; |
|
||||||
top: 1px; |
|
||||||
left: 1px; |
|
||||||
|
|
||||||
width: 16px; |
|
||||||
aspect-ratio: 1; |
|
||||||
|
|
||||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.50681 0.784901C9.86151 1.14024 9.86101 1.71584 9.50567 2.07055L4.35112 7.216C3.99601 7.57049 3.42085 7.57024 3.06604 7.21544L0.493317 4.64271C0.138295 4.28769 0.138295 3.71208 0.493317 3.35706C0.848339 3.00204 1.42394 3.00204 1.77897 3.35706L3.70944 5.28753L8.22116 0.783766C8.57649 0.429057 9.1521 0.429565 9.50681 0.784901Z' fill='white'/%3E%3C/svg%3E"); |
|
||||||
background-repeat: no-repeat; |
|
||||||
background-position: center; |
|
||||||
} |
|
||||||
|
|
||||||
.modal-map__control--delivery > p{ |
|
||||||
color: #121212; |
|
||||||
padding-left: 1rem; |
|
||||||
} |
|
||||||
|
|
||||||
.form-agreement__label a{ |
|
||||||
color: #121212; |
|
||||||
text-decoration: underline; |
|
||||||
} |
|
||||||
|
|
||||||
.form-input__error.active{ |
|
||||||
display: block; |
|
||||||
} |
|
||||||
|
|
||||||
.order-your__promo{ |
|
||||||
position: relative; |
|
||||||
} |
|
||||||
|
|
||||||
.woocommerce-NoticeGroup.woocommerce-NoticeGroup-checkout{ |
|
||||||
display: none; |
|
||||||
} |
|
||||||
|
|
||||||
.woocommerce-terms-and-conditions-wrapper, .woocommerce-message{ |
|
||||||
display: none; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
.woocommerce-checkout-review-order-table tr{ |
|
||||||
border: none !important; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
.col, .col-1, .col-10, .col-11, .col-12, .col-2, .col-20_0, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-auto, .col-lg, .col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-20_0, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-auto, .col-md, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-20_0, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-auto, .col-sm, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-auto, .col-xl, .col-xl-1, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-auto { |
|
||||||
padding-right: 0 !important; |
|
||||||
padding-left: 0 !important; |
|
||||||
} |
|
||||||
|
|
||||||
.cdek-office-info{ |
|
||||||
display: none; |
|
||||||
} |
|
||||||
|
|
||||||
.quantity-control { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
gap: 10px; |
|
||||||
margin-bottom: 10px; |
|
||||||
} |
|
||||||
.quantity-decrease, .quantity-increase { |
|
||||||
background: #f0f0f0; |
|
||||||
border: none; |
|
||||||
padding: 5px 10px; |
|
||||||
cursor: pointer; |
|
||||||
font-size: 16px; |
|
||||||
border-radius: 4px; |
|
||||||
} |
|
||||||
.quantity-decrease:hover, .quantity-increase:hover { |
|
||||||
background: #e0e0e0; |
|
||||||
} |
|
||||||
.quantity-input { |
|
||||||
width: 50px; |
|
||||||
text-align: center; |
|
||||||
border: 1px solid #ccc; |
|
||||||
border-radius: 4px; |
|
||||||
padding: 5px; |
|
||||||
} |
|
||||||
|
|
||||||
.form-row{ |
|
||||||
margin-top: 1rem; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
.woocommerce-order-overview{ |
|
||||||
} |
|
||||||
|
|
||||||
.woocommerce .woocommerce-customer-details .woocommerce-column__title, .woocommerce-order-details__title{ |
|
||||||
margin-bottom: .5em; |
|
||||||
margin-top: 1em; |
|
||||||
} |
|
||||||
|
|
||||||
.woocommerce ul.order_details{ |
|
||||||
margin: 3rem 0; |
|
||||||
} |
|
||||||
|
|
||||||
.woocommerce .woocommerce-customer-details address p{ |
|
||||||
margin-top: .5em; |
|
||||||
} |
|
||||||
|
|
||||||
.woocommerce .woocommerce-customer-details .woocommerce-customer-details--email::before, |
|
||||||
.woocommerce .woocommerce-customer-details .woocommerce-customer-details--phone::before { |
|
||||||
margin-top: -.25em; |
|
||||||
} |
|
||||||
|
|
||||||
.woocommerce-order-overview__order.order{ |
|
||||||
display: flex; |
|
||||||
flex-direction: column; |
|
||||||
} |
|
||||||
|
|
||||||
.woocommerce-order{ |
|
||||||
max-width: calc(100% - 30px); |
|
||||||
margin-right: auto; |
|
||||||
margin-left: auto; |
|
||||||
} |
|
||||||
|
|
||||||
@media (max-width: 640px) { |
|
||||||
.woocommerce ul.order_details li { |
|
||||||
margin-right:0em; |
|
||||||
font-size: .715em; |
|
||||||
line-height: 1.3; |
|
||||||
border-right: none; |
|
||||||
border-bottom: 1px dashed #cfc8d8; |
|
||||||
padding-right: 2em; |
|
||||||
width: 100%; |
|
||||||
padding-top: 0.5rem; |
|
||||||
padding-bottom: 0.5rem; |
|
||||||
} |
|
||||||
} |
|
@ -1,515 +0,0 @@ |
|||||||
/* breadcrumbs */ |
|
||||||
.breadcrumbs{ |
|
||||||
margin: 24px; |
|
||||||
|
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
} |
|
||||||
.breadcrumbs__item{ |
|
||||||
display: block; |
|
||||||
|
|
||||||
padding: 0px 16px; |
|
||||||
|
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 700; |
|
||||||
font-size: 16px; |
|
||||||
line-height: 125%; |
|
||||||
color: var(--text-6); |
|
||||||
|
|
||||||
text-decoration: none; |
|
||||||
|
|
||||||
position: relative; |
|
||||||
} |
|
||||||
.breadcrumbs__item:first-child{ |
|
||||||
padding-left: 0; |
|
||||||
} |
|
||||||
.breadcrumbs__item:nth-child(n+2)::before{ |
|
||||||
content: ''; |
|
||||||
|
|
||||||
position: absolute; |
|
||||||
top: -2px; |
|
||||||
left: -12px; |
|
||||||
|
|
||||||
width: 24px; |
|
||||||
aspect-ratio: 1; |
|
||||||
|
|
||||||
background-image: url(../img/svg/main/arrow-breadcrumbs.svg); |
|
||||||
background-repeat: no-repeat; |
|
||||||
background-size: contain; |
|
||||||
} |
|
||||||
/* breadcrumbs */ |
|
||||||
|
|
||||||
/* compound */ |
|
||||||
.compound{ |
|
||||||
margin: -5px; |
|
||||||
|
|
||||||
min-height: 33.95px; |
|
||||||
|
|
||||||
display: flex; |
|
||||||
align-items: start; |
|
||||||
flex-wrap: wrap; |
|
||||||
} |
|
||||||
.compound__item{ |
|
||||||
margin: 5px; |
|
||||||
|
|
||||||
padding: 4px 8px; |
|
||||||
|
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 700; |
|
||||||
font-size: 12px; |
|
||||||
line-height: 133%; |
|
||||||
color: var(--text-black); |
|
||||||
|
|
||||||
border-radius: 16px; |
|
||||||
background-color: var(--background-white); |
|
||||||
|
|
||||||
display: block; |
|
||||||
text-decoration: none; |
|
||||||
} |
|
||||||
.compound__item:first-child{ |
|
||||||
margin-left: 0; |
|
||||||
} |
|
||||||
.product__footer{ |
|
||||||
margin: 48px 24px 24px; |
|
||||||
|
|
||||||
display: flex; |
|
||||||
justify-content: center; |
|
||||||
} |
|
||||||
.product__footer--error{ |
|
||||||
margin: 45px 0; |
|
||||||
} |
|
||||||
/* compound */ |
|
||||||
|
|
||||||
/* button */ |
|
||||||
.button{ |
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 600; |
|
||||||
font-size: 20px; |
|
||||||
line-height: 120%; |
|
||||||
color: var(--text-black); |
|
||||||
|
|
||||||
border-radius: 20px; |
|
||||||
|
|
||||||
cursor: pointer; |
|
||||||
} |
|
||||||
.button--100-perc{ |
|
||||||
width: 100%; |
|
||||||
} |
|
||||||
.button--white{ |
|
||||||
padding: 11px 24px; |
|
||||||
|
|
||||||
text-align: center; |
|
||||||
|
|
||||||
background-color: var(--background-white); |
|
||||||
border: 1px solid var(--background-black); |
|
||||||
|
|
||||||
transition: opacity .2s ease-out; |
|
||||||
} |
|
||||||
.button--white:hover{ |
|
||||||
opacity: .8; |
|
||||||
} |
|
||||||
.button--white.active{ |
|
||||||
background: var(--background-black); |
|
||||||
color: var(--background-white); |
|
||||||
} |
|
||||||
.button--gradient{ |
|
||||||
background: var(--gradient-turquoise); |
|
||||||
border: none; |
|
||||||
|
|
||||||
transition: opacity .2s ease-out; |
|
||||||
} |
|
||||||
.button--gradient:hover{ |
|
||||||
opacity: .8; |
|
||||||
} |
|
||||||
.button--base{ |
|
||||||
padding: 12px 24px; |
|
||||||
} |
|
||||||
.button--high{ |
|
||||||
height: 56px; |
|
||||||
|
|
||||||
padding: 16px 24px 24px 24px; |
|
||||||
|
|
||||||
font-weight: 700; |
|
||||||
text-align: center; |
|
||||||
|
|
||||||
position: relative; |
|
||||||
} |
|
||||||
.button--high-46{ |
|
||||||
padding: 12px 24px; |
|
||||||
|
|
||||||
font-size: 20px; |
|
||||||
font-weight: 700; |
|
||||||
line-height: 24px; |
|
||||||
} |
|
||||||
.button--icon{ |
|
||||||
padding-right: 56px; |
|
||||||
|
|
||||||
text-align: start; |
|
||||||
} |
|
||||||
.button--filter::after{ |
|
||||||
content: ''; |
|
||||||
|
|
||||||
position: absolute; |
|
||||||
top: 16px; |
|
||||||
right: 24px; |
|
||||||
|
|
||||||
width: 24px; |
|
||||||
aspect-ratio: 1; |
|
||||||
|
|
||||||
background-image: url(../img/svg/main/filter.svg); |
|
||||||
background-repeat: no-repeat; |
|
||||||
background-size: contain; |
|
||||||
} |
|
||||||
.button--black{ |
|
||||||
padding: 7px 15px; |
|
||||||
|
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 500; |
|
||||||
font-size: 24px; |
|
||||||
line-height: 133%; |
|
||||||
color: var(--text-white); |
|
||||||
|
|
||||||
background: var(--background-black); |
|
||||||
border: 1px solid var(--text-white); |
|
||||||
} |
|
||||||
.button--link{ |
|
||||||
text-decoration: none; |
|
||||||
} |
|
||||||
.button--red-48-px{ |
|
||||||
border-radius: 48px; |
|
||||||
} |
|
||||||
.to-know{ |
|
||||||
/* width: 100%; */ |
|
||||||
border: none; |
|
||||||
transition: opacity .2s ease-out; |
|
||||||
text-decoration: none; |
|
||||||
text-transform: uppercase; |
|
||||||
} |
|
||||||
.product__item .to-know{ |
|
||||||
margin-right: auto; |
|
||||||
margin-left: auto; |
|
||||||
width: auto; |
|
||||||
display: flex; |
|
||||||
} |
|
||||||
.to-know--start{ |
|
||||||
justify-content: start; |
|
||||||
padding-left: 0; |
|
||||||
} |
|
||||||
|
|
||||||
.to-know:hover{ |
|
||||||
opacity: .8; |
|
||||||
} |
|
||||||
.to-know p{ |
|
||||||
padding-bottom: 4px; |
|
||||||
|
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 700; |
|
||||||
font-size: 20px; |
|
||||||
line-height: 120%; |
|
||||||
color: var(--text-black); |
|
||||||
|
|
||||||
border-bottom: 1px var(--text-black) solid; |
|
||||||
|
|
||||||
cursor: pointer; |
|
||||||
} |
|
||||||
.to-know--background-none{ |
|
||||||
background: none; |
|
||||||
} |
|
||||||
.back{ |
|
||||||
margin-top: 16px; |
|
||||||
margin-left: 16px; |
|
||||||
|
|
||||||
padding: 8px; |
|
||||||
padding-left: 32px; |
|
||||||
|
|
||||||
background: none; |
|
||||||
border: none; |
|
||||||
|
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 600; |
|
||||||
font-size: 20px; |
|
||||||
line-height: 120%; |
|
||||||
color: var(--text-black); |
|
||||||
|
|
||||||
text-decoration: none; |
|
||||||
|
|
||||||
position: relative; |
|
||||||
} |
|
||||||
.back::before{ |
|
||||||
content: ''; |
|
||||||
|
|
||||||
position: absolute; |
|
||||||
top: 8px; |
|
||||||
left: 0; |
|
||||||
|
|
||||||
margin-right: 8px; |
|
||||||
|
|
||||||
width: 24px; |
|
||||||
height: 24px; |
|
||||||
|
|
||||||
background-image: url(../img/svg/main/arrow-back.svg); |
|
||||||
} |
|
||||||
|
|
||||||
.back::after{ |
|
||||||
content: ''; |
|
||||||
|
|
||||||
position: absolute; |
|
||||||
bottom: 6px; |
|
||||||
left: 0; |
|
||||||
|
|
||||||
width: calc(100% - 8px); |
|
||||||
height: 1px; |
|
||||||
|
|
||||||
background: var(--text-black); |
|
||||||
} |
|
||||||
/* button */ |
|
||||||
|
|
||||||
.subscription{ |
|
||||||
|
|
||||||
} |
|
||||||
.subscription__item{ |
|
||||||
display: flex; |
|
||||||
|
|
||||||
color: var(--text-black); |
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 500; |
|
||||||
line-height: 120%; |
|
||||||
} |
|
||||||
.subscription__item:nth-last-child(n + 2){ |
|
||||||
border-bottom: 1px solid var(--background-9); |
|
||||||
} |
|
||||||
.subscription__item span{ |
|
||||||
font-weight: 700; |
|
||||||
} |
|
||||||
.subscription__item span small{ |
|
||||||
font-size: 16px; |
|
||||||
} |
|
||||||
.subscription__status{ |
|
||||||
color: var(--text-black); |
|
||||||
} |
|
||||||
.subscription__status--close{ |
|
||||||
color: var(--text-red); |
|
||||||
} |
|
||||||
.subscription__status--end{ |
|
||||||
color: var(--text-green); |
|
||||||
} |
|
||||||
.subscription__add{ |
|
||||||
width: 100%; |
|
||||||
} |
|
||||||
.subscription__add-header{ |
|
||||||
} |
|
||||||
.subscription__add-product{ |
|
||||||
align-items: start; |
|
||||||
} |
|
||||||
.subscription__add-product > *:not(:first-child){ |
|
||||||
padding-top: 14px; |
|
||||||
} |
|
||||||
.subscription__add-title{ |
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 600; |
|
||||||
line-height: 133%; |
|
||||||
} |
|
||||||
.subscription__add-content{ |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
.tabs__buttons{ |
|
||||||
margin: -12px; |
|
||||||
|
|
||||||
display: flex; |
|
||||||
flex-wrap: wrap; |
|
||||||
} |
|
||||||
.tabs__content-wrap{ |
|
||||||
margin-top: 24px; |
|
||||||
} |
|
||||||
.tabs__content{ |
|
||||||
display: none; |
|
||||||
} |
|
||||||
.tabs__content.active{ |
|
||||||
display: block; |
|
||||||
} |
|
||||||
|
|
||||||
.wcsatt-add-to-subscription-wrapper, |
|
||||||
form.cart .quantity, |
|
||||||
.detail__content .in-stock, |
|
||||||
.wcsatt-options-prompt-label-subscription, |
|
||||||
.wcsatt-options-product-dropdown { |
|
||||||
display: none; |
|
||||||
} |
|
||||||
.wcsatt-options-product-wrapper { |
|
||||||
display: block!important; |
|
||||||
} |
|
||||||
form.cart .single_add_to_cart_button { |
|
||||||
margin: 8px 0; |
|
||||||
width: 345.89px; |
|
||||||
max-width: 100%; |
|
||||||
height: 56px; |
|
||||||
padding: 16px 24px 16px 24px; |
|
||||||
font-weight: 700; |
|
||||||
text-align: center; |
|
||||||
position: relative; |
|
||||||
background: var(--gradient-turquoise); |
|
||||||
border: none; |
|
||||||
transition: opacity .2s ease-out; |
|
||||||
font-family: var(--font-family); |
|
||||||
font-size: 20px; |
|
||||||
line-height: 120%; |
|
||||||
color: var(--text-black); |
|
||||||
border-radius: 20px; |
|
||||||
text-transform: none; |
|
||||||
cursor: pointer; |
|
||||||
} |
|
||||||
form.cart .single_add_to_cart_button:hover { |
|
||||||
opacity: 0.8; |
|
||||||
} |
|
||||||
.subscription-option-details span { |
|
||||||
color: #000; |
|
||||||
cursor: pointer; |
|
||||||
} |
|
||||||
ul.wcsatt-options-product, .wcsatt-options-product-dropdown { |
|
||||||
margin: 0; |
|
||||||
} |
|
||||||
.wcsatt-options-wrapper input, .wcsatt-add-to-subscription-wrapper input { |
|
||||||
width: 18px; |
|
||||||
aspect-ratio: 1; |
|
||||||
accent-color: var(--background-black); |
|
||||||
cursor: pointer; |
|
||||||
} |
|
||||||
.subscription-option label { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
gap: 5px; |
|
||||||
} |
|
||||||
|
|
||||||
form.cart { |
|
||||||
margin: 25px 0 -48px; |
|
||||||
} |
|
||||||
ul.wcsatt-options-product--hidden, .wcsatt-options-product-dropdown--hidden { |
|
||||||
display: block!important; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
.detail-block__form{ |
|
||||||
margin-top: 48px; |
|
||||||
|
|
||||||
display: flex; |
|
||||||
flex-direction: column; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
.wcsatt-options-prompt-text{ |
|
||||||
font-family: 'Craftwork Grotesk'; |
|
||||||
font-style: normal; |
|
||||||
font-weight: 700; |
|
||||||
font-size: 20px; |
|
||||||
line-height: 24px; |
|
||||||
text-transform: uppercase; |
|
||||||
color: #000000; |
|
||||||
} |
|
||||||
|
|
||||||
.subscription-option-details, .wcsatt-options-prompt-action, .subs-text-title{ |
|
||||||
font-size: 20px; |
|
||||||
line-height: 24px; |
|
||||||
display:flex; |
|
||||||
gap: 12px; |
|
||||||
align-items: center; |
|
||||||
} |
|
||||||
.subs-text{ |
|
||||||
|
|
||||||
max-width: 322px; |
|
||||||
font-family: 'Craftwork Grotesk'; |
|
||||||
font-style: normal; |
|
||||||
font-weight: 500; |
|
||||||
font-size: 16px; |
|
||||||
line-height: 20px; |
|
||||||
margin-bottom: 20px; |
|
||||||
} |
|
||||||
|
|
||||||
@media (max-width: 640px) { |
|
||||||
.subscription-option-details, .wcsatt-options-prompt-action, .subs-text-title{ |
|
||||||
font-size: 18px; |
|
||||||
line-height: 22px; |
|
||||||
display:flex; |
|
||||||
gap: 12px; |
|
||||||
align-items: center; |
|
||||||
} |
|
||||||
} |
|
||||||
input:checked + .subscription-option-details::before, input:checked + .wcsatt-options-prompt-action::before{ |
|
||||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M1 10C1 5.02944 5.02944 1 10 1C14.9706 1 19 5.02944 19 10C19 14.9706 14.9706 19 10 19C5.02944 19 1 14.9706 1 10Z' fill='white'/%3E%3Cpath d='M1 10C1 5.02944 5.02944 1 10 1C14.9706 1 19 5.02944 19 10C19 14.9706 14.9706 19 10 19C5.02944 19 1 14.9706 1 10Z' stroke='url(%23paint0_radial_11890_46040)' stroke-width='2'/%3E%3Ccircle cx='10' cy='10' r='6' fill='url(%23paint1_radial_11890_46040)'/%3E%3Cdefs%3E%3CradialGradient id='paint0_radial_11890_46040' cx='0' cy='0' r='1' gradientUnits='userSpaceOnUse' gradientTransform='translate(19 1) rotate(135) scale(25.4558 34.7538)'%3E%3Cstop stop-color='%23188892'/%3E%3Cstop offset='0.45' stop-color='%231EA49C'/%3E%3Cstop offset='0.9' stop-color='%2376CE75'/%3E%3Cstop offset='1' stop-color='%23BBE38D'/%3E%3C/radialGradient%3E%3CradialGradient id='paint1_radial_11890_46040' cx='0' cy='0' r='1' gradientUnits='userSpaceOnUse' gradientTransform='translate(16 4) rotate(135) scale(16.9706 23.1692)'%3E%3Cstop stop-color='%23188892'/%3E%3Cstop offset='0.45' stop-color='%231EA49C'/%3E%3Cstop offset='0.9' stop-color='%2376CE75'/%3E%3Cstop offset='1' stop-color='%23BBE38D'/%3E%3C/radialGradient%3E%3C/defs%3E%3C/svg%3E"); |
|
||||||
} |
|
||||||
.subscription-option-details::before, .wcsatt-options-prompt-action::before{ |
|
||||||
content: ''; |
|
||||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M1 10C1 5.02944 5.02944 1 10 1C14.9706 1 19 5.02944 19 10C19 14.9706 14.9706 19 10 19C5.02944 19 1 14.9706 1 10Z' fill='white'/%3E%3Cpath d='M1 10C1 5.02944 5.02944 1 10 1C14.9706 1 19 5.02944 19 10C19 14.9706 14.9706 19 10 19C5.02944 19 1 14.9706 1 10Z' stroke='%23121212' stroke-width='2'/%3E%3C/svg%3E"); |
|
||||||
height: 20px; width: 20px; |
|
||||||
flex-shrink: 0; |
|
||||||
} |
|
||||||
|
|
||||||
.wcsatt-options-wrapper input, .wcsatt-add-to-subscription-wrapper input { |
|
||||||
aspect-ratio: 1; |
|
||||||
accent-color: var(--background-black); |
|
||||||
cursor: pointer; |
|
||||||
height: 0; |
|
||||||
width: 0; |
|
||||||
position: absolute; |
|
||||||
opacity: 0; |
|
||||||
} |
|
||||||
|
|
||||||
.subscription-option .amount { |
|
||||||
color: #1A1A1A; |
|
||||||
font-weight: 600; |
|
||||||
} |
|
||||||
|
|
||||||
.subscription-option del .amount { |
|
||||||
color: #bbb; |
|
||||||
font-weight: 400; |
|
||||||
font-size: .8em; |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
.subscription-option del .woocommerce-Price-amount.amount, .subscription-option del .woocommerce-Price-currencySymbol{ |
|
||||||
text-decoration: line-through !important; |
|
||||||
} |
|
||||||
|
|
||||||
.woocommerce-Price-amount.amount{ |
|
||||||
font-size: 1.15em; |
|
||||||
} |
|
||||||
|
|
||||||
.detail #wc-stripe-express-checkout-element{ |
|
||||||
display: none !important; |
|
||||||
} |
|
||||||
|
|
||||||
.detail-block-form__item--radio{ |
|
||||||
display: flex; |
|
||||||
gap: 10px; |
|
||||||
} |
|
||||||
|
|
||||||
.amount { |
|
||||||
color: #1A1A1A; |
|
||||||
font-weight: 600; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.detail__wrapper-catalot .swiper-slide { |
|
||||||
height: auto; |
|
||||||
display: flex; |
|
||||||
flex-direction: column; |
|
||||||
} |
|
||||||
|
|
||||||
.detail__wrapper-catalot .swiper-wrapper { |
|
||||||
display: flex; |
|
||||||
align-items: stretch; |
|
||||||
} |
|
||||||
|
|
||||||
.detail__catalot .product__item{ |
|
||||||
flex-grow: 1; |
|
||||||
} |
|
||||||
|
|
||||||
.toggle__title{ |
|
||||||
text-transform: uppercase; |
|
||||||
} |
|
||||||
|
|
||||||
.toggle__text p:not(:last-child) { |
|
||||||
margin-bottom: 1em; |
|
||||||
} |
|
@ -1,901 +0,0 @@ |
|||||||
/* breadcrumbs */ |
|
||||||
.breadcrumbs{ |
|
||||||
margin: 24px 0px; |
|
||||||
|
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
} |
|
||||||
.breadcrumbs__item{ |
|
||||||
display: block; |
|
||||||
|
|
||||||
padding: 0px 16px; |
|
||||||
|
|
||||||
font-family: var(--font-family); |
|
||||||
font-weight: 700; |
|
||||||
font-size: 16px; |
|
||||||
line-height: 125%; |
|
||||||
color: var(--text-6); |
|
||||||
|
|
||||||
text-decoration: none; |
|
||||||
|
|
||||||
position: relative; |
|
||||||
} |
|
||||||
.breadcrumbs__item:first-child{ |
|
||||||
padding-left: 0; |
|
||||||
} |
|
||||||
.breadcrumbs__item:nth-child(n+2)::before{ |
|
||||||
content: ''; |
|
||||||
|
|
||||||
position: absolute; |
|
||||||
top: -2px; |
|
||||||
left: -12px; |
|
||||||
|
|
||||||
width: 24px; |
|
||||||
aspect-ratio: 1; |
|
||||||
|
|
||||||
background-image: url(../img/svg/main/arrow-breadcrumbs.svg); |
|
||||||
background-repeat: no-repeat; |
|
||||||
background-size: contain; |
|
||||||
} |
|
||||||
/* breadcrumbs */ |
|
||||||
|
|
||||||
/* product */ |
|
||||||
|
|
||||||
.product_main{ |
|
||||||
display: flex; |
|
||||||
padding: 30px; |
|
||||||
border-radius: 30px; |
|
||||||
min-height: 766px; |
|
||||||
margin-top: 30px; |
|
||||||
justify-content: space-between; |
|
||||||
background-color: var(--bg-color); |
|
||||||
} |
|
||||||
|
|
||||||
.product_main.--food-fish{ |
|
||||||
--bg-color: #C1DDE6; |
|
||||||
--accent-color: #48c1ed; |
|
||||||
} |
|
||||||
|
|
||||||
.product_main.--food-lamb{ |
|
||||||
--bg-color: #E6D7C1; |
|
||||||
--accent-color: #863300; |
|
||||||
} |
|
||||||
|
|
||||||
.product_main.--food-turkey{ |
|
||||||
--bg-color: #F3D7D2; |
|
||||||
--accent-color: #CD0003; |
|
||||||
} |
|
||||||
|
|
||||||
.product_main.--food-beef{ |
|
||||||
--bg-color: #E6C1D7; |
|
||||||
--accent-color: #7e0092; |
|
||||||
} |
|
||||||
|
|
||||||
.product_main.--food-salmon{ |
|
||||||
--bg-color: #F3D7C1; |
|
||||||
--accent-color: #ff6b35; |
|
||||||
} |
|
||||||
|
|
||||||
.product_main.--food-rabbit{ |
|
||||||
--bg-color: #E6D7C1; |
|
||||||
--accent-color: #8b4513; |
|
||||||
} |
|
||||||
|
|
||||||
.product_main.--food-duck{ |
|
||||||
--bg-color: #F3E6D7; |
|
||||||
--accent-color: #d2691e; |
|
||||||
} |
|
||||||
|
|
||||||
.product_main.--treats-lamb{ |
|
||||||
--bg-color: #E6D7F3; |
|
||||||
--accent-color: #44006c; |
|
||||||
} |
|
||||||
|
|
||||||
.product_main.--treats-rabbit{ |
|
||||||
--bg-color: #F3D7E6; |
|
||||||
--accent-color: #601094; |
|
||||||
} |
|
||||||
|
|
||||||
.product_main.--treats-beef{ |
|
||||||
--bg-color: #D7F3E6; |
|
||||||
--accent-color: #004c31; |
|
||||||
} |
|
||||||
|
|
||||||
.product_main.--treats-salmon{ |
|
||||||
--bg-color: #F3D7F3; |
|
||||||
--accent-color: #7c007a; |
|
||||||
} |
|
||||||
|
|
||||||
.product_main.--treats-duck{ |
|
||||||
--bg-color: #D7F3F3; |
|
||||||
--accent-color: #326e70; |
|
||||||
} |
|
||||||
|
|
||||||
.product_main.--treats-fish{ |
|
||||||
--bg-color: #D7E6F3; |
|
||||||
--accent-color: #0066cc; |
|
||||||
} |
|
||||||
|
|
||||||
.product_main.--treats-turkey{ |
|
||||||
--bg-color: #F3E6D7; |
|
||||||
--accent-color: #cc3300; |
|
||||||
} |
|
||||||
|
|
||||||
/* product info */ |
|
||||||
.product-info{ |
|
||||||
width: 364px; |
|
||||||
flex-direction: column; |
|
||||||
justify-content: space-between; |
|
||||||
display: flex; |
|
||||||
padding-right: 30px; |
|
||||||
} |
|
||||||
|
|
||||||
.product-title{ |
|
||||||
font-weight: 700; |
|
||||||
font-size: 24px; |
|
||||||
text-transform: uppercase; |
|
||||||
color: #121212; |
|
||||||
} |
|
||||||
|
|
||||||
.product-contains{ |
|
||||||
margin-top: 30px; |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
.product-block-title{ |
|
||||||
font-weight: 700; |
|
||||||
font-size: 20px; |
|
||||||
line-height: 100%; |
|
||||||
color: #121212; |
|
||||||
text-transform: uppercase; |
|
||||||
} |
|
||||||
|
|
||||||
.product-contains-text{ |
|
||||||
font-weight: 400; |
|
||||||
font-size: 14px; |
|
||||||
line-height: 150%; |
|
||||||
color: #121212; |
|
||||||
margin-top: 20px; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.product-values{ |
|
||||||
margin-top: 30px; |
|
||||||
} |
|
||||||
|
|
||||||
.product-values-list{ |
|
||||||
display: flex; |
|
||||||
flex-wrap: wrap; |
|
||||||
margin-top: 10px; |
|
||||||
gap: 4px; |
|
||||||
} |
|
||||||
|
|
||||||
.product-values-item{ |
|
||||||
border: 1px solid rgba(18, 18, 18, 0.1); |
|
||||||
border-radius: 100px; |
|
||||||
padding: 4px 4px 4px 10px; |
|
||||||
height: 48px; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
font-weight: 700; |
|
||||||
font-size: 14px; |
|
||||||
line-height: 143%; |
|
||||||
color: #121212; |
|
||||||
gap: 10px; |
|
||||||
} |
|
||||||
|
|
||||||
.product-values-item-val{ |
|
||||||
border: 1px solid #000; |
|
||||||
border-radius: 100px; |
|
||||||
min-width: 40px; |
|
||||||
padding-left: 5px; |
|
||||||
padding-right: 5px; |
|
||||||
height: 40px; |
|
||||||
flex-shrink: 0; |
|
||||||
display: flex; |
|
||||||
justify-content: center; |
|
||||||
align-items: center; |
|
||||||
} |
|
||||||
|
|
||||||
.product-values-title{ |
|
||||||
font-weight: 700; |
|
||||||
font-size: 16px; |
|
||||||
line-height: 125%; |
|
||||||
color: #121212; |
|
||||||
} |
|
||||||
|
|
||||||
.product-vitamins{ |
|
||||||
border: 1px solid rgba(18, 18, 18, 0.1); |
|
||||||
border-radius: 20px; |
|
||||||
padding: 10px; |
|
||||||
width: 100%; |
|
||||||
font-weight: 700; |
|
||||||
font-size: 14px; |
|
||||||
line-height: 143%; |
|
||||||
color: #121212; |
|
||||||
margin-top: 4px; |
|
||||||
} |
|
||||||
|
|
||||||
.product-vitamins-list{ |
|
||||||
margin-top: 10px; |
|
||||||
display: flex; |
|
||||||
flex-wrap: wrap; |
|
||||||
gap: 4px; |
|
||||||
} |
|
||||||
|
|
||||||
.product-vitamins-item{ |
|
||||||
border: 1px solid #000; |
|
||||||
border-radius: 100px; |
|
||||||
padding: 10px; |
|
||||||
} |
|
||||||
/* product info */ |
|
||||||
|
|
||||||
|
|
||||||
/* product constructor */ |
|
||||||
.product-constructor{ |
|
||||||
width: 395px; |
|
||||||
} |
|
||||||
.product-constructor__block{ |
|
||||||
margin-bottom: 1.5rem; |
|
||||||
} |
|
||||||
.product-constructor__block-title{ |
|
||||||
font-size: 16px; |
|
||||||
line-height: 125%; |
|
||||||
color: #121212; |
|
||||||
font-weight: 700; |
|
||||||
} |
|
||||||
|
|
||||||
.product-constructor__block-list{ |
|
||||||
display: flex; |
|
||||||
margin-top: 10px; |
|
||||||
border-radius: 100px; |
|
||||||
padding: 5px; |
|
||||||
height: 60px; |
|
||||||
width: 100%; |
|
||||||
background-color: #fff; |
|
||||||
} |
|
||||||
|
|
||||||
.product-constructor__block-item{ |
|
||||||
flex-grow: 1; |
|
||||||
padding: 2px 6px; |
|
||||||
display: flex; |
|
||||||
flex-direction: column; |
|
||||||
align-items: center; |
|
||||||
justify-content: center; |
|
||||||
height: 50px; |
|
||||||
font-weight: 700; |
|
||||||
font-size: 14px; |
|
||||||
color: rgba(18, 18, 18, 0.75); |
|
||||||
border-radius: 100px; |
|
||||||
} |
|
||||||
|
|
||||||
.product-constructor__block-item svg, .product-constructor__block-item path{ |
|
||||||
fill: rgba(18, 18, 18, 0.75); |
|
||||||
fill-opacity: 1; |
|
||||||
} |
|
||||||
.product-constructor__block-item.active{ |
|
||||||
color: #fff; |
|
||||||
background-color: var(--accent-color); |
|
||||||
} |
|
||||||
|
|
||||||
.product-constructor__block-item.active svg, .product-constructor__block-item.active path{ |
|
||||||
fill: #fff; |
|
||||||
} |
|
||||||
.product-constructor__block-item img, .product-constructor__block-item svg{ |
|
||||||
height: 22px; |
|
||||||
width: 22px; |
|
||||||
} |
|
||||||
/* product constructor */ |
|
||||||
/* product price */ |
|
||||||
|
|
||||||
|
|
||||||
.product-price{ |
|
||||||
display: flex; |
|
||||||
gap: 10px; |
|
||||||
align-items: center; |
|
||||||
} |
|
||||||
|
|
||||||
.product-price-main{ |
|
||||||
border-radius: 100px; |
|
||||||
padding: 14px 15px; |
|
||||||
width: 135px; |
|
||||||
background-color: #fff; |
|
||||||
font-size: 24px; |
|
||||||
text-transform: uppercase; |
|
||||||
text-align: center; |
|
||||||
color: #4d4d4d; |
|
||||||
font-weight: 700; |
|
||||||
} |
|
||||||
|
|
||||||
.product-price-old{ |
|
||||||
font-weight: 700; |
|
||||||
font-size: 16px; |
|
||||||
line-height: 150%; |
|
||||||
text-transform: uppercase; |
|
||||||
text-decoration: line-through; |
|
||||||
color: #666; |
|
||||||
} |
|
||||||
.product-price-percent{ |
|
||||||
font-weight: 500; |
|
||||||
font-size: 12px; |
|
||||||
line-height: 133%; |
|
||||||
color: #fa0505; |
|
||||||
margin-top: 8px; |
|
||||||
} |
|
||||||
|
|
||||||
.product-btn, .button{ |
|
||||||
border: 2px solid #fff; |
|
||||||
border-radius: 100px; |
|
||||||
padding: 12px 16px; |
|
||||||
width: 100%; |
|
||||||
height: 60px; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: center; |
|
||||||
font-weight: 900; |
|
||||||
font-size: 12px; |
|
||||||
text-align: center; |
|
||||||
color: #fff; |
|
||||||
margin-top: 20px; |
|
||||||
background-color: var(--accent-color); |
|
||||||
} |
|
||||||
|
|
||||||
.button::before{ |
|
||||||
display: none; |
|
||||||
} |
|
||||||
|
|
||||||
.to-know{ |
|
||||||
font-size: 24px; |
|
||||||
text-transform: uppercase; |
|
||||||
font-weight: 700; |
|
||||||
margin-top: 20px; |
|
||||||
text-decoration: underline; |
|
||||||
} |
|
||||||
/* product price */ |
|
||||||
|
|
||||||
|
|
||||||
/* product gallery */ |
|
||||||
|
|
||||||
.product-gallery{ |
|
||||||
width: 390px; |
|
||||||
margin-right: 20px; |
|
||||||
border: 2px solid #fff; |
|
||||||
border-radius: 30px; |
|
||||||
} |
|
||||||
|
|
||||||
/* product gallery */ |
|
||||||
|
|
||||||
.product-constructor, .product-gallery, .product-info{ |
|
||||||
flex-grow: 1; |
|
||||||
} |
|
||||||
|
|
||||||
.product-gallery{ |
|
||||||
padding-top: 30px; |
|
||||||
padding-bottom: 10px; |
|
||||||
display: flex; |
|
||||||
flex-direction: column; |
|
||||||
justify-content: space-between; |
|
||||||
overflow: hidden; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
.product-gallery-item{ |
|
||||||
|
|
||||||
background-color: #fff; |
|
||||||
border-radius: 24px; |
|
||||||
display: flex; |
|
||||||
justify-content: center; |
|
||||||
align-items: center; |
|
||||||
height: auto; |
|
||||||
aspect-ratio: 1/1; |
|
||||||
} |
|
||||||
.product-gallery-slider{ |
|
||||||
margin-left: 10px; |
|
||||||
margin-right: 10px; |
|
||||||
position: relative; |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
.product-gallery-slider .swiper-wrapper{ |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
.product-gallery__thumbsSlider::before{ |
|
||||||
background: linear-gradient(270deg, rgba(193, 221, 230, 0) 0%, var(--bg-color) 100%); |
|
||||||
height: 120%; |
|
||||||
position: absolute; |
|
||||||
left: -10px; |
|
||||||
top: -10%; |
|
||||||
width: 65px; |
|
||||||
content: ''; |
|
||||||
z-index: 2; |
|
||||||
pointer-events: none; |
|
||||||
} |
|
||||||
|
|
||||||
.product-gallery__thumbsSlider::after{ |
|
||||||
background: linear-gradient(270deg, rgba(193, 221, 230, 0) 0%, var(--bg-color) 100%); |
|
||||||
height: 120%; |
|
||||||
position: absolute; |
|
||||||
right: -10px; |
|
||||||
top: -10%; |
|
||||||
width: 65px; |
|
||||||
content: ''; |
|
||||||
transform: scaleX(-1); |
|
||||||
z-index: 2; |
|
||||||
pointer-events: none; |
|
||||||
} |
|
||||||
.product-gallery-item img{ |
|
||||||
height: 100%; |
|
||||||
width: 100%; |
|
||||||
object-fit: contain; |
|
||||||
padding: 10px; |
|
||||||
} |
|
||||||
/* product */ |
|
||||||
|
|
||||||
.product-gallery-arrow{ |
|
||||||
border-radius: 100px; |
|
||||||
background-color: var(--accent-color); |
|
||||||
border: 1px solid #fff; |
|
||||||
height: 44px; |
|
||||||
width: 44px; |
|
||||||
pointer-events: all; |
|
||||||
background-image: url("data:image/svg+xml,%3Csvg width='8' height='14' viewBox='0 0 8 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L7 7L1 13' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' /%3E%3C/svg%3E"); |
|
||||||
background-position: center; |
|
||||||
background-repeat: no-repeat; |
|
||||||
} |
|
||||||
|
|
||||||
.product-gallery-arrows{ |
|
||||||
width: calc(100% - 10px); |
|
||||||
position: absolute; |
|
||||||
top: 50%; |
|
||||||
left: 5px; |
|
||||||
transform: translateY(-50%); |
|
||||||
justify-content: space-between; |
|
||||||
pointer-events: none; |
|
||||||
z-index: 3; |
|
||||||
display: flex; |
|
||||||
} |
|
||||||
|
|
||||||
.product-gallery-prev{ |
|
||||||
transform: scaleX(-1); |
|
||||||
} |
|
||||||
|
|
||||||
.swiper-slide-active.product-gallery-item{ |
|
||||||
outline: 4px solid #48c1ed; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.product_main .swiper-slide { |
|
||||||
display: flex; |
|
||||||
justify-content: center; |
|
||||||
align-items: center; |
|
||||||
} |
|
||||||
|
|
||||||
.product_main .swiper-slide img { |
|
||||||
display: block; |
|
||||||
width: 100%; |
|
||||||
height: 100%; |
|
||||||
object-fit: contain; |
|
||||||
} |
|
||||||
|
|
||||||
.product_main .swiper { |
|
||||||
width: 100%; |
|
||||||
margin-left: auto; |
|
||||||
margin-right: auto; |
|
||||||
} |
|
||||||
|
|
||||||
.product_main .swiper-slide { |
|
||||||
background-size: cover; |
|
||||||
background-position: center; |
|
||||||
} |
|
||||||
|
|
||||||
.product-gallery__mainSlider { |
|
||||||
height: 80%; |
|
||||||
width: 100%; |
|
||||||
} |
|
||||||
|
|
||||||
.product-gallery__thumbsSlider { |
|
||||||
height: 20%; |
|
||||||
box-sizing: border-box; |
|
||||||
padding: 10px; |
|
||||||
height: 110px; |
|
||||||
} |
|
||||||
|
|
||||||
.product-gallery__thumbsSlider .swiper-slide { |
|
||||||
width: 90px; |
|
||||||
height: 90px; |
|
||||||
background-color: #fff; |
|
||||||
border-radius: 24px; |
|
||||||
padding: 10px 20px; |
|
||||||
position: relative; |
|
||||||
} |
|
||||||
|
|
||||||
.product-gallery__thumbsSlider .swiper-slide-thumb-active { |
|
||||||
outline: 4px solid var(--accent-color); |
|
||||||
} |
|
||||||
|
|
||||||
.product_main .swiper-slide img { |
|
||||||
display: block; |
|
||||||
width: calc(100% - 10px); |
|
||||||
height: calc(100% - 10px); |
|
||||||
object-fit: contain; |
|
||||||
position: absolute; |
|
||||||
top: 50%; |
|
||||||
left: 50%; |
|
||||||
transform: translate(-50%, -50%); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.product-desc{ |
|
||||||
margin-top: 55px; |
|
||||||
} |
|
||||||
|
|
||||||
.product-desc-text{ |
|
||||||
font-weight: 400; |
|
||||||
font-size: 16px; |
|
||||||
line-height: 150%; |
|
||||||
color: #121212; |
|
||||||
margin-top: 20px; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
.product-reviews{ |
|
||||||
margin-top: 140px; |
|
||||||
} |
|
||||||
|
|
||||||
.product-similar{ |
|
||||||
margin-top: 140px; |
|
||||||
} |
|
||||||
|
|
||||||
.main-food_reviews-slide{ |
|
||||||
box-shadow: 0 20px 40px 0 rgba(0, 0, 0, 0.12); |
|
||||||
background: var(--color); |
|
||||||
/* width: 395px; */ |
|
||||||
border-radius: 40px !important; |
|
||||||
} |
|
||||||
|
|
||||||
.product-reviews-slider { |
|
||||||
overflow: visible !important; |
|
||||||
margin-top: 40px; |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
.product-reviews{ |
|
||||||
overflow: hidden; |
|
||||||
padding-bottom: 60px; |
|
||||||
margin-bottom: -60px; |
|
||||||
} |
|
||||||
|
|
||||||
.product-similar-slider{ |
|
||||||
margin-top: 40px; |
|
||||||
} |
|
||||||
|
|
||||||
.main-food_products-card-slider .swiper-slide{ |
|
||||||
align-self: center; |
|
||||||
} |
|
||||||
|
|
||||||
.product-similar{ |
|
||||||
overflow: hidden; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
.product-single{ |
|
||||||
padding-bottom: 90px; |
|
||||||
} |
|
||||||
|
|
||||||
.product-similar-slider .swiper-wrapper{ |
|
||||||
align-items: stretch; |
|
||||||
} |
|
||||||
.product-similar-slider .swiper-slide{ |
|
||||||
height: auto; |
|
||||||
display: flex; |
|
||||||
flex-direction: column; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
.product-title.--m{ |
|
||||||
display: none; |
|
||||||
} |
|
||||||
|
|
||||||
@media (max-width: 1150px) { |
|
||||||
.product_main { |
|
||||||
flex-direction: column; |
|
||||||
} |
|
||||||
.product-gallery{ |
|
||||||
order: 0; |
|
||||||
} |
|
||||||
.product-info{ |
|
||||||
order: 3; |
|
||||||
} |
|
||||||
.product-info, .product-gallery, .product-constructor{ |
|
||||||
width: 100%; |
|
||||||
margin-right: auto; |
|
||||||
margin-left: 0; |
|
||||||
margin-top: 20px; |
|
||||||
} |
|
||||||
.product-gallery__thumbsSlider{ |
|
||||||
display: none; |
|
||||||
} |
|
||||||
.product-gallery__mainSlider{ |
|
||||||
width: 100%; |
|
||||||
height: auto; |
|
||||||
aspect-ratio: 1 / 1.25; |
|
||||||
max-height: 540px; |
|
||||||
} |
|
||||||
.breadcrumbs{ |
|
||||||
display: none; |
|
||||||
} |
|
||||||
.product_main{ |
|
||||||
margin-top: 0; |
|
||||||
width: calc(48px + 100%); |
|
||||||
margin-left: -24px; |
|
||||||
border-radius: 0; |
|
||||||
padding: 5px 20px 40px; |
|
||||||
} |
|
||||||
.product-title.--m{ |
|
||||||
display: block; |
|
||||||
font-size: 18px; |
|
||||||
margin-top: 20px; |
|
||||||
margin-top: 32px; |
|
||||||
margin-bottom: 14px; |
|
||||||
} |
|
||||||
.product-title.--pc{ |
|
||||||
display: none; |
|
||||||
} |
|
||||||
.product-constructor__block-title{ |
|
||||||
font-size: 14px; |
|
||||||
line-height: 143%; |
|
||||||
} |
|
||||||
.product-constructor__block-item-name{ |
|
||||||
font-size: 12px; |
|
||||||
} |
|
||||||
.product-info{ |
|
||||||
padding-right: 0; |
|
||||||
} |
|
||||||
.product-desc-text{ |
|
||||||
font-size: 14px; |
|
||||||
} |
|
||||||
.product-reviews{ |
|
||||||
margin-top: 66px; |
|
||||||
} |
|
||||||
.main-food_reviews-slide{ |
|
||||||
padding-left: 20px !important; |
|
||||||
padding-right: 20px !important; |
|
||||||
} |
|
||||||
.main-food_products-card{ |
|
||||||
min-width: 0 !important; |
|
||||||
} |
|
||||||
.main-food_products-card-img img{ |
|
||||||
height: 40vw; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
.product-show{ |
|
||||||
display: flex; |
|
||||||
flex-grow: 1; |
|
||||||
flex-direction: column; |
|
||||||
} |
|
||||||
@media (max-width: 576px) { |
|
||||||
.product_main { |
|
||||||
margin-left: -10px; |
|
||||||
width: calc(20px + 100%); |
|
||||||
} |
|
||||||
.product-show{ |
|
||||||
flex-direction: column; |
|
||||||
min-height: calc(100vh - 80px); |
|
||||||
|
|
||||||
} |
|
||||||
.product-gallery{ |
|
||||||
flex-grow: 1; |
|
||||||
display: flex; |
|
||||||
flex-direction: column; |
|
||||||
align-items: center; |
|
||||||
justify-content: center; |
|
||||||
padding-bottom: 30px; |
|
||||||
position: relative; |
|
||||||
} |
|
||||||
.product-gallery-bullets{ |
|
||||||
position: absolute; |
|
||||||
display: flex; |
|
||||||
bottom: 35px !important; |
|
||||||
top: unset !important; |
|
||||||
width: 100%; |
|
||||||
padding-left: 20px; |
|
||||||
padding-right: 20px; |
|
||||||
gap: 12px; |
|
||||||
justify-content: center; |
|
||||||
} |
|
||||||
.product-gallery-bullets__item{ |
|
||||||
height: 12px; |
|
||||||
width: 12px; |
|
||||||
border-radius: 50%; |
|
||||||
background-color: #fff; |
|
||||||
} |
|
||||||
.product-gallery-bullets__item.--active{ |
|
||||||
background-color: var(--accent-color); |
|
||||||
} |
|
||||||
} |
|
||||||
.product-block-arrows--m{ |
|
||||||
display: none; |
|
||||||
} |
|
||||||
.product-similar__head, .product-reviews__head{ |
|
||||||
display: flex; |
|
||||||
justify-content: space-between; |
|
||||||
align-items: center; |
|
||||||
} |
|
||||||
|
|
||||||
.product-block-arrows{ |
|
||||||
display: flex; |
|
||||||
gap: 20px; |
|
||||||
} |
|
||||||
|
|
||||||
@media (max-width: 980px) { |
|
||||||
.product-block-arrows--m{ |
|
||||||
display: flex; |
|
||||||
gap: 10px; |
|
||||||
margin-top: 20px; |
|
||||||
padding-right: 10px; |
|
||||||
padding-left: 10px; |
|
||||||
} |
|
||||||
.product-block-arrows{ |
|
||||||
display: none; |
|
||||||
|
|
||||||
} |
|
||||||
.product-reviews-slider{ |
|
||||||
padding-right: 10px; |
|
||||||
padding-left: 10px; |
|
||||||
} |
|
||||||
.product-similar{ |
|
||||||
margin-top: 60px; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
.stock, .quantity{ |
|
||||||
display: none; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
.product-incart__wrap{ |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
gap: 10px; |
|
||||||
margin-top: 20px; |
|
||||||
|
|
||||||
} |
|
||||||
.product-incart__btn{ |
|
||||||
height: 50px; |
|
||||||
width: 50px; |
|
||||||
position: relative; |
|
||||||
border-radius: 50%; |
|
||||||
background-color: var(--accent-color); |
|
||||||
} |
|
||||||
|
|
||||||
.product-incart__btn--minus::before{ |
|
||||||
content: ''; |
|
||||||
position: absolute; |
|
||||||
top: 50%; |
|
||||||
left: 50%; |
|
||||||
transform: translate(-50%, -50%); |
|
||||||
width: 16px; |
|
||||||
height: 2px; |
|
||||||
background-color: #fff; |
|
||||||
} |
|
||||||
|
|
||||||
.product-incart__btn--plus::before{ |
|
||||||
content: ''; |
|
||||||
position: absolute; |
|
||||||
top: 50%; |
|
||||||
left: 50%; |
|
||||||
transform: translate(-50%, -50%); |
|
||||||
width: 16px; |
|
||||||
height: 2px; |
|
||||||
background-color: #fff; |
|
||||||
} |
|
||||||
|
|
||||||
.product-incart__btn--plus::after{ |
|
||||||
content: ''; |
|
||||||
position: absolute; |
|
||||||
top: 50%; |
|
||||||
left: 50%; |
|
||||||
transform: translate(-50%, -50%); |
|
||||||
height: 16px; |
|
||||||
width: 2px; |
|
||||||
background-color: #fff; |
|
||||||
} |
|
||||||
|
|
||||||
.product-incart{ |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: space-between; |
|
||||||
align-items: center; |
|
||||||
padding: 23px 5px; |
|
||||||
gap: 10px; |
|
||||||
margin: 0 auto; |
|
||||||
width: 159px; |
|
||||||
height: 60px; |
|
||||||
background: color-mix(in srgb, var(--accent-color) 25%, transparent); |
|
||||||
border: 2px solid #FFFFFF; |
|
||||||
border-radius: 100px; |
|
||||||
flex: none; |
|
||||||
order: 0; |
|
||||||
flex-grow: 0; |
|
||||||
font-weight: 900; |
|
||||||
font-size: 12px; |
|
||||||
color: #fff; |
|
||||||
} |
|
||||||
|
|
||||||
.product-incart__label{ |
|
||||||
border: 2px solid #fff; |
|
||||||
border-radius: 100px; |
|
||||||
padding: 12px 16px; |
|
||||||
width: 100%; |
|
||||||
height: 60px; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: center; |
|
||||||
font-weight: 900; |
|
||||||
font-size: 12px; |
|
||||||
text-align: center; |
|
||||||
color: #fff; |
|
||||||
background-color: var(--accent-color); |
|
||||||
} |
|
||||||
|
|
||||||
.product-incart-btn{ |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
/* Стили для загрузки корзины на single странице */ |
|
||||||
|
|
||||||
.product-incart__wrap.loading { |
|
||||||
position: relative; |
|
||||||
pointer-events: none; |
|
||||||
opacity: 0.7; |
|
||||||
} |
|
||||||
|
|
||||||
.product-incart__wrap.loading::before { |
|
||||||
content: ''; |
|
||||||
position: absolute; |
|
||||||
top: 0; |
|
||||||
left: 0; |
|
||||||
right: 0; |
|
||||||
bottom: 0; |
|
||||||
background: var(--bg-color); |
|
||||||
opacity: .7; |
|
||||||
z-index: 10; |
|
||||||
} |
|
||||||
|
|
||||||
.product-incart__wrap.loading::after { |
|
||||||
content: ''; |
|
||||||
position: absolute; |
|
||||||
top: 50%; |
|
||||||
left: 50%; |
|
||||||
width: 20px; |
|
||||||
height: 20px; |
|
||||||
margin: -10px 0 0 -10px; |
|
||||||
border: 2px solid #f3f3f3; |
|
||||||
border-top: 2px solid #3498db; |
|
||||||
border-radius: 50%; |
|
||||||
animation: spin 1s linear infinite; |
|
||||||
z-index: 11; |
|
||||||
} |
|
||||||
|
|
||||||
@keyframes spin { |
|
||||||
0% { transform: rotate(0deg); } |
|
||||||
100% { transform: rotate(360deg); } |
|
||||||
} |
|
||||||
|
|
||||||
/* Стили для кнопок во время загрузки */ |
|
||||||
.product-incart__wrap.loading .product-incart__btn { |
|
||||||
opacity: 0.5; |
|
||||||
pointer-events: none; |
|
||||||
} |
|
||||||
|
|
||||||
/* Стили для счетчика во время загрузки */ |
|
||||||
.product-incart__wrap.loading .product-incart__count { |
|
||||||
opacity: 0.5; |
|
||||||
} |
|
@ -1,10 +1,211 @@ |
|||||||
<?php |
<?php |
||||||
/** |
if (!defined('ABSPATH')) { |
||||||
* Start: comments.php |
exit; |
||||||
* Стандартный файл WordPress для отображения комментариев к записи |
} |
||||||
*/ |
|
||||||
include_component('blog', 'comments'); |
function count_nested_replies($comment_id) { |
||||||
|
$count = 0; |
||||||
/** |
$replies = get_comments(array( |
||||||
* End: comments.php |
'post_id' => get_the_ID(), |
||||||
*/ |
'status' => 'approve', |
||||||
|
'parent' => $comment_id, |
||||||
|
'order' => 'ASC' |
||||||
|
)); |
||||||
|
|
||||||
|
if ($replies) { |
||||||
|
$count += count($replies); |
||||||
|
foreach ($replies as $reply) { |
||||||
|
$count += count_nested_replies($reply->comment_ID); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
return $count; |
||||||
|
} |
||||||
|
|
||||||
|
if (post_password_required()) { |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
if (!is_user_logged_in()) { |
||||||
|
?> |
||||||
|
<div class="comment-block"> |
||||||
|
<p class="comment-block_text"> |
||||||
|
<a href="#modal"><?php pll_e('Войдите'); ?></a>, <?php pll_e('чтобы оставлять комментарии'); ?> |
||||||
|
</p> |
||||||
|
</div> |
||||||
|
<?php |
||||||
|
} |
||||||
|
|
||||||
|
$top_level_comments = get_comments(array( |
||||||
|
'post_id' => get_the_ID(), |
||||||
|
'status' => 'approve', |
||||||
|
'parent' => 0, |
||||||
|
'order' => 'ASC' |
||||||
|
)); |
||||||
|
|
||||||
|
if ($top_level_comments) { |
||||||
|
echo '<div class="comment-block_wrapper">'; |
||||||
|
|
||||||
|
foreach ($top_level_comments as $comment) { |
||||||
|
?> |
||||||
|
<div class="comment-block" id="comment-<?php echo $comment->comment_ID; ?>">
|
||||||
|
<div class="comment-user"> |
||||||
|
<?php echo get_avatar($comment, 50); ?> |
||||||
|
<div class="comment-user_text"> |
||||||
|
<h6><?php echo get_comment_author($comment); ?></h6>
|
||||||
|
<span><?php echo get_comment_date('d F Y', $comment); ?></span>
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<p><?php echo get_comment_text($comment); ?></p>
|
||||||
|
<div class="comment-btns"> |
||||||
|
<button class="reply-to-comment" data-comment-id="<?php echo $comment->comment_ID; ?>" data-post-id="<?php echo get_the_ID(); ?>" data-reply-to="<?php echo esc_attr(get_comment_author($comment)); ?>">
|
||||||
|
<svg width="11" height="8" viewBox="0 0 11 8" fill="none" xmlns="http://www.w3.org/2000/svg"> |
||||||
|
<path d="M9.5 3H3.25C2.00736 3 1 4.00736 1 5.25V5.25C1 6.49264 2.00736 7.5 3.25 7.5H3.5" stroke="#666666"></path> |
||||||
|
<path d="M7 0.5L9.5 3L7 5.5" stroke="#666666"></path> |
||||||
|
</svg> |
||||||
|
<?php pll_e('Ответить'); ?> |
||||||
|
</button> |
||||||
|
<button class="comment-like-btn<?php echo is_user_liked_comment($comment->comment_ID) ? ' active' : ''; ?>" data-comment-id="<?php echo $comment->comment_ID; ?>">
|
||||||
|
<svg width="15" height="13" viewBox="0 0 15 13" fill="none" xmlns="http://www.w3.org/2000/svg"> |
||||||
|
<path d="M10.7745 1C8.67239 1 7.7426 2.5355 7.54047 3.30325C7.39224 2.5355 6.49748 1 4.10427 1C1.11276 1 -0.221288 4.85199 2.40639 8.14801C4.50853 10.7848 6.705 11.8147 7.54047 12C8.47026 11.8279 10.8311 10.761 12.8363 7.87004C15.3427 4.25632 13.4022 1 10.7745 1Z" <?php echo is_user_liked_comment($comment->comment_ID) ? 'stroke="#ff0000" fill="rgba(255, 0, 0, 0.7)"' : 'stroke="#666666"'; ?>></path>
|
||||||
|
</svg> |
||||||
|
<?php echo get_comment_likes_count($comment->comment_ID); ?> |
||||||
|
</button> |
||||||
|
<?php |
||||||
|
comment_reply_link(array( |
||||||
|
'reply_text' => pll__('Ответить'), |
||||||
|
'depth' => 1, |
||||||
|
'max_depth' => get_option('thread_comments_depth'), |
||||||
|
'before' => '<span style="display:none;">', |
||||||
|
'after' => '</span>', |
||||||
|
), $comment->comment_ID, get_the_ID()); |
||||||
|
?> |
||||||
|
</div> |
||||||
|
<div class="reply-form-container" id="reply-form-<?php echo $comment->comment_ID; ?>" style="display: none;"></div>
|
||||||
|
</div> |
||||||
|
<?php |
||||||
|
|
||||||
|
$all_nested_replies = get_all_nested_replies($comment->comment_ID); |
||||||
|
|
||||||
|
if (!empty($all_nested_replies)) { |
||||||
|
$total_reply_count = count($all_nested_replies); |
||||||
|
?> |
||||||
|
<button class="answer-btn"> |
||||||
|
<svg width="15" height="10" viewBox="0 0 15 10" fill="none" xmlns="http://www.w3.org/2000/svg"> |
||||||
|
<path d="M14 1.41406L7.5 7.91406L1 1.41406" stroke="#76CE75" stroke-width="2"></path> |
||||||
|
</svg> |
||||||
|
<?php echo $total_reply_count; ?> |
||||||
|
<span> |
||||||
|
<?php echo ($total_reply_count == 1) ? pll__('ответ') : pll__('ответа'); ?> |
||||||
|
</span> |
||||||
|
</button> |
||||||
|
<?php |
||||||
|
|
||||||
|
foreach ($all_nested_replies as $reply) { |
||||||
|
?> |
||||||
|
<div class="comment-block answer-block" id="comment-<?php echo $reply->comment_ID; ?>">
|
||||||
|
<div class="comment-user"> |
||||||
|
<?php echo get_avatar($reply, 50); ?> |
||||||
|
<div class="comment-user_text"> |
||||||
|
<h6><?php echo get_comment_author($reply); ?></h6>
|
||||||
|
<span><?php echo get_comment_date('d F Y', $reply); ?></span>
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<p><?php echo get_comment_text($reply); ?></p>
|
||||||
|
<div class="comment-btns"> |
||||||
|
<button class="reply-to-comment" data-comment-id="<?php echo $reply->comment_ID; ?>" data-post-id="<?php echo get_the_ID(); ?>" data-reply-to="<?php echo esc_attr(get_comment_author($reply)); ?>">
|
||||||
|
<svg width="11" height="8" viewBox="0 0 11 8" fill="none" xmlns="http://www.w3.org/2000/svg"> |
||||||
|
<path d="M9.5 3H3.25C2.00736 3 1 4.00736 1 5.25V5.25C1 6.49264 2.00736 7.5 3.25 7.5H3.5" stroke="#666666"></path> |
||||||
|
<path d="M7 0.5L9.5 3L7 5.5" stroke="#666666"></path> |
||||||
|
</svg> |
||||||
|
<?php pll_e('Ответить'); ?> |
||||||
|
</button> |
||||||
|
<button class="comment-like-btn<?php echo is_user_liked_comment($reply->comment_ID) ? ' active' : ''; ?>" data-comment-id="<?php echo $reply->comment_ID; ?>">
|
||||||
|
<svg width="15" height="13" viewBox="0 0 15 13" fill="none" xmlns="http://www.w3.org/2000/svg"> |
||||||
|
<path d="M10.7745 1C8.67239 1 7.7426 2.5355 7.54047 3.30325C7.39224 2.5355 6.49748 1 4.10427 1C1.11276 1 -0.221288 4.85199 2.40639 8.14801C4.50853 10.7848 6.705 11.8147 7.54047 12C8.47026 11.8279 10.8311 10.761 12.8363 7.87004C15.3427 4.25632 13.4022 1 10.7745 1Z" <?php echo is_user_liked_comment($reply->comment_ID) ? 'stroke="#ff0000" fill="rgba(255, 0, 0, 0.7)"' : 'stroke="#666666"'; ?>></path>
|
||||||
|
</svg> |
||||||
|
<?php echo get_comment_likes_count($reply->comment_ID); ?> |
||||||
|
</button> |
||||||
|
<?php |
||||||
|
comment_reply_link(array( |
||||||
|
'reply_text' => pll__('Ответить'), |
||||||
|
'depth' => 2, |
||||||
|
'max_depth' => get_option('thread_comments_depth'), |
||||||
|
'before' => '<span style="display:none;">', |
||||||
|
'after' => '</span>', |
||||||
|
), $reply->comment_ID, get_the_ID()); |
||||||
|
?> |
||||||
|
</div> |
||||||
|
<div class="reply-form-container" id="reply-form-<?php echo $reply->comment_ID; ?>" style="display: none;"></div>
|
||||||
|
</div> |
||||||
|
<?php |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
echo '</div>'; |
||||||
|
} |
||||||
|
|
||||||
|
function get_all_nested_replies($comment_id) { |
||||||
|
$all_replies = array(); |
||||||
|
|
||||||
|
$direct_replies = get_comments(array( |
||||||
|
'post_id' => get_the_ID(), |
||||||
|
'status' => 'approve', |
||||||
|
'parent' => $comment_id, |
||||||
|
'order' => 'ASC' |
||||||
|
)); |
||||||
|
|
||||||
|
$all_replies = array_merge($all_replies, $direct_replies); |
||||||
|
|
||||||
|
foreach ($direct_replies as $reply) { |
||||||
|
$deeper_replies = get_all_nested_replies_recursive($reply->comment_ID); |
||||||
|
$all_replies = array_merge($all_replies, $deeper_replies); |
||||||
|
} |
||||||
|
|
||||||
|
return $all_replies; |
||||||
|
} |
||||||
|
|
||||||
|
function get_all_nested_replies_recursive($comment_id) { |
||||||
|
$replies = get_comments(array( |
||||||
|
'post_id' => get_the_ID(), |
||||||
|
'status' => 'approve', |
||||||
|
'parent' => $comment_id, |
||||||
|
'order' => 'ASC' |
||||||
|
)); |
||||||
|
|
||||||
|
$all_replies = $replies; |
||||||
|
|
||||||
|
foreach ($replies as $reply) { |
||||||
|
$deeper_replies = get_all_nested_replies_recursive($reply->comment_ID); |
||||||
|
$all_replies = array_merge($all_replies, $deeper_replies); |
||||||
|
} |
||||||
|
|
||||||
|
return $all_replies; |
||||||
|
} |
||||||
|
|
||||||
|
if (is_user_logged_in()) { |
||||||
|
$commenter = wp_get_current_commenter(); |
||||||
|
$args = array( |
||||||
|
'fields' => array( |
||||||
|
'author' => '', |
||||||
|
'email' => '', |
||||||
|
'url' => '', |
||||||
|
'cookies' => '', |
||||||
|
), |
||||||
|
'comment_field' => '<div class="comment-form-comment"><textarea id="comment" name="comment" placeholder="' . pll__('Ваш комментарий') . '" required></textarea></div>', |
||||||
|
'title_reply' => pll__('Оставить комментарий'), |
||||||
|
'title_reply_to' => pll__('Ответить %s'), |
||||||
|
'class_submit' => 'comment-submit-btn', |
||||||
|
'submit_button' => '<button name="%1$s" type="submit" id="%2$s" class="%3$s">%4$s</button>', |
||||||
|
'submit_field' => '<div class="form-submit">%1$s %2$s</div>', |
||||||
|
'cancel_reply_link' => pll__('Отменить'), |
||||||
|
'id_form' => 'commentform', |
||||||
|
'id_submit' => 'submit', |
||||||
|
'title_reply_before' => '<h3 id="reply-title" class="comment-reply-title">', |
||||||
|
'title_reply_after' => '</h3>', |
||||||
|
); |
||||||
|
|
||||||
|
comment_form($args); |
||||||
|
} |
||||||
|
?> |
@ -0,0 +1,262 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
add_action('template_redirect', 'redirect_non_logged_in_users'); |
||||||
|
|
||||||
|
function redirect_non_logged_in_users() { |
||||||
|
// URL личного кабинета (замените 'your-account-page-slug' на ваш slug) |
||||||
|
$account_page_slug = 'my-account-3'; |
||||||
|
$account_page_slug__2 = 'my-account'; |
||||||
|
// Проверяем, находится ли пользователь на странице личного кабинета |
||||||
|
if (is_page($account_page_slug) && !is_user_logged_in() || is_page($account_page_slug__2) && !is_user_logged_in() ) { |
||||||
|
wp_redirect(home_url()); // Перенаправляем на главную страницу |
||||||
|
exit; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
add_action('init', 'register_pets'); |
||||||
|
function register_pets(){ |
||||||
|
register_post_type('pets', 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' => false, |
||||||
|
'show_ui' => true, |
||||||
|
'supports' => array('title','editor') |
||||||
|
) ); |
||||||
|
} |
||||||
|
|
||||||
|
function get_pet_card($item){ |
||||||
|
?> |
||||||
|
<?php |
||||||
|
|
||||||
|
switch (get_field('weight')){ |
||||||
|
case ('below_1_5'): |
||||||
|
$w = esc_html__('from 0,5 kg to 1,5 kg', 'woodmart' ); |
||||||
|
break; |
||||||
|
case ('1_5-3'): |
||||||
|
$w = esc_html__('from 1.5 to 3 kg', 'woodmart' ); |
||||||
|
break; |
||||||
|
case ('3-5'): |
||||||
|
$w = esc_html__('from 3 to 5 kg', 'woodmart' ); |
||||||
|
break; |
||||||
|
case ('5-8'): |
||||||
|
$w = esc_html__('from 5 to 8 kg', 'woodmart' ); |
||||||
|
break; |
||||||
|
case ('8-11'): |
||||||
|
$w = esc_html__('from 8 to 11 kg', 'woodmart' ); |
||||||
|
break; |
||||||
|
case ('11-15'): |
||||||
|
$w = esc_html__('from 11 to 15 kg', 'woodmart' ); |
||||||
|
break; |
||||||
|
case ('15-20'): |
||||||
|
$w = esc_html__('from 15 to 20 kg', 'woodmart' ); |
||||||
|
break; |
||||||
|
case ('20-25'): |
||||||
|
$w = esc_html__('from 20 to 25 kg', 'woodmart' ); |
||||||
|
break; |
||||||
|
|
||||||
|
|
||||||
|
case ('25-35'): |
||||||
|
$w = esc_html__('from 25 to 35 kg', 'woodmart' ); |
||||||
|
break; |
||||||
|
|
||||||
|
|
||||||
|
case ('more_35'): |
||||||
|
$w = esc_html__('More than 35 kg', 'woodmart' ); |
||||||
|
break; |
||||||
|
|
||||||
|
} |
||||||
|
switch (get_field('old')){ |
||||||
|
case ('normal'): |
||||||
|
$old = esc_html__('Adult (from 1 year to 7 years)', 'woodmart' ); |
||||||
|
break; |
||||||
|
case ('old'): |
||||||
|
$old = esc_html__('Elderly (from 7 to 12 years)', 'woodmart' ); |
||||||
|
break; |
||||||
|
case ('very_old'): |
||||||
|
$old = esc_html__('Aging (12 years and older)', 'woodmart' ); |
||||||
|
break; |
||||||
|
case ('baby'): |
||||||
|
$old = esc_html__('Baby (from 0 to 1 year)' ); |
||||||
|
break; |
||||||
|
} |
||||||
|
|
||||||
|
switch (get_field('activity')){ |
||||||
|
case ('low'): |
||||||
|
$act = esc_html__('Low', 'woodmart' ); |
||||||
|
break; |
||||||
|
case ('moderate'): |
||||||
|
$act = esc_html__('Moderate', 'woodmart' ); |
||||||
|
break; |
||||||
|
case ('high'): |
||||||
|
$act = esc_html__('High', 'woodmart' ); |
||||||
|
break; |
||||||
|
|
||||||
|
} |
||||||
|
?> |
||||||
|
<div class="cabinet-card cabinet-card--green"> |
||||||
|
<div class="cabinet-card__content"> |
||||||
|
<div class="cabinet-card__pet"> |
||||||
|
<div class="cabinet-card-pet__icon"> |
||||||
|
<div class="cabinet-card-pet-icon__content"> |
||||||
|
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/pet/mini-<?php echo get_field('type', $item) ?>.png" alt="">
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<p class="cabinet-card-pet__name"><?php echo get_the_title($item) ?></p>
|
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="cabinet-card__element"> |
||||||
|
<p class="cabinet-card__label"><?php echo esc_html__('Breed', 'woodmart' ) ?>:</p>
|
||||||
|
<p class="cabinet-card__text"><?php echo get_field('breed', $item) ?></p>
|
||||||
|
</div> |
||||||
|
<div class="cabinet-card__element"> |
||||||
|
<p class="cabinet-card__label"><?php echo esc_html__('Weight', 'woodmart' ) ?>:</p>
|
||||||
|
<p class="cabinet-card__text"><?php echo $w; ?></p>
|
||||||
|
</div> |
||||||
|
<?php if ($old): ?> |
||||||
|
<div class="cabinet-card__element"> |
||||||
|
<p class="cabinet-card__label"><?php echo esc_html__('Age', 'woodmart' ) ?>:</p>
|
||||||
|
<p class="cabinet-card__text"><?php echo $old; ?></p>
|
||||||
|
</div> |
||||||
|
|
||||||
|
<?php |
||||||
|
else: |
||||||
|
?> |
||||||
|
<?php |
||||||
|
$zero = ''; |
||||||
|
if (intval(get_field('month', $item)) < 10){ |
||||||
|
$zero = '0'; |
||||||
|
} |
||||||
|
?> |
||||||
|
<div class="cabinet-card__element"> |
||||||
|
<p class="cabinet-card__label"><?php echo esc_html__('Birhtday', 'woodmart' ) ?>:</p>
|
||||||
|
<p class="cabinet-card__text"><?php echo get_field('day', $item) . '.' . $zero . get_field('month', $item) . '.' . get_field('year', $item); ?></p>
|
||||||
|
</div> |
||||||
|
<?php |
||||||
|
endif; |
||||||
|
?> |
||||||
|
<div class="cabinet-card__element"> |
||||||
|
<p class="cabinet-card__label"><?php echo esc_html__('Activity', 'woodmart' ) ?>:</p>
|
||||||
|
<p class="cabinet-card__text"><?php echo $act; ?></p>
|
||||||
|
</div> |
||||||
|
<?php |
||||||
|
if (get_field('type', $item) == 'cat' && get_field('sterilized', $item)): |
||||||
|
?> |
||||||
|
<div class="cabinet-card__element"> |
||||||
|
<p class="cabinet-card__label"><?php echo esc_html__('Sterilized', 'woodmart' ) ?></p>
|
||||||
|
|
||||||
|
</div> |
||||||
|
<?php |
||||||
|
endif; |
||||||
|
?> |
||||||
|
<div class="cabinet-card__element"> |
||||||
|
<button class="cabinet-card__button" data-edit="<?php echo get_the_ID($item); ?>">
|
||||||
|
<?php echo esc_html__('Edit', 'woodmart' ) ?> |
||||||
|
</button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<?php |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
// Подключение скриптов и стилей |
||||||
|
// add_action('wp_enqueue_scripts', 'enqueue_checkout_scripts'); |
||||||
|
// function enqueue_checkout_scripts() { |
||||||
|
// if (is_checkout()) { |
||||||
|
// wp_enqueue_style('custom-checkout', get_template_directory_uri() . '/modules/shop/components/checkout/assets/css/checkout.css', [], '1.0.1'); |
||||||
|
// wp_enqueue_script('custom-checkout', get_template_directory_uri() . '/modules/shop/components/checkout/assets/js/script.js', ['jquery'], '1.0.1', true); |
||||||
|
// wp_localize_script('custom-checkout', 'wc_checkout_params', [ |
||||||
|
// 'ajax_url' => admin_url('admin-ajax.php'), |
||||||
|
// 'nonce' => wp_create_nonce('wc_checkout_nonce') |
||||||
|
// ]); |
||||||
|
// } |
||||||
|
// } |
||||||
|
|
||||||
|
// // AJAX-обработчик для обновления количества |
||||||
|
// add_action('wp_ajax_update_cart_quantity', 'update_cart_quantity_callback'); |
||||||
|
// add_action('wp_ajax_nopriv_update_cart_quantity', 'update_cart_quantity_callback'); |
||||||
|
// function update_cart_quantity_callback() { |
||||||
|
// check_ajax_referer('wc_checkout_nonce', 'nonce'); |
||||||
|
|
||||||
|
// $cart_item_key = sanitize_text_field($_POST['cart_item_key']); |
||||||
|
// $quantity = intval($_POST['quantity']); |
||||||
|
|
||||||
|
// if ($quantity > 0) { |
||||||
|
// WC()->cart->set_quantity($cart_item_key, $quantity); |
||||||
|
// } else { |
||||||
|
// WC()->cart->remove_cart_item($cart_item_key); |
||||||
|
// } |
||||||
|
|
||||||
|
// WC()->cart->calculate_totals(); |
||||||
|
|
||||||
|
// // Подготовка фрагментов |
||||||
|
// $fragments = []; |
||||||
|
|
||||||
|
// // Обновление списка товаров |
||||||
|
// ob_start(); |
||||||
|
// wc_get_template('checkout/form-checkout.php', [], '', get_template_directory() . '/woocommerce/'); |
||||||
|
// $fragments['.order-your__products'] = ob_get_clean(); |
||||||
|
|
||||||
|
// // Обновление секции итогов |
||||||
|
// ob_start(); |
||||||
|
// woocommerce_checkout_coupon_form(); |
||||||
|
// woocommerce_order_review(); |
||||||
|
// $fragments['.order-your__calculation'] = ob_get_clean(); |
||||||
|
|
||||||
|
// // Подготовка цен для каждого товара |
||||||
|
// $item_prices = []; |
||||||
|
// foreach (WC()->cart->get_cart() as $item_key => $item) { |
||||||
|
// $item_prices[$item_key] = WC()->cart->get_product_subtotal($item['data'], $item['quantity']); |
||||||
|
// } |
||||||
|
|
||||||
|
// wp_send_json_success([ |
||||||
|
// 'fragments' => $fragments, |
||||||
|
// 'item_prices' => $item_prices, |
||||||
|
// 'cart_total' => WC()->cart->get_cart_total() |
||||||
|
// ]); |
||||||
|
// } |
||||||
|
|
||||||
|
// // AJAX-обработчик для удаления товара |
||||||
|
// add_action('wp_ajax_remove_cart_item', 'remove_cart_item_callback'); |
||||||
|
// add_action('wp_ajax_nopriv_remove_cart_item', 'remove_cart_item_callback'); |
||||||
|
// function remove_cart_item_callback() { |
||||||
|
// check_ajax_referer('wc_checkout_nonce', 'nonce'); |
||||||
|
|
||||||
|
// $cart_item_key = sanitize_text_field($_POST['cart_item_key']); |
||||||
|
// WC()->cart->remove_cart_item($cart_item_key); |
||||||
|
// WC()->cart->calculate_totals(); |
||||||
|
|
||||||
|
// // Подготовка фрагментов |
||||||
|
// $fragments = []; |
||||||
|
|
||||||
|
// // Обновление списка товаров |
||||||
|
// ob_start(); |
||||||
|
// wc_get_template('checkout/form-checkout.php', [], '', get_template_directory() . '/woocommerce/'); |
||||||
|
// $fragments['.order-your__products'] = ob_get_clean(); |
||||||
|
|
||||||
|
// // Обновление секции итогов |
||||||
|
// ob_start(); |
||||||
|
// woocommerce_checkout_coupon_form(); |
||||||
|
// woocommerce_order_review(); |
||||||
|
// $fragments['.order-your__calculation'] = ob_get_clean(); |
||||||
|
|
||||||
|
// wp_send_json_success([ |
||||||
|
// 'fragments' => $fragments, |
||||||
|
// 'cart_total' => WC()->cart->get_cart_total() |
||||||
|
// ]); |
||||||
|
// } |
||||||
|
|
@ -1,11 +0,0 @@ |
|||||||
<?php |
|
||||||
|
|
||||||
add_action('wp_head', function() { |
|
||||||
?> |
|
||||||
|
|
||||||
<script> |
|
||||||
window.ajax_url = '<?php echo admin_url('admin-ajax.php') ?>';
|
|
||||||
</script> |
|
||||||
|
|
||||||
<?php |
|
||||||
}, 1); |
|
@ -1,380 +0,0 @@ |
|||||||
<? |
|
||||||
|
|
||||||
/** |
|
||||||
* Добавление событий контрибуции для FP Pixel |
|
||||||
* только на боевом сайте АЕ |
|
||||||
*/ |
|
||||||
if ($site_env->site_mode == 'production' && $site_env->site_region == 'ae') { |
|
||||||
|
|
||||||
// Проверка на тестовый режим для метрик |
|
||||||
// TO_DO: дуюлирует логику is_gp_test_mode в wp-content/themes/cosmopet/global-functions/multisite-functions.php |
|
||||||
function is_gp_test_mode() |
|
||||||
{ |
|
||||||
if (isset($_GET['gp-test']) && $_GET['gp-test'] == '1') { |
|
||||||
return true; |
|
||||||
} |
|
||||||
if (is_user_logged_in() && current_user_can('administrator')) { |
|
||||||
return true; |
|
||||||
} |
|
||||||
return false; |
|
||||||
} |
|
||||||
|
|
||||||
add_action('wp_footer', 'add_facebook_pixel_events'); |
|
||||||
function add_facebook_pixel_events() |
|
||||||
{ |
|
||||||
if (is_gp_test_mode()) |
|
||||||
return; |
|
||||||
|
|
||||||
global $product; |
|
||||||
|
|
||||||
// 1. ViewContent |
|
||||||
if (is_product() && $product && $product->get_price() > 0) { |
|
||||||
?> |
|
||||||
<script> |
|
||||||
document.addEventListener('DOMContentLoaded', function() { |
|
||||||
fbq('track', 'ViewContent', { |
|
||||||
content_ids: ['<?php echo $product->get_id(); ?>'],
|
|
||||||
content_type: 'product', |
|
||||||
value: <?php echo $product->get_price(); ?>,
|
|
||||||
currency: '<?php echo get_woocommerce_currency(); ?>'
|
|
||||||
}); |
|
||||||
}); |
|
||||||
</script> |
|
||||||
<?php |
|
||||||
} |
|
||||||
|
|
||||||
// 2. InitiateCheckout |
|
||||||
if (is_checkout() && !is_wc_endpoint_url('order-received') && WC()->cart && WC()->cart->get_cart_contents_count() > 0) { |
|
||||||
?> |
|
||||||
<script> |
|
||||||
document.addEventListener('DOMContentLoaded', function() { |
|
||||||
fbq('track', 'InitiateCheckout'); |
|
||||||
}); |
|
||||||
</script> |
|
||||||
<?php |
|
||||||
} |
|
||||||
|
|
||||||
// 3. AddToCart |
|
||||||
if (is_product() || is_shop() || is_cart()) { |
|
||||||
?> |
|
||||||
<script> |
|
||||||
document.addEventListener('DOMContentLoaded', function() { |
|
||||||
jQuery(function($) { |
|
||||||
$(document.body).on('added_to_cart', function(event, fragments, cart_hash, $button) { |
|
||||||
var productId = $button.data('product_id') || ''; |
|
||||||
var quantity = $button.data('quantity') || 1; |
|
||||||
var productName = $button.data('product_sku') || |
|
||||||
$button.closest('.product').find('.woocommerce-loop-product__title').text().trim() || 'Unknown'; |
|
||||||
var priceElement = $button.closest('.product').find('.price .amount').text().replace(/[^0-9.]/g, '') || '0.00'; |
|
||||||
var currency = '<?php echo get_woocommerce_currency(); ?>';
|
|
||||||
|
|
||||||
fbq('track', 'AddToCart', { |
|
||||||
content_ids: [productId], |
|
||||||
content_type: 'product', |
|
||||||
value: parseFloat(priceElement) * quantity, |
|
||||||
currency: currency |
|
||||||
}); |
|
||||||
|
|
||||||
window.dataLayer = window.dataLayer || []; |
|
||||||
window.dataLayer.push({ |
|
||||||
'event': 'add_to_cart', |
|
||||||
'ecommerce': { |
|
||||||
'currency': currency, |
|
||||||
'value': parseFloat(priceElement) * quantity, |
|
||||||
'items': [{ |
|
||||||
'item_id': productId, |
|
||||||
'item_name': productName, |
|
||||||
'price': parseFloat(priceElement), |
|
||||||
'quantity': quantity |
|
||||||
}] |
|
||||||
} |
|
||||||
}); |
|
||||||
}); |
|
||||||
}); |
|
||||||
}); |
|
||||||
</script> |
|
||||||
<?php |
|
||||||
} |
|
||||||
|
|
||||||
// 4. AddPaymentInfo |
|
||||||
if (is_checkout() && !is_wc_endpoint_url('order-received') && WC()->cart && WC()->cart->get_cart_contents_count() > 0) { |
|
||||||
$currency = get_woocommerce_currency(); |
|
||||||
$cart_total = WC()->cart->get_total('edit'); |
|
||||||
?> |
|
||||||
<script> |
|
||||||
document.addEventListener('DOMContentLoaded', function() { |
|
||||||
fbq('track', 'AddPaymentInfo', { |
|
||||||
value: <?php echo $cart_total; ?>,
|
|
||||||
currency: '<?php echo $currency; ?>'
|
|
||||||
}); |
|
||||||
|
|
||||||
window.dataLayer = window.dataLayer || []; |
|
||||||
window.dataLayer.push({ |
|
||||||
'event': 'add_payment_info', |
|
||||||
'ecommerce': { |
|
||||||
'currency': '<?php echo $currency; ?>',
|
|
||||||
'value': <?php echo $cart_total; ?> |
|
||||||
} |
|
||||||
}); |
|
||||||
}); |
|
||||||
</script> |
|
||||||
<?php |
|
||||||
} |
|
||||||
|
|
||||||
// 5. Purchase |
|
||||||
if (is_wc_endpoint_url('order-received')) { |
|
||||||
$order_id = absint(get_query_var('order-received')); |
|
||||||
if (!$order_id) |
|
||||||
return; |
|
||||||
|
|
||||||
$order = wc_get_order($order_id); |
|
||||||
if (!$order || ($order->get_status() !== 'processing' && $order->get_status() !== 'completed')) |
|
||||||
return; |
|
||||||
|
|
||||||
$items = []; |
|
||||||
foreach ($order->get_items() as $item) { |
|
||||||
$product = $item->get_product(); |
|
||||||
$items[] = [ |
|
||||||
'item_id' => $product->get_id(), |
|
||||||
'item_name' => $product->get_name(), |
|
||||||
'price' => $product->get_price(), |
|
||||||
'quantity' => $item->get_quantity() |
|
||||||
]; |
|
||||||
} |
|
||||||
?> |
|
||||||
<script> |
|
||||||
document.addEventListener('DOMContentLoaded', function() { |
|
||||||
fbq('track', 'Purchase', { |
|
||||||
value: <?php echo $order->get_total(); ?>,
|
|
||||||
currency: '<?php echo $order->get_currency(); ?>',
|
|
||||||
content_ids: [<?php echo implode(',', array_column($items, 'item_id')); ?>],
|
|
||||||
content_type: 'product' |
|
||||||
}); |
|
||||||
|
|
||||||
window.dataLayer = window.dataLayer || []; |
|
||||||
window.dataLayer.push({ |
|
||||||
'event': 'purchase', |
|
||||||
'ecommerce': { |
|
||||||
'currency': '<?php echo $order->get_currency(); ?>',
|
|
||||||
'value': <?php echo $order->get_total(); ?>,
|
|
||||||
'items': <?php echo json_encode($items); ?> |
|
||||||
} |
|
||||||
}); |
|
||||||
}); |
|
||||||
</script> |
|
||||||
<?php |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
add_action('woocommerce_thankyou', 'send_purchase_to_metrika'); |
|
||||||
function send_purchase_to_metrika($order_id) |
|
||||||
{ |
|
||||||
if (is_gp_test_mode()) |
|
||||||
return; |
|
||||||
|
|
||||||
if (!$order_id) |
|
||||||
return; |
|
||||||
|
|
||||||
$order = wc_get_order($order_id); |
|
||||||
if ($order->get_status() !== 'processing' && $order->get_status() !== 'completed') |
|
||||||
return; |
|
||||||
|
|
||||||
$items = []; |
|
||||||
foreach ($order->get_items() as $item) { |
|
||||||
$product = $item->get_product(); |
|
||||||
$items[] = [ |
|
||||||
'id' => $product->get_id(), |
|
||||||
'name' => $product->get_name(), |
|
||||||
'price' => $product->get_price(), |
|
||||||
'quantity' => $item->get_quantity() |
|
||||||
]; |
|
||||||
} |
|
||||||
|
|
||||||
$currency = $order->get_currency(); |
|
||||||
?> |
|
||||||
<script> |
|
||||||
window.dataLayer = window.dataLayer || []; |
|
||||||
dataLayer.push({ |
|
||||||
'ecommerce': { |
|
||||||
'purchase': { |
|
||||||
'actionField': { |
|
||||||
'id': '<?php echo $order_id; ?>',
|
|
||||||
'revenue': '<?php echo $order->get_total(); ?>',
|
|
||||||
'currency': '<?php echo $currency; ?>'
|
|
||||||
}, |
|
||||||
'products': <?php echo json_encode($items); ?> |
|
||||||
} |
|
||||||
} |
|
||||||
}); |
|
||||||
|
|
||||||
yaCounter96481053.reachGoal('purchase', { |
|
||||||
'order_id': '<?php echo $order_id; ?>',
|
|
||||||
'order_price': '<?php echo $order->get_total(); ?>',
|
|
||||||
'currency': '<?php echo $currency; ?>',
|
|
||||||
'items': <?php echo json_encode($items); ?> |
|
||||||
}); |
|
||||||
|
|
||||||
fbq('track', 'Purchase', { |
|
||||||
value: <?php echo $order->get_total(); ?>,
|
|
||||||
currency: '<?php echo $currency; ?>',
|
|
||||||
content_ids: [<?php echo implode(',', array_column($items, 'id')); ?>],
|
|
||||||
content_type: 'product' |
|
||||||
}); |
|
||||||
</script> |
|
||||||
<?php |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
// Функция событий Meta Pixel |
|
||||||
|
|
||||||
add_action('wp_head', function () { |
|
||||||
global $site_env; |
|
||||||
$show_pixel = false; |
|
||||||
|
|
||||||
// Для продакшена |
|
||||||
if ($site_env->site_mode === 'production' && $site_env->site_region === 'ae') { |
|
||||||
$show_pixel = true; |
|
||||||
} |
|
||||||
|
|
||||||
// Для тестовых стендов AE |
|
||||||
if ($site_env->site_mode === 'develope' && $site_env->site_region === 'ae') { |
|
||||||
$show_pixel = true; |
|
||||||
} |
|
||||||
|
|
||||||
// Дополнительные проверки |
|
||||||
$skip_tracking = false; |
|
||||||
|
|
||||||
// Исключаем админов |
|
||||||
if (current_user_can('administrator')) { |
|
||||||
$skip_tracking = true; |
|
||||||
} |
|
||||||
|
|
||||||
// Исключаем gp-test режим |
|
||||||
if ($site_env->is_gp_test_mode) { |
|
||||||
$skip_tracking = true; |
|
||||||
} |
|
||||||
|
|
||||||
// Исключаем если есть параметр gp-test=1 в URL |
|
||||||
if (isset($_GET['gp-test']) && $_GET['gp-test'] == '1') { |
|
||||||
$skip_tracking = true; |
|
||||||
} |
|
||||||
|
|
||||||
if ($show_pixel && !$skip_tracking) { |
|
||||||
$context = [ |
|
||||||
'currency' => get_woocommerce_currency(), |
|
||||||
]; |
|
||||||
|
|
||||||
// Определяем тип страницы и подготавливаем данные |
|
||||||
if (is_product()) { |
|
||||||
// Страница товара - ViewContent |
|
||||||
global $product; |
|
||||||
if ($product && $product instanceof WC_Product) { |
|
||||||
$context['pixel_event_type'] = 'ViewContent'; |
|
||||||
$context['product'] = [ |
|
||||||
'id' => $product->get_id(), |
|
||||||
'name' => $product->get_name(), |
|
||||||
'price' => floatval($product->get_price()), |
|
||||||
'sku' => $product->get_sku(), |
|
||||||
'category' => wp_get_post_terms($product->get_id(), 'product_cat', ['fields' => 'names'])[0] ?? '', |
|
||||||
]; |
|
||||||
} |
|
||||||
} elseif (is_checkout() && !is_order_received_page()) { |
|
||||||
// Страница чекаута - InitiateCheckout |
|
||||||
$context['pixel_event_type'] = 'InitiateCheckout'; |
|
||||||
if (WC()->cart && !WC()->cart->is_empty()) { |
|
||||||
$context['cart_total'] = floatval(WC()->cart->get_total('edit')); |
|
||||||
$context['cart_items'] = []; |
|
||||||
$context['content_ids'] = []; |
|
||||||
|
|
||||||
foreach (WC()->cart->get_cart() as $cart_item) { |
|
||||||
$product = $cart_item['data']; |
|
||||||
if ($product && $product instanceof WC_Product) { |
|
||||||
$item_data = [ |
|
||||||
'item_id' => $product->get_id(), |
|
||||||
'item_name' => $product->get_name(), |
|
||||||
'price' => floatval($product->get_price()), |
|
||||||
'quantity' => intval($cart_item['quantity']), |
|
||||||
'category' => wp_get_post_terms($product->get_id(), 'product_cat', ['fields' => 'names'])[0] ?? '', |
|
||||||
]; |
|
||||||
$context['cart_items'][] = $item_data; |
|
||||||
$context['content_ids'][] = $product->get_id(); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} elseif (is_order_received_page()) { |
|
||||||
// Страница благодарности - Purchase |
|
||||||
$order_id = get_query_var('order-received'); |
|
||||||
if ($order_id) { |
|
||||||
$order = wc_get_order($order_id); |
|
||||||
if ($order && $order instanceof WC_Order) { |
|
||||||
$context['pixel_event_type'] = 'Purchase'; |
|
||||||
$order_items = []; |
|
||||||
$content_ids = []; |
|
||||||
|
|
||||||
foreach ($order->get_items() as $item) { |
|
||||||
if ($item instanceof WC_Order_Item_Product) { |
|
||||||
$product = $item->get_product(); |
|
||||||
if ($product && $product instanceof WC_Product) { |
|
||||||
$order_items[] = [ |
|
||||||
'item_id' => $product->get_id(), |
|
||||||
'item_name' => $product->get_name(), |
|
||||||
'price' => floatval($item->get_total() / $item->get_quantity()), |
|
||||||
'quantity' => intval($item->get_quantity()), |
|
||||||
'category' => wp_get_post_terms($product->get_id(), 'product_cat', ['fields' => 'names'])[0] ?? '', |
|
||||||
]; |
|
||||||
$content_ids[] = $product->get_id(); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
$context['order'] = [ |
|
||||||
'id' => $order->get_id(), |
|
||||||
'total' => floatval($order->get_total()), |
|
||||||
'currency' => $order->get_currency(), |
|
||||||
'items' => $order_items, |
|
||||||
'content_ids' => $content_ids, |
|
||||||
'order_key' => $order->get_order_key(), |
|
||||||
]; |
|
||||||
} |
|
||||||
} |
|
||||||
} else { |
|
||||||
// Все остальные страницы - PageView + подготовка для AddToCart |
|
||||||
$context['pixel_event_type'] = 'PageView'; |
|
||||||
$context['enable_addtocart'] = true; // Включаем обработчик AddToCart |
|
||||||
|
|
||||||
// Дополнительные данные для PageView |
|
||||||
global $wp_query; |
|
||||||
$context['page_data'] = [ |
|
||||||
'page_title' => wp_get_document_title(), |
|
||||||
'page_url' => home_url(add_query_arg(array(), $wp_query->request)), |
|
||||||
'page_type' => get_page_type(), |
|
||||||
]; |
|
||||||
} |
|
||||||
|
|
||||||
// Рендерим шаблон |
|
||||||
\Timber\Timber::render('templates/head-pixel-functions.twig', $context); |
|
||||||
} |
|
||||||
}); |
|
||||||
|
|
||||||
|
|
||||||
function get_page_type() |
|
||||||
{ |
|
||||||
if (is_home() || is_front_page()) { |
|
||||||
return 'home'; |
|
||||||
} elseif (is_shop()) { |
|
||||||
return 'shop'; |
|
||||||
} elseif (is_product_category()) { |
|
||||||
return 'category'; |
|
||||||
} elseif (is_product_tag()) { |
|
||||||
return 'tag'; |
|
||||||
} elseif (is_search()) { |
|
||||||
return 'search'; |
|
||||||
} elseif (is_cart()) { |
|
||||||
return 'cart'; |
|
||||||
} elseif (is_account_page()) { |
|
||||||
return 'account'; |
|
||||||
} else { |
|
||||||
return 'other'; |
|
||||||
} |
|
||||||
} |
|
@ -1,16 +0,0 @@ |
|||||||
<?php |
|
||||||
add_action('wp_enqueue_scripts', 'override_cdek_widget_script', 100); |
|
||||||
function override_cdek_widget_script() { |
|
||||||
// Убираем оригинал |
|
||||||
wp_dequeue_script('cdek-map'); |
|
||||||
wp_deregister_script('cdek-map'); |
|
||||||
|
|
||||||
// Подключаем свой модифицированный |
|
||||||
wp_enqueue_script( |
|
||||||
'cdek-map', // тот же handle — это ВАЖНО! |
|
||||||
get_stylesheet_directory_uri() . '/static/js/cdek-map.js', |
|
||||||
['jquery', 'lodash', 'wp-i18n', 'cdek-widget'], // зависимости, если нужны |
|
||||||
'1.0', |
|
||||||
true // в футере |
|
||||||
); |
|
||||||
} |
|
@ -1,25 +0,0 @@ |
|||||||
<?php |
|
||||||
|
|
||||||
add_action('init', 'register_pets'); |
|
||||||
function register_pets(){ |
|
||||||
register_post_type('pets', 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' => false, |
|
||||||
'show_ui' => true, |
|
||||||
'supports' => array('title','editor') |
|
||||||
) ); |
|
||||||
} |
|
@ -1,31 +0,0 @@ |
|||||||
<?php |
|
||||||
|
|
||||||
add_action('template_redirect', 'redirect_non_logged_in_users'); |
|
||||||
|
|
||||||
function redirect_non_logged_in_users() { |
|
||||||
// URL личного кабинета (замените 'your-account-page-slug' на ваш slug) |
|
||||||
$account_page_slug = 'my-account-3'; |
|
||||||
$account_page_slug__2 = 'my-account'; |
|
||||||
// Проверяем, находится ли пользователь на странице личного кабинета |
|
||||||
if (is_page($account_page_slug) && !is_user_logged_in() || is_page($account_page_slug__2) && !is_user_logged_in() ) { |
|
||||||
wp_redirect(home_url()); // Перенаправляем на главную страницу |
|
||||||
exit; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
add_action('template_redirect', 'custom_redirect_cart_to_checkout'); |
|
||||||
|
|
||||||
function custom_redirect_cart_to_checkout() { |
|
||||||
if (is_cart()) { |
|
||||||
// Проверка, если корзина пуста |
|
||||||
if (WC()->cart->is_empty()) { |
|
||||||
wp_redirect(home_url()); |
|
||||||
exit; |
|
||||||
} else { |
|
||||||
// Редирект на страницу чекаута |
|
||||||
wp_redirect(wc_get_checkout_url()); |
|
||||||
exit; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,18 +0,0 @@ |
|||||||
<? |
|
||||||
|
|
||||||
add_filter('wpseo_canonical', '__return_false'); |
|
||||||
add_filter('wpseo_opengraph_url', '__return_false'); |
|
||||||
add_filter('wpseo_add_x_default_hreflang', '__return_false'); |
|
||||||
add_filter('wpseo_disable_adjacent_rel_links', '__return_true'); |
|
||||||
|
|
||||||
/* Добавление canonical-ссылок */ |
|
||||||
add_action('wp_head', function () { |
|
||||||
if (!is_admin()) { |
|
||||||
static $canonical_added = false; |
|
||||||
if ($canonical_added) |
|
||||||
return; |
|
||||||
$canonical_added = true; |
|
||||||
$current_url = strtok(trailingslashit(home_url($_SERVER['REQUEST_URI'])), '?'); |
|
||||||
echo '<link rel="canonical" href="' . esc_url($current_url) . '" />' . "\n"; |
|
||||||
} |
|
||||||
}); |
|
Before Width: | Height: | Size: 213 KiB After Width: | Height: | Size: 216 KiB |
Before Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 157 KiB After Width: | Height: | Size: 167 KiB |
Before Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 240 KiB After Width: | Height: | Size: 261 KiB |
Before Width: | Height: | Size: 188 KiB |
Before Width: | Height: | Size: 239 KiB After Width: | Height: | Size: 261 KiB |
Before Width: | Height: | Size: 190 KiB |
Before Width: | Height: | Size: 224 KiB After Width: | Height: | Size: 247 KiB |
Before Width: | Height: | Size: 182 KiB |
Before Width: | Height: | Size: 416 KiB After Width: | Height: | Size: 429 KiB |
Before Width: | Height: | Size: 261 KiB |
@ -1,13 +1 @@ |
|||||||
/* Стили для планшетов */ |
/* Стили для планшетов */ |
||||||
@media (min-width:769px) and (max-width:1200px) { |
|
||||||
.anons-best__card-wrap { |
|
||||||
display: grid; |
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr))!important; |
|
||||||
gap: 24px; |
|
||||||
} |
|
||||||
.anons-article__card-wrap { |
|
||||||
display: grid; |
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr))!important; |
|
||||||
gap: 40px 25px; |
|
||||||
} |
|
||||||
} |
|
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 145 KiB |
Before Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 787 B After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 628 B |
@ -1,53 +0,0 @@ |
|||||||
<?php |
|
||||||
use Timber\Timber; |
|
||||||
|
|
||||||
$context = Timber::context(); |
|
||||||
$post = Timber::get_post(); |
|
||||||
$context['post'] = $post; |
|
||||||
$context['top_level_comments'] = get_comments([ |
|
||||||
'post_id' => $post->ID, |
|
||||||
'status' => 'approve', |
|
||||||
'parent' => 0, |
|
||||||
'order' => 'ASC' |
|
||||||
]); |
|
||||||
|
|
||||||
$context['is_user_logged_in'] = is_user_logged_in(); |
|
||||||
$context['comment_form_args'] = [ |
|
||||||
'comment_field' => '<div class="comment-form-comment"><textarea id="comment" name="comment" placeholder="' . pll__('Ваш комментарий') . '" required></textarea></div>', |
|
||||||
'title_reply' => pll__('Оставить комментарий'), |
|
||||||
'title_reply_to' => pll__('Ответить %s'), |
|
||||||
'cancel_reply_link' => pll__('Отменить'), |
|
||||||
'id_form' => 'commentform', |
|
||||||
'id_submit' => 'submit', |
|
||||||
'class_submit' => 'comment-submit-btn', |
|
||||||
'submit_button' => '<button name="%1$s" type="submit" id="%2$s" class="%3$s">%4$s</button>', |
|
||||||
'submit_field' => '<div class="form-submit">%1$s %2$s</div>', |
|
||||||
'fields' => [ |
|
||||||
'author' => '', |
|
||||||
'email' => '', |
|
||||||
'url' => '', |
|
||||||
'cookies' => '', |
|
||||||
], |
|
||||||
]; |
|
||||||
|
|
||||||
function get_all_nested_replies($comment_id, $post_id) { |
|
||||||
$all_replies = []; |
|
||||||
$direct_replies = get_comments([ |
|
||||||
'post_id' => $post_id, |
|
||||||
'status' => 'approve', |
|
||||||
'parent' => $comment_id, |
|
||||||
'order' => 'ASC' |
|
||||||
]); |
|
||||||
$all_replies = array_merge($all_replies, $direct_replies); |
|
||||||
foreach ($direct_replies as $reply) { |
|
||||||
$all_replies = array_merge($all_replies, get_all_nested_replies($reply->comment_ID, $post_id)); |
|
||||||
} |
|
||||||
return $all_replies; |
|
||||||
} |
|
||||||
|
|
||||||
foreach ($context['top_level_comments'] as $comment) { |
|
||||||
$comment->replies = get_all_nested_replies($comment->comment_ID, $post->ID); |
|
||||||
} |
|
||||||
|
|
||||||
Timber::render('/blog/comments/comments.twig', $context); |
|
||||||
?> |
|
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 138 KiB |
Before Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 142 KiB |
Before Width: | Height: | Size: 91 KiB |
Before Width: | Height: | Size: 298 KiB After Width: | Height: | Size: 310 KiB |
Before Width: | Height: | Size: 191 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 902 B |
@ -1,23 +0,0 @@ |
|||||||
jQuery('.main-blog_tags-tag').on('click', function(){ |
|
||||||
var category = jQuery(this).data('category'); // Получаем значение data-category
|
|
||||||
jQuery('.main-blog_tags-tag').removeClass('active') |
|
||||||
jQuery(this).addClass('active') |
|
||||||
jQuery.ajax({ |
|
||||||
url: window.ajax_url,
|
|
||||||
type: 'POST', |
|
||||||
data: { |
|
||||||
action: 'front_page_get_blog_posts', |
|
||||||
category: category |
|
||||||
}, |
|
||||||
beforeSend: function() { |
|
||||||
|
|
||||||
}, |
|
||||||
success: function(response) { |
|
||||||
jQuery('.main-blog_wrapper').html(response) |
|
||||||
}, |
|
||||||
error: function(error) { |
|
||||||
// Обработка ошибок
|
|
||||||
console.error('Ошибка AJAX:', error); |
|
||||||
} |
|
||||||
}); |
|
||||||
}); |
|
@ -1,25 +0,0 @@ |
|||||||
<?php |
|
||||||
include_component('blog', 'themes'); |
|
||||||
add_filter('timber/context', function($context) { |
|
||||||
$args = array( |
|
||||||
'post_type' => 'post', |
|
||||||
'posts_per_page' => 5, |
|
||||||
'post_status' => 'publish', // Только опубликованные записи |
|
||||||
); |
|
||||||
$featured_query = new WP_Query($args); |
|
||||||
$f_query = array(); |
|
||||||
$i = 0; |
|
||||||
foreach($featured_query->posts as $item){ |
|
||||||
if ($i > 0){ |
|
||||||
$f_query[] = Timber::get_post($item, 'BlogPost'); |
|
||||||
} |
|
||||||
else{ |
|
||||||
$featured_post = Timber::get_post($item, 'BlogPost'); |
|
||||||
} |
|
||||||
$i++; |
|
||||||
} |
|
||||||
|
|
||||||
$context['blog_posts'] = $f_query; |
|
||||||
$context['featured_post'] = $featured_post; |
|
||||||
return $context; |
|
||||||
}); |
|
@ -1,38 +1,22 @@ |
|||||||
<?php |
<?php |
||||||
add_filter('timber/context', function($context) { |
add_filter('timber/context', function($context) { |
||||||
// Получаем текущую категорию |
// Простой запрос для получения последних постов |
||||||
$current_category = get_queried_object(); |
|
||||||
$category_id = null; |
|
||||||
|
|
||||||
if (isset($current_category) && !is_wp_error($current_category) && !empty($current_category->term_id)) { |
|
||||||
$category_id = $current_category->term_id; |
|
||||||
$category_name = $current_category->name; |
|
||||||
} else { |
|
||||||
$category_name = null; |
|
||||||
} |
|
||||||
|
|
||||||
// Формируем аргументы для запроса |
|
||||||
$args = array( |
$args = array( |
||||||
'post_type' => 'post', |
'post_type' => 'post', |
||||||
'posts_per_page' => 3, |
'posts_per_page' => 3, |
||||||
'meta_key' => 'post_views_count', // Предполагаемое мета-поле для просмотров |
'orderby' => 'date', |
||||||
'orderby' => 'meta_value_num', // Сортировка по числовому значению мета-поля |
'order' => 'DESC' |
||||||
'order' => 'DESC', |
|
||||||
); |
); |
||||||
|
|
||||||
// Если выбрана категория, добавляем фильтр по ней |
|
||||||
if ($category_id) { |
|
||||||
$args['cat'] = $category_id; |
|
||||||
} |
|
||||||
|
|
||||||
// Выполняем запрос |
|
||||||
$most_read_query = new WP_Query($args); |
$most_read_query = new WP_Query($args); |
||||||
$most_read = new Timber\PostQuery($most_read_query); |
$most_read = new Timber\PostQuery($most_read_query); |
||||||
|
|
||||||
// Добавляем данные в контекст |
|
||||||
$context['most_read'] = $most_read; |
$context['most_read'] = $most_read; |
||||||
$context['current_category'] = $category_name; |
|
||||||
$context['category_list'] = get_categories(); |
// Добавляем отладочную информацию |
||||||
|
global $wpdb; |
||||||
|
$debug_info = $wpdb->get_results("SELECT post_id, meta_key, meta_value FROM {$wpdb->postmeta} WHERE meta_key LIKE '%view%' LIMIT 5"); |
||||||
|
$context['debug_info'] = $debug_info; |
||||||
|
|
||||||
return $context; |
return $context; |
||||||
}); |
}); |
@ -0,0 +1,28 @@ |
|||||||
|
<div class="anons-best"> |
||||||
|
<h2 class="anons-best__title">{{ function('pll_e', 'САМЫЕ ЧИТАЕМЫЕ') }}:</h2> |
||||||
|
<ul class="anons-best__card-wrap"> |
||||||
|
{% for post in most_read %} |
||||||
|
<li class="anons-best__card"> |
||||||
|
<ul class="anons-best__card-alerts"> |
||||||
|
{% for category in post.categories %} |
||||||
|
<li> |
||||||
|
<a href="{{ category.link }}">{{ category.name }}</a> |
||||||
|
</li> |
||||||
|
{% endfor %} |
||||||
|
</ul> |
||||||
|
<a href="{{post.link}}" class="main-img"> |
||||||
|
<img src="{{post.thumbnail.src}}" alt="{{post.thumbnail.alt}}"> |
||||||
|
</a> |
||||||
|
<div class="anons-best__card-body"> |
||||||
|
<a href="{{post.link}}" class="anons-best__card-body__title">{{post.title}}</a> |
||||||
|
<div class="anons-best__card-body__datas"> |
||||||
|
<p>{{post.date}}</p> |
||||||
|
<p>{{ function('pll_e', 'время чтения') }}: {{post.reading_time}}</p> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</li> |
||||||
|
{% endfor %} |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 480 KiB After Width: | Height: | Size: 514 KiB |
Before Width: | Height: | Size: 281 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 382 KiB After Width: | Height: | Size: 453 KiB |
Before Width: | Height: | Size: 269 KiB |
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 148 KiB |
Before Width: | Height: | Size: 19 KiB |
@ -1,7 +0,0 @@ |
|||||||
.blog-notice{ |
|
||||||
font-size: .8em; |
|
||||||
font-weight: 300; |
|
||||||
color: rgba(0, 0, 0, 0.55); |
|
||||||
padding-top: .3rem; |
|
||||||
padding-bottom: .3rem; |
|
||||||
} |
|
Before Width: | Height: | Size: 28 KiB |
@ -1,48 +0,0 @@ |
|||||||
<?php |
|
||||||
|
|
||||||
function notice_render_callback($block, $content = '', $is_preview = false, $post_id = 0) { |
|
||||||
$context = Timber::context(); |
|
||||||
$context['block'] = $block; |
|
||||||
$context['is_preview'] = $is_preview; |
|
||||||
$context['content'] = get_field('content'); |
|
||||||
// Проверяем, есть ли картинка превью в блоке |
|
||||||
if ($is_preview && !empty($block['data']['preview_image'])) { |
|
||||||
echo '<img src="' . esc_url($block['data']['preview_image']) . '" alt="Preview" style="max-width: 100%; height: auto;">'; |
|
||||||
return; |
|
||||||
} |
|
||||||
Timber::render('modules/blog/editor-blocks/notice/editor-block-template.twig', $context); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
add_action('acf/init', function(){ |
|
||||||
if( function_exists('acf_register_block') ) { |
|
||||||
// register a testimonial block |
|
||||||
|
|
||||||
acf_register_block(array( |
|
||||||
'name' => 'gp_notice', |
|
||||||
'title' => __('GP - Notice'), |
|
||||||
'description' => __('A block to serve a text notice'), |
|
||||||
'render_callback' => 'notice_render_callback', |
|
||||||
'category' => 'formatting', |
|
||||||
'icon' => 'admin-comments', |
|
||||||
'keywords' => array( 'notice', 'simple block', 'gp-block',), |
|
||||||
'mode' => 'preview', |
|
||||||
'example' => array( |
|
||||||
'attributes' => array( |
|
||||||
'data' => array( |
|
||||||
'is_preview' => true, |
|
||||||
'preview_image' => get_template_directory_uri() . '/modules/blog/editor-blocks/notice/assets/img/preview.png' |
|
||||||
) |
|
||||||
) |
|
||||||
), |
|
||||||
'enqueue_assets' => function(){ |
|
||||||
wp_enqueue_style('gp_notice_style', get_template_directory_uri() . '/modules/blog/editor-blocks/notice/assets/css/style.css', array(), '5.0', 'all'); |
|
||||||
} |
|
||||||
)); |
|
||||||
} |
|
||||||
}); |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?> |
|
@ -1,4 +0,0 @@ |
|||||||
<section class="blog-notice"> |
|
||||||
{{ content }} |
|
||||||
</section> |
|
||||||
|
|
Before Width: | Height: | Size: 631 KiB After Width: | Height: | Size: 683 KiB |
Before Width: | Height: | Size: 445 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 213 KiB After Width: | Height: | Size: 247 KiB |
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 138 KiB |
Before Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 142 KiB |
Before Width: | Height: | Size: 91 KiB |