diff --git a/.htaccess b/.htaccess index 74b9808..5bdc198 100644 --- a/.htaccess +++ b/.htaccess @@ -1,3 +1,15 @@ RewriteEngine on RewriteCond %{HTTP:X-Forwarded-Proto} !https -RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] \ No newline at end of file +RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] + +# BEGIN WordPress + +RewriteEngine On +RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] +RewriteBase / +RewriteRule ^index\.php$ - [L] +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule . /index.php [L] + +# END WordPress diff --git a/wp-content/themes/sevastopol-tort-child/assets/css/home-page.css b/wp-content/themes/sevastopol-tort-child/assets/css/home-page.css new file mode 100644 index 0000000..6adc3cb --- /dev/null +++ b/wp-content/themes/sevastopol-tort-child/assets/css/home-page.css @@ -0,0 +1,171 @@ +.home-hero { + padding: 72px 0 58px; +} + +.home-hero__inner, +.home-categories__inner, +.home-steps__inner { + width: min(100% - 40px, var(--container)); + margin: 0 auto; +} + +.home-hero__inner { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr); + gap: 46px; + align-items: center; +} + +.home-hero__content { + display: grid; + gap: 24px; +} + +.home-hero__eyebrow { + color: var(--color-accent); + font-size: var(--fz-xs); + font-weight: 800; + letter-spacing: 0.12em; + text-transform: uppercase; +} + +.home-hero__title { + max-width: 780px; + font-size: var(--fz-xxl); + font-weight: 800; + line-height: var(--lh-tight); +} + +.home-hero__lead { + max-width: 650px; + color: var(--color-muted); + font-size: var(--fz-md); +} + +.home-hero__actions { + display: flex; + flex-wrap: wrap; + gap: 18px; +} + +.home-hero__media { + position: relative; + min-height: 520px; +} + +.home-hero__image { + position: absolute; + object-fit: cover; + box-shadow: var(--shadow-soft); +} + +.home-hero__image--main { + inset: 0 44px 44px 0; + width: calc(100% - 44px); + height: calc(100% - 44px); + border-radius: var(--radius-lg); +} + +.home-hero__image--small { + right: 0; + bottom: 0; + width: 42%; + aspect-ratio: 1; + border: 8px solid var(--color-bg); + border-radius: var(--radius-md); +} + +.home-categories, +.home-steps { + padding: 70px 0; +} + +.home-categories__head { + display: grid; + gap: 18px; +} + +.home-categories__grid { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 22px; + margin-top: 30px; +} + +.home-category-card { + position: relative; + aspect-ratio: 1; + overflow: hidden; + border-radius: var(--radius-md); + background: var(--color-surface-soft); + box-shadow: var(--shadow-soft); +} + +.home-category-card__image { + width: 100%; + height: 100%; + object-fit: cover; + transition: transform 0.25s ease; +} + +.home-category-card:hover .home-category-card__image { + transform: scale(1.04); +} + +.home-category-card__title { + position: absolute; + left: 18px; + bottom: 18px; + border-radius: 999px; + background: rgba(255, 255, 255, 0.92); + color: var(--color-text); + font-weight: 800; + padding: 10px 16px; +} + +.home-steps { + background: var(--color-surface-soft); +} + +.home-steps__inner { + display: grid; + grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.7fr); + gap: 44px; + align-items: start; +} + +.home-steps__content { + display: grid; + gap: 22px; +} + +.home-steps__list { + display: grid; + gap: 14px; + counter-reset: home-steps; +} + +.home-steps__item { + position: relative; + min-height: 48px; + border-bottom: 1px solid var(--color-line); + padding: 0 0 14px 56px; + color: var(--color-muted); +} + +.home-steps__item::before { + position: absolute; + left: 0; + top: 0; + counter-increment: home-steps; + content: counter(home-steps); + display: inline-flex; + align-items: center; + justify-content: center; + width: 38px; + height: 38px; + border-radius: 50%; + background: var(--color-accent); + color: #ffffff; + font-weight: 800; +} diff --git a/wp-content/themes/sevastopol-tort-child/assets/css/layout.css b/wp-content/themes/sevastopol-tort-child/assets/css/layout.css new file mode 100644 index 0000000..5249758 --- /dev/null +++ b/wp-content/themes/sevastopol-tort-child/assets/css/layout.css @@ -0,0 +1,353 @@ +.site-header { + position: sticky; + top: 0; + z-index: 50; + background: rgba(255, 248, 243, 0.94); + backdrop-filter: blur(18px); + border-bottom: 1px solid var(--color-line); +} + +.site-header__top { + border-bottom: 1px solid var(--color-line); +} + +.site-header__inner { + width: min(100% - 40px, var(--container)); + margin: 0 auto; +} + +.site-header__inner--top, +.site-header__inner--main { + display: flex; + align-items: center; + justify-content: space-between; + gap: 24px; +} + +.site-header__inner--top { + min-height: 38px; +} + +.site-header__inner--main { + min-height: 82px; +} + +.site-header__tagline, +.site-header__phone { + color: var(--color-muted); + font-size: var(--fz-sm); +} + +.site-header__phone { + font-weight: 700; +} + +.site-header__logo { + display: inline-flex; + align-items: center; + gap: 12px; + flex: 0 0 auto; +} + +.site-header__logo-image { + width: 58px; + height: 58px; + object-fit: contain; +} + +.site-header__logo-text { + font-size: var(--fz-sm); + font-weight: 800; + line-height: 1.15; + text-transform: uppercase; +} + +.site-header__nav { + flex: 1 1 auto; +} + +.site-header__menu { + display: flex; + align-items: center; + justify-content: center; + gap: 18px; +} + +.site-header__menu-link { + color: var(--color-muted); + font-size: var(--fz-sm); + font-weight: 700; + white-space: nowrap; +} + +.site-header__menu-link:hover { + color: var(--color-accent-dark); +} + +.site-header__cta { + display: inline-flex; + align-items: center; + justify-content: center; + min-height: 44px; + border-radius: 999px; + background: var(--color-text); + color: #ffffff; + font-size: var(--fz-sm); + font-weight: 800; + padding: 0 20px; + white-space: nowrap; +} + +.site-header__burger { + display: none; + width: 44px; + height: 44px; + border-radius: var(--radius-sm); + background: var(--color-surface); + box-shadow: var(--shadow-soft); +} + +.site-header__burger-line { + display: block; + width: 20px; + height: 2px; + margin: 4px auto; + background: var(--color-text); +} + +.mobile-menu { + position: fixed; + inset: 0; + z-index: 80; + display: none; +} + +.mobile-menu.is-open { + display: block; +} + +.mobile-menu__overlay { + position: absolute; + inset: 0; + background: rgba(44, 33, 29, 0.38); +} + +.mobile-menu__panel { + position: absolute; + top: 0; + right: 0; + width: min(360px, 100%); + height: 100%; + overflow: auto; + background: var(--color-bg); + padding: 24px; + box-shadow: -18px 0 60px rgba(44, 33, 29, 0.18); +} + +.mobile-menu__head { + display: flex; + align-items: center; + justify-content: space-between; + gap: 20px; +} + +.mobile-menu__title { + font-weight: 800; + text-transform: uppercase; +} + +.mobile-menu__close { + width: 44px; + height: 44px; + border-radius: var(--radius-sm); + background: var(--color-surface); + font-size: 1.8rem; + line-height: 1; +} + +.mobile-menu__nav, +.mobile-menu__contacts { + display: grid; + gap: 8px; + margin-top: 24px; +} + +.mobile-menu__link, +.mobile-menu__contact { + display: flex; + align-items: center; + min-height: 46px; + border-bottom: 1px solid var(--color-line); + font-weight: 700; +} + +.site-footer { + background: var(--color-text); + color: #ffffff; +} + +.site-footer__inner { + width: min(100% - 40px, var(--container)); + margin: 0 auto; + padding: 56px 0 26px; +} + +.site-footer__grid { + display: grid; + grid-template-columns: 1.2fr repeat(3, 1fr); + gap: 34px; +} + +.site-footer__logo-image { + width: 58px; + height: 58px; + object-fit: contain; +} + +.site-footer__text, +.site-footer__item, +.site-footer__copy, +.site-footer__policy { + color: rgba(255, 255, 255, 0.72); +} + +.site-footer__text { + max-width: 280px; + margin-top: 18px; +} + +.site-footer__title { + display: block; + font-weight: 800; + margin-bottom: 16px; +} + +.site-footer__list { + display: grid; + gap: 10px; +} + +.site-footer__link:hover, +.site-footer__policy:hover { + color: #ffffff; +} + +.site-footer__bottom { + display: flex; + align-items: center; + justify-content: space-between; + gap: 20px; + border-top: 1px solid rgba(255, 255, 255, 0.14); + margin-top: 46px; + padding-top: 24px; +} + +.lead-form { + display: grid; + gap: 16px; + border: 1px solid var(--color-line); + border-radius: var(--radius-lg); + background: var(--color-surface); + padding: 28px; + box-shadow: var(--shadow-soft); +} + +.lead-form__head { + display: grid; + gap: 8px; + margin-bottom: 6px; +} + +.lead-form__title { + font-size: var(--fz-lg); + font-weight: 800; + line-height: 1.2; +} + +.lead-form__text, +.lead-form__label, +.lead-form__consent-text, +.lead-form__status { + color: var(--color-muted); + font-size: var(--fz-sm); +} + +.lead-form__field { + display: grid; + gap: 8px; +} + +.lead-form__input, +.lead-form__textarea { + width: 100%; + border: 1px solid var(--color-line); + border-radius: var(--radius-sm); + background: var(--color-bg); + color: var(--color-text); + padding: 14px 16px; +} + +.lead-form__textarea { + min-height: 120px; +} + +.lead-form__consent { + display: grid; + grid-template-columns: 20px 1fr; + gap: 10px; + align-items: start; +} + +.lead-form__checkbox { + width: 18px; + height: 18px; + margin-top: 3px; + accent-color: var(--color-accent); +} + +.lead-form__consent-text a { + color: var(--color-accent-dark); + text-decoration: underline; +} + +.lead-form__button { + width: 100%; +} + +.lead-form__status { + color: var(--color-success); +} + +.cookie-note { + position: fixed; + right: 24px; + bottom: 24px; + z-index: 90; + width: min(420px, calc(100% - 48px)); +} + +.cookie-note__inner { + display: flex; + align-items: center; + justify-content: space-between; + gap: 18px; + border: 1px solid var(--color-line); + border-radius: var(--radius-md); + background: var(--color-surface); + padding: 16px; + box-shadow: var(--shadow-soft); +} + +.cookie-note__text { + color: var(--color-muted); + font-size: var(--fz-sm); +} + +.cookie-note__button { + min-height: 42px; + border-radius: 999px; + background: var(--color-text); + color: #ffffff; + font-weight: 800; + padding: 0 18px; +} diff --git a/wp-content/themes/sevastopol-tort-child/assets/css/normalize.min.css b/wp-content/themes/sevastopol-tort-child/assets/css/normalize.min.css new file mode 100644 index 0000000..b12dd61 --- /dev/null +++ b/wp-content/themes/sevastopol-tort-child/assets/css/normalize.min.css @@ -0,0 +1 @@ +html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}img{border-style:none}button,input,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button{overflow:visible;text-transform:none}button,[type=button],[type=submit]{-webkit-appearance:button}textarea{overflow:auto}details{display:block}summary{display:list-item}[hidden]{display:none} diff --git a/wp-content/themes/sevastopol-tort-child/assets/css/policy-page.css b/wp-content/themes/sevastopol-tort-child/assets/css/policy-page.css new file mode 100644 index 0000000..506caab --- /dev/null +++ b/wp-content/themes/sevastopol-tort-child/assets/css/policy-page.css @@ -0,0 +1,60 @@ +.policy-hero { + padding: 72px 0 46px; +} + +.policy-hero__inner, +.policy-content__inner { + width: min(100% - 40px, 900px); + margin: 0 auto; +} + +.policy-hero__inner { + display: grid; + gap: 20px; +} + +.policy-hero__eyebrow { + color: var(--color-accent); + font-size: var(--fz-xs); + font-weight: 800; + letter-spacing: 0.12em; + text-transform: uppercase; +} + +.policy-hero__title { + font-size: var(--fz-xxl); + font-weight: 800; + line-height: var(--lh-tight); +} + +.policy-hero__lead { + color: var(--color-muted); + font-size: var(--fz-md); +} + +.policy-content { + padding: 30px 0 80px; +} + +.policy-content__inner { + display: grid; + gap: 20px; +} + +.policy-content__block { + border: 1px solid var(--color-line); + border-radius: var(--radius-md); + background: var(--color-surface); + padding: 28px; +} + +.policy-content__title { + font-size: var(--fz-lg); + font-weight: 800; + line-height: 1.2; +} + +.policy-content__text { + margin-top: 12px; + color: var(--color-muted); +} diff --git a/wp-content/themes/sevastopol-tort-child/assets/css/reset.min.css b/wp-content/themes/sevastopol-tort-child/assets/css/reset.min.css new file mode 100644 index 0000000..7779d10 --- /dev/null +++ b/wp-content/themes/sevastopol-tort-child/assets/css/reset.min.css @@ -0,0 +1 @@ +*,*::before,*::after{box-sizing:border-box}html{scroll-behavior:smooth}body,h1,h2,h3,p,ol,ul{margin:0}ol,ul{padding:0}ul{list-style:none}a{color:inherit;text-decoration:none}button{border:0;background:transparent;padding:0;cursor:pointer}img,picture{display:block;max-width:100%;height:auto}input,textarea{border:0;border-radius:0}textarea{resize:vertical} diff --git a/wp-content/themes/sevastopol-tort-child/assets/css/responsive.css b/wp-content/themes/sevastopol-tort-child/assets/css/responsive.css new file mode 100644 index 0000000..c059bb8 --- /dev/null +++ b/wp-content/themes/sevastopol-tort-child/assets/css/responsive.css @@ -0,0 +1,130 @@ +@media (max-width: 1180px) { + .site-header__nav, + .site-header__cta { + display: none; + } + + .site-header__burger { + display: block; + } + + .service-hero__title, + .policy-hero__title { + font-size: 2.8rem; + } +} + +@media (max-width: 820px) { + .site-header__top { + display: none; + } + + .site-header__inner { + width: min(100% - 20px, var(--container)); + } + + .site-header__inner--main { + min-height: 72px; + } + + .site-header__logo-image { + width: 52px; + height: 52px; + } + + .site-header__logo-text { + font-size: 0.78rem; + } + + .service-hero, + .service-details, + .service-process, + .service-lead, + .home-hero, + .home-categories, + .home-steps, + .policy-hero, + .policy-content { + padding: 44px 0; + } + + .service-hero__inner, + .service-process__inner, + .service-lead__inner, + .home-hero__inner, + .home-steps__inner { + grid-template-columns: 1fr; + } + + .service-details__grid, + .home-categories__grid, + .site-footer__grid { + grid-template-columns: 1fr; + } + + .service-hero__inner, + .service-details__inner, + .service-process__inner, + .service-lead__inner, + .home-hero__inner, + .home-categories__inner, + .home-steps__inner, + .site-footer__inner, + .policy-hero__inner, + .policy-content__inner { + width: min(100% - 20px, var(--container)); + } + + .service-hero__title, + .home-hero__title, + .policy-hero__title { + font-size: 2.2rem; + } + + .home-hero__media { + min-height: auto; + aspect-ratio: 1; + } + + .section-title { + font-size: 1.7rem; + } + + .service-lead__inner { + gap: 28px; + } + + .site-footer__bottom { + align-items: flex-start; + flex-direction: column; + } + + .cookie-note { + right: 10px; + bottom: 10px; + width: calc(100% - 20px); + } + + .cookie-note__inner { + align-items: stretch; + flex-direction: column; + } +} + +@media (max-width: 480px) { + .service-hero__actions { + align-items: stretch; + flex-direction: column; + } + + .button-main, + .button-link { + width: 100%; + justify-content: center; + } + + .lead-form, + .policy-content__block { + padding: 20px; + } +} diff --git a/wp-content/themes/sevastopol-tort-child/assets/css/service-page.css b/wp-content/themes/sevastopol-tort-child/assets/css/service-page.css new file mode 100644 index 0000000..4686c77 --- /dev/null +++ b/wp-content/themes/sevastopol-tort-child/assets/css/service-page.css @@ -0,0 +1,173 @@ +.service-page { + overflow: hidden; +} + +.service-hero { + padding: 72px 0 56px; +} + +.service-hero__inner { + display: grid; + grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr); + align-items: center; + gap: 46px; + width: min(100% - 40px, var(--container)); + margin: 0 auto; +} + +.service-hero__content { + display: grid; + gap: 24px; +} + +.service-hero__eyebrow { + color: var(--color-accent); + font-size: var(--fz-xs); + font-weight: 800; + letter-spacing: 0.12em; + text-transform: uppercase; +} + +.service-hero__title { + max-width: 760px; + font-size: var(--fz-xxl); + font-weight: 800; + line-height: var(--lh-tight); +} + +.service-hero__lead { + max-width: 680px; + color: var(--color-muted); + font-size: var(--fz-md); +} + +.service-hero__actions { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 18px; +} + +.service-hero__media { + position: relative; + aspect-ratio: 1; + border-radius: var(--radius-lg); + overflow: hidden; + background: var(--color-surface-soft); + box-shadow: var(--shadow-soft); +} + +.service-hero__image { + width: 100%; + height: 100%; + object-fit: cover; +} + +.service-details, +.service-process, +.service-lead { + padding: 70px 0; +} + +.service-details__inner, +.service-process__inner, +.service-lead__inner { + width: min(100% - 40px, var(--container)); + margin: 0 auto; +} + +.service-details__content { + display: grid; + gap: 22px; +} + +.service-details__grid { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 22px; + margin-top: 10px; +} + +.service-process { + background: var(--color-surface-soft); +} + +.service-process__inner { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(300px, 0.44fr); + gap: 42px; + align-items: start; +} + +.service-process__content { + display: grid; + gap: 22px; +} + +.service-process__list { + display: grid; + gap: 14px; + counter-reset: steps; +} + +.service-process__item { + position: relative; + min-height: 54px; + border-bottom: 1px solid var(--color-line); + padding: 0 0 16px 58px; + color: var(--color-muted); +} + +.service-process__item::before { + position: absolute; + left: 0; + top: 0; + counter-increment: steps; + content: counter(steps); + display: inline-flex; + align-items: center; + justify-content: center; + width: 38px; + height: 38px; + border-radius: 50%; + background: var(--color-accent); + color: #ffffff; + font-weight: 800; +} + +.service-process__note { + border-radius: var(--radius-md); + background: var(--color-text); + color: #ffffff; + padding: 28px; +} + +.service-process__note-title { + display: block; + font-size: var(--fz-lg); + font-weight: 800; + line-height: 1.2; +} + +.service-process__note-text { + margin-top: 14px; + color: rgba(255, 255, 255, 0.78); +} + +.service-lead__inner { + display: grid; + grid-template-columns: minmax(0, 0.82fr) minmax(360px, 0.68fr); + gap: 44px; + align-items: start; +} + +.service-lead__content { + display: grid; + gap: 22px; +} + +.service-lead__text { + max-width: 560px; + color: var(--color-muted); + font-size: var(--fz-md); +} diff --git a/wp-content/themes/sevastopol-tort-child/assets/css/style-core.css b/wp-content/themes/sevastopol-tort-child/assets/css/style-core.css new file mode 100644 index 0000000..c8d974f --- /dev/null +++ b/wp-content/themes/sevastopol-tort-child/assets/css/style-core.css @@ -0,0 +1,130 @@ +@font-face { + font-family: "Manrope"; + src: url("../fonts/Manrope-VariableFont_wght.woff2") format("woff2"); + font-weight: 200 800; + font-style: normal; + font-display: swap; +} + +:root { + --color-bg: #fff8f3; + --color-surface: #ffffff; + --color-surface-soft: #f7ebe3; + --color-text: #2c211d; + --color-muted: #735f57; + --color-accent: #b94735; + --color-accent-dark: #8f3024; + --color-line: rgba(83, 49, 38, 0.14); + --color-success: #2f7d4f; + --font-main: "Manrope", Arial, sans-serif; + --container: 1180px; + --radius-sm: 8px; + --radius-md: 16px; + --radius-lg: 28px; + --shadow-soft: 0 22px 70px rgba(88, 53, 40, 0.12); + --fz-xs: 0.78rem; + --fz-sm: 0.92rem; + --fz-base: 1rem; + --fz-md: 1.12rem; + --fz-lg: 1.35rem; + --fz-xl: 2rem; + --fz-xxl: 3.6rem; + --lh-tight: 1.08; + --lh-base: 1.55; +} + +body { + min-width: 320px; + background: var(--color-bg); + color: var(--color-text); + font-family: var(--font-main); + font-size: var(--fz-base); + font-weight: 400; + line-height: var(--lh-base); + letter-spacing: 0; +} + +body.menu-is-open { + overflow: hidden; +} + +.button-main, +.lead-form__button { + display: inline-flex; + align-items: center; + justify-content: center; + min-height: 52px; + border-radius: 999px; + background: var(--color-accent); + color: #ffffff; + font-weight: 700; + line-height: 1; + padding: 0 28px; + transition: background-color 0.2s ease, transform 0.2s ease; +} + +.button-main:hover, +.lead-form__button:hover { + background: var(--color-accent-dark); + transform: translateY(-1px); +} + +.button-link { + display: inline-flex; + align-items: center; + min-height: 52px; + color: var(--color-accent-dark); + font-weight: 700; + text-decoration: underline; + text-underline-offset: 5px; +} + +.section-kicker { + display: block; + color: var(--color-accent); + font-size: var(--fz-xs); + font-weight: 800; + letter-spacing: 0.12em; + text-transform: uppercase; +} + +.section-title { + max-width: 760px; + font-size: var(--fz-xl); + font-weight: 700; + line-height: var(--lh-tight); +} + +.info-card { + min-height: 220px; + border: 1px solid var(--color-line); + border-radius: var(--radius-md); + background: var(--color-surface); + padding: 26px; + box-shadow: var(--shadow-soft); +} + +.info-card__number { + display: inline-flex; + align-items: center; + justify-content: center; + width: 42px; + height: 42px; + border-radius: 50%; + background: var(--color-surface-soft); + color: var(--color-accent-dark); + font-size: var(--fz-sm); + font-weight: 800; +} + +.info-card__title { + margin-top: 24px; + font-size: var(--fz-lg); + font-weight: 700; + line-height: 1.2; +} + +.info-card__text { + margin-top: 12px; + color: var(--color-muted); +} diff --git a/wp-content/themes/sevastopol-tort-child/assets/fonts/Manrope-VariableFont_wght.woff2 b/wp-content/themes/sevastopol-tort-child/assets/fonts/Manrope-VariableFont_wght.woff2 new file mode 100644 index 0000000..44f81dc Binary files /dev/null and b/wp-content/themes/sevastopol-tort-child/assets/fonts/Manrope-VariableFont_wght.woff2 differ diff --git a/wp-content/themes/sevastopol-tort-child/assets/js/site.js b/wp-content/themes/sevastopol-tort-child/assets/js/site.js new file mode 100644 index 0000000..7e5f7fd --- /dev/null +++ b/wp-content/themes/sevastopol-tort-child/assets/js/site.js @@ -0,0 +1,42 @@ +(function () { + var body = document.body; + var menu = document.querySelector('[data-mobile-menu]'); + var toggle = document.querySelector('[data-menu-toggle]'); + var closeNodes = document.querySelectorAll('[data-menu-close]'); + var cookieNote = document.querySelector('[data-cookie-note]'); + var cookieButton = document.querySelector('[data-cookie-accept]'); + + function setMenuState(isOpen) { + if (!menu || !toggle) { + return; + } + + menu.classList.toggle('is-open', isOpen); + body.classList.toggle('menu-is-open', isOpen); + menu.setAttribute('aria-hidden', isOpen ? 'false' : 'true'); + toggle.setAttribute('aria-expanded', isOpen ? 'true' : 'false'); + } + + if (menu && toggle) { + toggle.addEventListener('click', function () { + setMenuState(!menu.classList.contains('is-open')); + }); + + closeNodes.forEach(function (node) { + node.addEventListener('click', function () { + setMenuState(false); + }); + }); + } + + if (cookieNote && cookieButton && window.localStorage) { + if (localStorage.getItem('sevTortCookieAccepted') !== 'yes') { + cookieNote.hidden = false; + } + + cookieButton.addEventListener('click', function () { + localStorage.setItem('sevTortCookieAccepted', 'yes'); + cookieNote.hidden = true; + }); + } +})(); diff --git a/wp-content/themes/sevastopol-tort-child/footer.php b/wp-content/themes/sevastopol-tort-child/footer.php new file mode 100644 index 0000000..2357e78 --- /dev/null +++ b/wp-content/themes/sevastopol-tort-child/footer.php @@ -0,0 +1,59 @@ + + + + + + diff --git a/wp-content/themes/sevastopol-tort-child/front-page.php b/wp-content/themes/sevastopol-tort-child/front-page.php new file mode 100644 index 0000000..62933ae --- /dev/null +++ b/wp-content/themes/sevastopol-tort-child/front-page.php @@ -0,0 +1,60 @@ + +
+
+
+
+ Кондитерская студия в Севастополе +

Торты на заказ в Севастополе с доставкой

+

Готовим бенто, детские, свадебные и праздничные торты под ваш повод. Подберем дизайн, начинку и формат после короткой заявки.

+ +
+
+ Авторский торт на заказ в Севастополе + Романтичный бенто торт +
+
+
+
+
+
+ Категории +

Выберите торт под событие

+
+
+ + + + <?php echo esc_attr( $item['label'] ); ?> + + + +
+
+
+
+
+
+ Заказ +

Как мы работаем

+
    +
  1. Вы оставляете заявку с датой, поводом и идеей.
  2. +
  3. Мы уточняем вес, начинку, декор и доставку.
  4. +
  5. Согласовываем стоимость и фиксируем заказ.
  6. +
  7. Передаем торт курьером или на самовывоз.
  8. +
+
+ 'Обсудить торт', 'page' => 'Главная' ) ); ?> +
+
+
+get( 'Version' ); + $uri = get_stylesheet_directory_uri(); + $page = sev_tort_current_page_config(); + + wp_enqueue_style( 'sev-tort-normalize', $uri . '/assets/css/normalize.min.css', array(), $theme_version ); + wp_enqueue_style( 'sev-tort-reset', $uri . '/assets/css/reset.min.css', array( 'sev-tort-normalize' ), $theme_version ); + wp_enqueue_style( 'sev-tort-core', $uri . '/assets/css/style-core.css', array( 'sev-tort-reset' ), $theme_version ); + wp_enqueue_style( 'sev-tort-layout', $uri . '/assets/css/layout.css', array( 'sev-tort-core' ), $theme_version ); + + $responsive_dependencies = array( 'sev-tort-layout' ); + + if ( $page ) { + $style = isset( $page['style'] ) ? $page['style'] : 'service-page.css'; + wp_enqueue_style( 'sev-tort-page', $uri . '/assets/css/' . $style, array( 'sev-tort-layout' ), $theme_version ); + $responsive_dependencies = array( 'sev-tort-page' ); + } elseif ( is_front_page() ) { + wp_enqueue_style( 'sev-tort-page', $uri . '/assets/css/home-page.css', array( 'sev-tort-layout' ), $theme_version ); + $responsive_dependencies = array( 'sev-tort-page' ); + } + + wp_enqueue_style( 'sev-tort-responsive', $uri . '/assets/css/responsive.css', $responsive_dependencies, $theme_version ); + wp_enqueue_script( 'sev-tort-site', $uri . '/assets/js/site.js', array(), $theme_version, true ); +} + +add_action( 'wp_enqueue_scripts', 'sev_tort_dequeue_parent_assets', 30 ); +function sev_tort_dequeue_parent_assets() { + $handles = array( + 'twentytwentyfive-style', + 'twentytwentyfive-custom-header', + 'twentytwentyfive-custom-footer', + 'twentytwentyfive-custom-home', + ); + + foreach ( $handles as $handle ) { + wp_dequeue_style( $handle ); + wp_deregister_style( $handle ); + wp_dequeue_script( $handle ); + wp_deregister_script( $handle ); + } +} + +add_filter( 'body_class', 'sev_tort_body_classes' ); +function sev_tort_body_classes( $classes ) { + $page = sev_tort_current_page_config(); + + $classes[] = 'site-page'; + + if ( $page ) { + $classes[] = 'page-' . sanitize_html_class( $page['slug'] ); + $classes[] = 'sev-page--' . sanitize_html_class( $page['slug'] ); + } elseif ( is_front_page() ) { + $classes[] = 'page-home'; + $classes[] = 'sev-page--home'; + } + + return $classes; +} + +add_action( 'wp_head', 'sev_tort_meta_tags', 1 ); +function sev_tort_meta_tags() { + $page = sev_tort_current_page_config(); + + if ( ! $page ) { + return; + } + + $robots = ! empty( $page['indexable'] ) ? 'index, follow' : 'noindex, nofollow'; + printf( '' . "\n", esc_attr( $robots ) ); + + if ( ! empty( $page['description'] ) ) { + printf( '' . "\n", esc_attr( $page['description'] ) ); + } + + printf( '' . "\n", esc_url( home_url( '/' . $page['slug'] . '/' ) ) ); +} + +add_filter( 'pre_get_document_title', 'sev_tort_document_title' ); +function sev_tort_document_title( $title ) { + $page = sev_tort_current_page_config(); + + if ( ! $page ) { + return $title; + } + + return $page['title']; +} + +add_action( 'after_switch_theme', 'sev_tort_flush_rewrite_rules' ); +function sev_tort_flush_rewrite_rules() { + sev_tort_register_rewrite_rules(); + flush_rewrite_rules(); +} diff --git a/wp-content/themes/sevastopol-tort-child/header.php b/wp-content/themes/sevastopol-tort-child/header.php new file mode 100644 index 0000000..e46feb5 --- /dev/null +++ b/wp-content/themes/sevastopol-tort-child/header.php @@ -0,0 +1,64 @@ + +> + + + + + +> + + diff --git a/wp-content/themes/sevastopol-tort-child/inc/forms.php b/wp-content/themes/sevastopol-tort-child/inc/forms.php new file mode 100644 index 0000000..a8843d2 --- /dev/null +++ b/wp-content/themes/sevastopol-tort-child/inc/forms.php @@ -0,0 +1,64 @@ + 10, + 'body' => array( + 'chat_id' => SEV_TORT_TELEGRAM_CHAT_ID, + 'text' => $text, + ), + ) + ); + + return ! is_wp_error( $response ) && 200 === wp_remote_retrieve_response_code( $response ); +} + +function sev_tort_redirect_form_status( $status ) { + $referer = wp_get_referer(); + $url = $referer ? $referer : home_url( '/' ); + + wp_safe_redirect( add_query_arg( 'form_status', $status, $url ) ); + exit; +} diff --git a/wp-content/themes/sevastopol-tort-child/inc/routes.php b/wp-content/themes/sevastopol-tort-child/inc/routes.php new file mode 100644 index 0000000..801cead --- /dev/null +++ b/wp-content/themes/sevastopol-tort-child/inc/routes.php @@ -0,0 +1,56 @@ + $page ) { + add_rewrite_rule( '^' . preg_quote( $slug, '/' ) . '/?$', 'index.php?sev_tort_page=' . $slug, 'top' ); + } +} + +add_filter( 'query_vars', 'sev_tort_query_vars' ); +function sev_tort_query_vars( $vars ) { + $vars[] = 'sev_tort_page'; + return $vars; +} + +add_action( 'template_redirect', 'sev_tort_route_status' ); +function sev_tort_route_status() { + if ( sev_tort_current_page_config() ) { + status_header( 200 ); + } +} + +add_filter( 'template_include', 'sev_tort_template_include' ); +function sev_tort_template_include( $template ) { + $page = sev_tort_current_page_config(); + + if ( ! $page ) { + return $template; + } + + if ( 'politika-konfidencialnosti' === $page['slug'] ) { + return get_stylesheet_directory() . '/page-templates/page-policy.php'; + } + + return get_stylesheet_directory() . '/page-templates/page-service.php'; +} + +function sev_tort_current_page_config() { + $slug = get_query_var( 'sev_tort_page' ); + + if ( ! $slug && is_front_page() ) { + return false; + } + + if ( ! $slug && is_page() ) { + $slug = get_post_field( 'post_name', get_queried_object_id() ); + } + + $pages = sev_tort_pages(); + + return isset( $pages[ $slug ] ) ? $pages[ $slug ] : false; +} diff --git a/wp-content/themes/sevastopol-tort-child/inc/theme-data.php b/wp-content/themes/sevastopol-tort-child/inc/theme-data.php new file mode 100644 index 0000000..d628475 --- /dev/null +++ b/wp-content/themes/sevastopol-tort-child/inc/theme-data.php @@ -0,0 +1,221 @@ + array( + 'slug' => 'torty-na-zakaz', + 'label' => 'Торты на заказ', + 'title' => 'Торты на заказ в Севастополе', + 'description' => 'Авторские торты на заказ в Севастополе: бенто, детские, свадебные и праздничные торты с доставкой.', + 'h1' => 'Торты на заказ в Севастополе', + 'lead' => 'Подберем вес, начинку, декор и дату выдачи под ваш праздник. Заявка не обязывает к заказу: сначала уточним идею и ориентир по цене.', + 'image' => 'cake-010.jpg', + 'style' => 'service-page.css', + 'indexable' => false, + ), + 'bento' => array( + 'slug' => 'bento', + 'label' => 'Бенто', + 'title' => 'Бенто торты в Севастополе', + 'description' => 'Бенто торты на заказ в Севастополе для дня рождения, свидания, подарка или небольшого праздника.', + 'h1' => 'Бенто торты на заказ', + 'lead' => 'Компактный торт с персональной надписью, иллюстрацией или минималистичным декором для теплого повода.', + 'image' => 'cake-001.jpg', + 'style' => 'service-page.css', + 'indexable' => false, + ), + 'detskie' => array( + 'slug' => 'detskie', + 'label' => 'Детские', + 'title' => 'Детские торты на заказ в Севастополе', + 'description' => 'Детские торты на заказ в Севастополе: яркий декор, любимые персонажи, безопасные начинки.', + 'h1' => 'Детские торты на заказ', + 'lead' => 'Соберем торт под возраст, тему праздника и пожелания родителей: от нежного декора до ярких сюжетов.', + 'image' => 'medobory_torty_na_zakaz/cake-202.jpg', + 'style' => 'service-page.css', + 'indexable' => false, + ), + 'svadebnye' => array( + 'slug' => 'svadebnye', + 'label' => 'Свадебные', + 'title' => 'Свадебные торты в Севастополе', + 'description' => 'Свадебные торты на заказ в Севастополе: многоярусные композиции, дегустация начинок, доставка к банкету.', + 'h1' => 'Свадебные торты', + 'lead' => 'Продумываем торт под стиль свадьбы, количество гостей, подачу и безопасную доставку к площадке.', + 'image' => 'stefanycake_torty_na_zakaz/cake-057.jpg', + 'style' => 'service-page.css', + 'indexable' => false, + ), + 'korporativnye' => array( + 'slug' => 'korporativnye', + 'label' => 'Корпоративные', + 'title' => 'Корпоративные торты в Севастополе', + 'description' => 'Корпоративные торты с логотипом и фирменным декором для мероприятий, презентаций и праздников.', + 'h1' => 'Корпоративные торты', + 'lead' => 'Сделаем торт для команды, клиента или события компании: аккуратно, в срок и в нужной стилистике.', + 'image' => 'stefanycake_torty_na_zakaz/cake-028.jpg', + 'style' => 'service-page.css', + 'indexable' => false, + ), + 'na-den-rozhdeniya' => array( + 'slug' => 'na-den-rozhdeniya', + 'label' => 'На день рождения', + 'title' => 'Торт на день рождения в Севастополе', + 'description' => 'Торты на день рождения в Севастополе для взрослых и детей: дизайн по фото, надписи, ягоды, шоколад.', + 'h1' => 'Торты на день рождения', + 'lead' => 'Поможем выбрать формат, который смотрится празднично, удобно режется и нравится имениннику.', + 'image' => 'stefanycake_torty_na_zakaz/cake-024.jpg', + 'style' => 'service-page.css', + 'indexable' => false, + ), + 'srochnyj-zakaz' => array( + 'slug' => 'srochnyj-zakaz', + 'label' => 'Срочный заказ', + 'title' => 'Срочный заказ торта в Севастополе', + 'description' => 'Срочный заказ торта в Севастополе при наличии свободного окна производства.', + 'h1' => 'Срочный заказ торта', + 'lead' => 'Если праздник уже близко, оставьте заявку: проверим свободное окно и предложим доступные форматы декора.', + 'image' => 'cake-025.jpg', + 'style' => 'service-page.css', + 'indexable' => false, + ), + 'nachinki' => array( + 'slug' => 'nachinki', + 'label' => 'Начинки', + 'title' => 'Начинки для тортов', + 'description' => 'Начинки для тортов на заказ: шоколад, ягоды, карамель, творожный крем и сезонные сочетания.', + 'h1' => 'Начинки для тортов', + 'lead' => 'Подберем вкус под формат праздника: легкий, шоколадный, ягодный или сбалансированный для большой компании.', + 'image' => 'stefanycake_torty_na_zakaz/cake-038.jpg', + 'style' => 'service-page.css', + 'indexable' => false, + ), + 'ceny' => array( + 'slug' => 'ceny', + 'label' => 'Цены', + 'title' => 'Цены на торты в Севастополе', + 'description' => 'Ориентировочные цены на торты на заказ в Севастополе: бенто, классические, свадебные и срочные заказы.', + 'h1' => 'Цены и веса', + 'lead' => 'Стоимость зависит от веса, начинки, сложности декора и срочности. Ниже ориентиры, точную цену уточним после заявки.', + 'image' => 'cake-006.jpg', + 'style' => 'service-page.css', + 'indexable' => false, + ), + 'dostavka-i-oplata' => array( + 'slug' => 'dostavka-i-oplata', + 'label' => 'Доставка и оплата', + 'title' => 'Доставка и оплата тортов в Севастополе', + 'description' => 'Условия доставки, самовывоза и оплаты тортов на заказ в Севастополе.', + 'h1' => 'Доставка и оплата', + 'lead' => 'Согласуем удобный интервал, аккуратно упакуем торт и заранее подскажем, как безопасно хранить заказ.', + 'image' => 'cake-020.jpg', + 'style' => 'service-page.css', + 'indexable' => false, + ), + 'portfolio' => array( + 'slug' => 'portfolio', + 'label' => 'Портфолио', + 'title' => 'Портфолио тортов', + 'description' => 'Портфолио авторских тортов на заказ в Севастополе: бенто, детские, свадебные и праздничные работы.', + 'h1' => 'Портфолио тортов', + 'lead' => 'Собрали примеры работ, чтобы было проще выбрать стиль, цвет, формат и уровень детализации.', + 'image' => 'stefanycake_torty_na_zakaz/cake-070.jpg', + 'style' => 'service-page.css', + 'indexable' => false, + ), + 'otzyvy' => array( + 'slug' => 'otzyvy', + 'label' => 'Отзывы', + 'title' => 'Отзывы о тортах на заказ', + 'description' => 'Отзывы клиентов о тортах на заказ, доставке и подборе начинок в Севастополе.', + 'h1' => 'Отзывы клиентов', + 'lead' => 'Отзывы помогают понять, как мы работаем с идеями, сроками, доставкой и вкусами.', + 'image' => 'cake-015.jpg', + 'style' => 'service-page.css', + 'indexable' => false, + ), + 'faq' => array( + 'slug' => 'faq', + 'label' => 'FAQ', + 'title' => 'Вопросы о заказе тортов', + 'description' => 'Ответы на частые вопросы о сроках, доставке, начинках, оплате и заказе тортов в Севастополе.', + 'h1' => 'Частые вопросы', + 'lead' => 'Собрали ответы на вопросы, которые обычно появляются перед первым заказом.', + 'image' => 'cake-030.jpg', + 'style' => 'service-page.css', + 'indexable' => false, + ), + 'kontakty' => array( + 'slug' => 'kontakty', + 'label' => 'Контакты', + 'title' => 'Контакты кондитерской студии', + 'description' => 'Контакты кондитерской студии в Севастополе: телефон, мессенджеры, режим работы и форма заявки.', + 'h1' => 'Контакты', + 'lead' => 'Напишите нам удобным способом или оставьте заявку, и мы вернемся с уточняющими вопросами по торту.', + 'image' => 'cake-025.jpg', + 'style' => 'service-page.css', + 'indexable' => false, + ), + 'politika-konfidencialnosti' => array( + 'slug' => 'politika-konfidencialnosti', + 'label' => 'Политика конфиденциальности', + 'title' => 'Политика конфиденциальности', + 'description' => 'Политика обработки персональных данных и использования cookie на сайте sevastopol-tort.ru.', + 'h1' => 'Политика конфиденциальности', + 'lead' => 'Документ описывает, какие данные собирает сайт и как они используются для обработки заявок.', + 'image' => 'cake-038.jpg', + 'style' => 'policy-page.css', + 'indexable' => false, + ), + ); +} + +function sev_tort_nav_pages() { + $pages = sev_tort_pages(); + $slugs = array( + 'torty-na-zakaz', + 'bento', + 'detskie', + 'svadebnye', + 'korporativnye', + 'na-den-rozhdeniya', + 'srochnyj-zakaz', + 'nachinki', + 'ceny', + 'dostavka-i-oplata', + 'portfolio', + 'otzyvy', + 'faq', + 'kontakty', + ); + + return array_intersect_key( $pages, array_flip( $slugs ) ); +} + +function sev_tort_asset_image( $file ) { + return get_template_directory_uri() . '/assets/images/images/' . ltrim( $file, '/' ); +} + +function sev_tort_logo_url() { + return get_template_directory_uri() . '/assets/images/tort.png'; +} diff --git a/wp-content/themes/sevastopol-tort-child/page-templates/page-policy.php b/wp-content/themes/sevastopol-tort-child/page-templates/page-policy.php new file mode 100644 index 0000000..c8a46d5 --- /dev/null +++ b/wp-content/themes/sevastopol-tort-child/page-templates/page-policy.php @@ -0,0 +1,48 @@ + +
+
+
+ Документы сайта +

+

+
+
+
+
+
+

1. Общие положения

+

Настоящая политика описывает порядок обработки персональных данных пользователей сайта sevastopol-tort.ru. Пользователь передает данные добровольно при отправке формы обратной связи.

+
+
+

2. Какие данные собираются

+

Сайт может получать имя, телефон, комментарий к заказу, технические cookie и данные, необходимые для корректной работы формы.

+
+
+

3. Цели обработки

+

Данные используются для связи с пользователем, расчета стоимости торта, согласования деталей заказа, улучшения работы сайта и выполнения требований закона.

+
+
+

4. Передача данных

+

Заявки могут передаваться в Telegram-чат администратора сайта для оперативной обработки. Данные не продаются третьим лицам.

+
+
+

5. Cookie

+

Сайт использует cookie для сохранения согласия с уведомлением, стабильной работы интерфейса и аналитики после ее подключения.

+
+
+

6. Отзыв согласия

+

Пользователь может запросить удаление или уточнение своих данных, связавшись с администратором сайта через контактные данные, указанные на странице контактов.

+
+
+
+
+ +
+
+
+
+ Кондитерская студия в Севастополе +

+

+ +
+
+ <?php echo esc_attr( $page['h1'] ); ?> +
+
+
+
+
+
+ Что учтем +

Подберем формат под ваш повод

+
+
+ 01 +

Дизайн

+

Можно прислать фото, референс, цветовую палитру или описать идею словами.

+
+
+ 02 +

Начинка

+

Предложим варианты по сладости, плотности, сезонности и удобству подачи.

+
+
+ 03 +

Сроки

+

Оптимально оформлять заказ заранее, но срочные заявки возможны при свободном окне.

+
+
+
+
+
+
+
+
+ Процесс +

Как оформить заявку

+
    +
  1. Оставьте телефон и коротко опишите повод.
  2. +
  3. Мы уточним дату, вес, начинку, декор и доставку.
  4. +
  5. После согласования подтвердим заказ и время выдачи.
  6. +
+
+
+ Без корзины и онлайн-оплаты +

Каждый торт индивидуальный, поэтому заявку обрабатываем вручную и отправляем детали в мессенджер.

+
+
+
+
+
+
+ Заявка +

Расскажите, какой торт нужен

+

Укажите дату, повод, примерный вес и пожелания по декору. Если пока нет точной идеи, поможем подобрать варианты.

+
+ 'Получить расчет', 'page' => $page['title'] ) ); ?> +
+
+
+ +
+ + + +
+ + Ответим в мессенджере или по телефону и уточним детали заказа. +
+ + + + + + + + +