This commit is contained in:
2026-07-04 17:34:07 +03:00
parent d896d41240
commit 762242f193
22 changed files with 1880 additions and 1 deletions

View File

@@ -1,3 +1,15 @@
RewriteEngine on RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
# BEGIN WordPress
<IfModule mod_rewrite.c>
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]
</IfModule>
# END WordPress

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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}

View File

@@ -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);
}

View File

@@ -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}

View File

@@ -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;
}
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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;
});
}
})();

View File

@@ -0,0 +1,59 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<footer class="site-footer">
<div class="site-footer__inner">
<div class="site-footer__grid">
<div class="site-footer__brand">
<a class="site-footer__logo" href="<?php echo esc_url( home_url( '/' ) ); ?>" aria-label="На главную">
<img class="site-footer__logo-image" src="<?php echo esc_url( sev_tort_logo_url() ); ?>" alt="Логотип кондитерской студии" width="65" height="65">
</a>
<p class="site-footer__text">Авторские торты на заказ в Севастополе с доставкой по городу.</p>
</div>
<div class="site-footer__col">
<span class="site-footer__title">Навигация</span>
<ul class="site-footer__list">
<li class="site-footer__item"><a class="site-footer__link" href="<?php echo esc_url( home_url( '/' ) ); ?>">Главная</a></li>
<li class="site-footer__item"><a class="site-footer__link" href="<?php echo esc_url( home_url( '/torty-na-zakaz/' ) ); ?>">Торты на заказ</a></li>
<li class="site-footer__item"><a class="site-footer__link" href="<?php echo esc_url( home_url( '/portfolio/' ) ); ?>">Портфолио</a></li>
<li class="site-footer__item"><a class="site-footer__link" href="<?php echo esc_url( home_url( '/faq/' ) ); ?>">FAQ</a></li>
</ul>
</div>
<div class="site-footer__col">
<span class="site-footer__title">Категории</span>
<ul class="site-footer__list">
<li class="site-footer__item"><a class="site-footer__link" href="<?php echo esc_url( home_url( '/bento/' ) ); ?>">Бенто</a></li>
<li class="site-footer__item"><a class="site-footer__link" href="<?php echo esc_url( home_url( '/detskie/' ) ); ?>">Детские</a></li>
<li class="site-footer__item"><a class="site-footer__link" href="<?php echo esc_url( home_url( '/svadebnye/' ) ); ?>">Свадебные</a></li>
<li class="site-footer__item"><a class="site-footer__link" href="<?php echo esc_url( home_url( '/korporativnye/' ) ); ?>">Корпоративные</a></li>
<li class="site-footer__item"><a class="site-footer__link" href="<?php echo esc_url( home_url( '/na-den-rozhdeniya/' ) ); ?>">На день рождения</a></li>
</ul>
</div>
<div class="site-footer__col">
<span class="site-footer__title">Контакты</span>
<ul class="site-footer__list">
<li class="site-footer__item"><a class="site-footer__link" href="<?php echo esc_url( sev_tort_site_phone_href() ); ?>"><?php echo esc_html( sev_tort_site_phone() ); ?></a></li>
<li class="site-footer__item"><a class="site-footer__link" href="<?php echo esc_url( sev_tort_whatsapp_url() ); ?>" target="_blank" rel="noopener noreferrer">WhatsApp</a></li>
<li class="site-footer__item"><a class="site-footer__link" href="<?php echo esc_url( sev_tort_telegram_url() ); ?>" target="_blank" rel="noopener noreferrer">Telegram</a></li>
<li class="site-footer__item">г. Севастополь</li>
<li class="site-footer__item">Ежедневно: 09:00 - 20:00</li>
</ul>
</div>
</div>
<div class="site-footer__bottom">
<span class="site-footer__copy">© <?php echo esc_html( gmdate( 'Y' ) ); ?> Все права защищены.</span>
<a class="site-footer__policy" href="<?php echo esc_url( home_url( '/politika-konfidencialnosti/' ) ); ?>">Политика конфиденциальности</a>
</div>
</div>
</footer>
<div class="cookie-note" data-cookie-note hidden>
<div class="cookie-note__inner">
<span class="cookie-note__text">Мы используем cookie для работы сайта, аналитики и обработки заявок.</span>
<button class="cookie-note__button" type="button" data-cookie-accept>Принять</button>
</div>
</div>
<?php wp_footer(); ?>
</body>
</html>

View File

@@ -0,0 +1,60 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
get_header();
?>
<main class="home-page">
<section class="home-hero">
<div class="home-hero__inner">
<div class="home-hero__content">
<span class="home-hero__eyebrow">Кондитерская студия в Севастополе</span>
<h1 class="home-hero__title">Торты на заказ в Севастополе с доставкой</h1>
<p class="home-hero__lead">Готовим бенто, детские, свадебные и праздничные торты под ваш повод. Подберем дизайн, начинку и формат после короткой заявки.</p>
<div class="home-hero__actions">
<a class="button-main" href="<?php echo esc_url( home_url( '/torty-na-zakaz/' ) ); ?>">Рассчитать стоимость</a>
<a class="button-link" href="<?php echo esc_url( sev_tort_telegram_url() ); ?>" target="_blank" rel="noopener noreferrer">Написать в Telegram</a>
</div>
</div>
<div class="home-hero__media">
<img class="home-hero__image home-hero__image--main" src="<?php echo esc_url( sev_tort_asset_image( 'cake-010.jpg' ) ); ?>" alt="Авторский торт на заказ в Севастополе" width="700" height="700" loading="eager">
<img class="home-hero__image home-hero__image--small" src="<?php echo esc_url( sev_tort_asset_image( 'cake-020.jpg' ) ); ?>" alt="Романтичный бенто торт" width="360" height="360" loading="lazy">
</div>
</div>
</section>
<section class="home-categories">
<div class="home-categories__inner">
<div class="home-categories__head">
<span class="section-kicker">Категории</span>
<h2 class="section-title">Выберите торт под событие</h2>
</div>
<div class="home-categories__grid">
<?php foreach ( array( 'bento', 'detskie', 'svadebnye', 'korporativnye', 'na-den-rozhdeniya', 'srochnyj-zakaz' ) as $slug ) : ?>
<?php $item = sev_tort_pages()[ $slug ]; ?>
<a class="home-category-card" href="<?php echo esc_url( home_url( '/' . $item['slug'] . '/' ) ); ?>">
<img class="home-category-card__image" src="<?php echo esc_url( sev_tort_asset_image( $item['image'] ) ); ?>" alt="<?php echo esc_attr( $item['label'] ); ?>" width="420" height="420" loading="lazy">
<span class="home-category-card__title"><?php echo esc_html( $item['label'] ); ?></span>
</a>
<?php endforeach; ?>
</div>
</div>
</section>
<section class="home-steps">
<div class="home-steps__inner">
<div class="home-steps__content">
<span class="section-kicker">Заказ</span>
<h2 class="section-title">Как мы работаем</h2>
<ol class="home-steps__list">
<li class="home-steps__item">Вы оставляете заявку с датой, поводом и идеей.</li>
<li class="home-steps__item">Мы уточняем вес, начинку, декор и доставку.</li>
<li class="home-steps__item">Согласовываем стоимость и фиксируем заказ.</li>
<li class="home-steps__item">Передаем торт курьером или на самовывоз.</li>
</ol>
</div>
<?php get_template_part( 'template-parts/lead-form', null, array( 'title' => 'Обсудить торт', 'page' => 'Главная' ) ); ?>
</div>
</section>
</main>
<?php
get_footer();

View File

@@ -0,0 +1,110 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
require_once get_stylesheet_directory() . '/inc/theme-data.php';
require_once get_stylesheet_directory() . '/inc/routes.php';
require_once get_stylesheet_directory() . '/inc/forms.php';
add_action( 'after_setup_theme', 'sev_tort_theme_setup' );
function sev_tort_theme_setup() {
add_theme_support( 'title-tag' );
add_theme_support( 'post-thumbnails' );
}
add_action( 'wp_enqueue_scripts', 'sev_tort_enqueue_assets' );
function sev_tort_enqueue_assets() {
$theme_version = wp_get_theme()->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( '<meta name="robots" content="%s">' . "\n", esc_attr( $robots ) );
if ( ! empty( $page['description'] ) ) {
printf( '<meta name="description" content="%s">' . "\n", esc_attr( $page['description'] ) );
}
printf( '<link rel="canonical" href="%s">' . "\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();
}

View File

@@ -0,0 +1,64 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?><!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<header class="site-header" data-site-header>
<div class="site-header__top">
<div class="site-header__inner site-header__inner--top">
<span class="site-header__tagline">Торт на заказ в Севастополе - доставка и самовывоз</span>
<a class="site-header__phone" href="<?php echo esc_url( sev_tort_site_phone_href() ); ?>"><?php echo esc_html( sev_tort_site_phone() ); ?></a>
</div>
</div>
<div class="site-header__main">
<div class="site-header__inner site-header__inner--main">
<a class="site-header__logo" href="<?php echo esc_url( home_url( '/' ) ); ?>" aria-label="На главную">
<img class="site-header__logo-image" src="<?php echo esc_url( sev_tort_logo_url() ); ?>" alt="Логотип кондитерской студии" width="65" height="65">
<span class="site-header__logo-text">Создаем повод<br>для праздника</span>
</a>
<nav class="site-header__nav" aria-label="Основная навигация">
<ul class="site-header__menu">
<?php foreach ( sev_tort_nav_pages() as $item ) : ?>
<li class="site-header__menu-item">
<a class="site-header__menu-link" href="<?php echo esc_url( home_url( '/' . $item['slug'] . '/' ) ); ?>"><?php echo esc_html( $item['label'] ); ?></a>
</li>
<?php endforeach; ?>
</ul>
</nav>
<a class="site-header__cta" href="<?php echo esc_url( home_url( '/torty-na-zakaz/' ) ); ?>">Заказать торт</a>
<button class="site-header__burger" type="button" aria-label="Открыть меню" aria-expanded="false" data-menu-toggle>
<span class="site-header__burger-line"></span>
<span class="site-header__burger-line"></span>
<span class="site-header__burger-line"></span>
</button>
</div>
</div>
<div class="mobile-menu" data-mobile-menu aria-hidden="true">
<div class="mobile-menu__overlay" data-menu-close></div>
<div class="mobile-menu__panel" role="dialog" aria-modal="true" aria-label="Мобильное меню">
<div class="mobile-menu__head">
<span class="mobile-menu__title">Меню</span>
<button class="mobile-menu__close" type="button" aria-label="Закрыть меню" data-menu-close>×</button>
</div>
<nav class="mobile-menu__nav" aria-label="Мобильная навигация">
<a class="mobile-menu__link" href="<?php echo esc_url( home_url( '/' ) ); ?>">Главная</a>
<?php foreach ( sev_tort_nav_pages() as $item ) : ?>
<a class="mobile-menu__link" href="<?php echo esc_url( home_url( '/' . $item['slug'] . '/' ) ); ?>"><?php echo esc_html( $item['label'] ); ?></a>
<?php endforeach; ?>
</nav>
<div class="mobile-menu__contacts">
<a class="mobile-menu__contact" href="<?php echo esc_url( sev_tort_site_phone_href() ); ?>"><?php echo esc_html( sev_tort_site_phone() ); ?></a>
<a class="mobile-menu__contact" href="<?php echo esc_url( sev_tort_whatsapp_url() ); ?>" target="_blank" rel="noopener noreferrer">WhatsApp</a>
<a class="mobile-menu__contact" href="<?php echo esc_url( sev_tort_telegram_url() ); ?>" target="_blank" rel="noopener noreferrer">Telegram</a>
</div>
</div>
</div>
</header>

View File

@@ -0,0 +1,64 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
add_action( 'admin_post_nopriv_sev_tort_lead', 'sev_tort_handle_lead_form' );
add_action( 'admin_post_sev_tort_lead', 'sev_tort_handle_lead_form' );
function sev_tort_handle_lead_form() {
if ( empty( $_POST['sev_tort_nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['sev_tort_nonce'] ) ), 'sev_tort_lead' ) ) {
sev_tort_redirect_form_status( 'error' );
}
if ( empty( $_POST['personal_data_agree'] ) ) {
sev_tort_redirect_form_status( 'consent' );
}
$name = isset( $_POST['lead_name'] ) ? sanitize_text_field( wp_unslash( $_POST['lead_name'] ) ) : '';
$phone = isset( $_POST['lead_phone'] ) ? sanitize_text_field( wp_unslash( $_POST['lead_phone'] ) ) : '';
$message = isset( $_POST['lead_message'] ) ? sanitize_textarea_field( wp_unslash( $_POST['lead_message'] ) ) : '';
$page = isset( $_POST['lead_page'] ) ? sanitize_text_field( wp_unslash( $_POST['lead_page'] ) ) : '';
if ( '' === $phone ) {
sev_tort_redirect_form_status( 'error' );
}
$text = "Новая заявка с сайта sevastopol-tort.ru\n";
$text .= "Страница: " . $page . "\n";
$text .= "Имя: " . ( $name ? $name : 'не указано' ) . "\n";
$text .= "Телефон: " . $phone . "\n";
$text .= "Комментарий: " . ( $message ? $message : 'не указан' );
$sent = sev_tort_send_telegram_message( $text );
sev_tort_redirect_form_status( $sent ? 'success' : 'queued' );
}
function sev_tort_send_telegram_message( $text ) {
if ( ! defined( 'SEV_TORT_TELEGRAM_BOT_TOKEN' ) || ! defined( 'SEV_TORT_TELEGRAM_CHAT_ID' ) ) {
return false;
}
$response = wp_remote_post(
'https://api.telegram.org/bot' . SEV_TORT_TELEGRAM_BOT_TOKEN . '/sendMessage',
array(
'timeout' => 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;
}

View File

@@ -0,0 +1,56 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
add_action( 'init', 'sev_tort_register_rewrite_rules' );
function sev_tort_register_rewrite_rules() {
foreach ( sev_tort_pages() as $slug => $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;
}

View File

@@ -0,0 +1,221 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
function sev_tort_site_phone() {
return '+7 (978) 000-00-00';
}
function sev_tort_site_phone_href() {
return 'tel:+79780000000';
}
function sev_tort_whatsapp_url() {
return 'https://wa.me/79780000000';
}
function sev_tort_telegram_url() {
return 'https://t.me/sevastopol_tort';
}
function sev_tort_pages() {
return array(
'torty-na-zakaz' => 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';
}

View File

@@ -0,0 +1,48 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$page = sev_tort_current_page_config();
get_header();
?>
<main class="policy-page">
<section class="policy-hero">
<div class="policy-hero__inner">
<span class="policy-hero__eyebrow">Документы сайта</span>
<h1 class="policy-hero__title"><?php echo esc_html( $page['h1'] ); ?></h1>
<p class="policy-hero__lead"><?php echo esc_html( $page['lead'] ); ?></p>
</div>
</section>
<section class="policy-content">
<div class="policy-content__inner">
<div class="policy-content__block">
<h2 class="policy-content__title">1. Общие положения</h2>
<p class="policy-content__text">Настоящая политика описывает порядок обработки персональных данных пользователей сайта sevastopol-tort.ru. Пользователь передает данные добровольно при отправке формы обратной связи.</p>
</div>
<div class="policy-content__block">
<h2 class="policy-content__title">2. Какие данные собираются</h2>
<p class="policy-content__text">Сайт может получать имя, телефон, комментарий к заказу, технические cookie и данные, необходимые для корректной работы формы.</p>
</div>
<div class="policy-content__block">
<h2 class="policy-content__title">3. Цели обработки</h2>
<p class="policy-content__text">Данные используются для связи с пользователем, расчета стоимости торта, согласования деталей заказа, улучшения работы сайта и выполнения требований закона.</p>
</div>
<div class="policy-content__block">
<h2 class="policy-content__title">4. Передача данных</h2>
<p class="policy-content__text">Заявки могут передаваться в Telegram-чат администратора сайта для оперативной обработки. Данные не продаются третьим лицам.</p>
</div>
<div class="policy-content__block">
<h2 class="policy-content__title">5. Cookie</h2>
<p class="policy-content__text">Сайт использует cookie для сохранения согласия с уведомлением, стабильной работы интерфейса и аналитики после ее подключения.</p>
</div>
<div class="policy-content__block">
<h2 class="policy-content__title">6. Отзыв согласия</h2>
<p class="policy-content__text">Пользователь может запросить удаление или уточнение своих данных, связавшись с администратором сайта через контактные данные, указанные на странице контактов.</p>
</div>
</div>
</section>
</main>
<?php
get_footer();

View File

@@ -0,0 +1,81 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$page = sev_tort_current_page_config();
get_header();
?>
<main class="service-page">
<section class="service-hero">
<div class="service-hero__inner">
<div class="service-hero__content">
<span class="service-hero__eyebrow">Кондитерская студия в Севастополе</span>
<h1 class="service-hero__title"><?php echo esc_html( $page['h1'] ); ?></h1>
<p class="service-hero__lead"><?php echo esc_html( $page['lead'] ); ?></p>
<div class="service-hero__actions">
<a class="button-main" href="#lead-form">Получить расчет</a>
<a class="button-link" href="<?php echo esc_url( sev_tort_telegram_url() ); ?>" target="_blank" rel="noopener noreferrer">Написать в Telegram</a>
</div>
</div>
<div class="service-hero__media">
<img class="service-hero__image" src="<?php echo esc_url( sev_tort_asset_image( $page['image'] ) ); ?>" alt="<?php echo esc_attr( $page['h1'] ); ?>" width="700" height="700" loading="eager">
</div>
</div>
</section>
<section class="service-details">
<div class="service-details__inner">
<div class="service-details__content">
<span class="section-kicker">Что учтем</span>
<h2 class="section-title">Подберем формат под ваш повод</h2>
<div class="service-details__grid">
<article class="info-card">
<span class="info-card__number">01</span>
<h3 class="info-card__title">Дизайн</h3>
<p class="info-card__text">Можно прислать фото, референс, цветовую палитру или описать идею словами.</p>
</article>
<article class="info-card">
<span class="info-card__number">02</span>
<h3 class="info-card__title">Начинка</h3>
<p class="info-card__text">Предложим варианты по сладости, плотности, сезонности и удобству подачи.</p>
</article>
<article class="info-card">
<span class="info-card__number">03</span>
<h3 class="info-card__title">Сроки</h3>
<p class="info-card__text">Оптимально оформлять заказ заранее, но срочные заявки возможны при свободном окне.</p>
</article>
</div>
</div>
</div>
</section>
<section class="service-process">
<div class="service-process__inner">
<div class="service-process__content">
<span class="section-kicker">Процесс</span>
<h2 class="section-title">Как оформить заявку</h2>
<ol class="service-process__list">
<li class="service-process__item">Оставьте телефон и коротко опишите повод.</li>
<li class="service-process__item">Мы уточним дату, вес, начинку, декор и доставку.</li>
<li class="service-process__item">После согласования подтвердим заказ и время выдачи.</li>
</ol>
</div>
<div class="service-process__note">
<span class="service-process__note-title">Без корзины и онлайн-оплаты</span>
<p class="service-process__note-text">Каждый торт индивидуальный, поэтому заявку обрабатываем вручную и отправляем детали в мессенджер.</p>
</div>
</div>
</section>
<section class="service-lead" id="lead-form">
<div class="service-lead__inner">
<div class="service-lead__content">
<span class="section-kicker">Заявка</span>
<h2 class="section-title">Расскажите, какой торт нужен</h2>
<p class="service-lead__text">Укажите дату, повод, примерный вес и пожелания по декору. Если пока нет точной идеи, поможем подобрать варианты.</p>
</div>
<?php get_template_part( 'template-parts/lead-form', null, array( 'title' => 'Получить расчет', 'page' => $page['title'] ) ); ?>
</div>
</section>
</main>
<?php
get_footer();

View File

@@ -0,0 +1,6 @@
/*
Theme Name: Sevastopol Tort Child
Template: twentytwentyfive
Text Domain: sevastopol-tort-child
Version: 0.1.0
*/

View File

@@ -0,0 +1,37 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$form_title = isset( $args['title'] ) ? $args['title'] : 'Оставить заявку';
$form_page = isset( $args['page'] ) ? $args['page'] : '';
?>
<form class="lead-form" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" method="post">
<input type="hidden" name="action" value="sev_tort_lead">
<input type="hidden" name="lead_page" value="<?php echo esc_attr( $form_page ); ?>">
<?php wp_nonce_field( 'sev_tort_lead', 'sev_tort_nonce' ); ?>
<div class="lead-form__head">
<span class="lead-form__title"><?php echo esc_html( $form_title ); ?></span>
<span class="lead-form__text">Ответим в мессенджере или по телефону и уточним детали заказа.</span>
</div>
<label class="lead-form__field">
<span class="lead-form__label">Имя</span>
<input class="lead-form__input" type="text" name="lead_name" autocomplete="name" placeholder="Как к вам обращаться">
</label>
<label class="lead-form__field">
<span class="lead-form__label">Телефон</span>
<input class="lead-form__input" type="tel" name="lead_phone" autocomplete="tel" placeholder="+7" required>
</label>
<label class="lead-form__field">
<span class="lead-form__label">Комментарий</span>
<textarea class="lead-form__textarea" name="lead_message" rows="4" placeholder="Дата, повод, вес, идея декора"></textarea>
</label>
<label class="lead-form__consent">
<input class="lead-form__checkbox" type="checkbox" name="personal_data_agree" value="1" required>
<span class="lead-form__consent-text">Согласен на обработку персональных данных и принимаю <a href="<?php echo esc_url( home_url( '/politika-konfidencialnosti/' ) ); ?>">политику конфиденциальности</a>.</span>
</label>
<button class="lead-form__button" type="submit">Отправить заявку</button>
<?php if ( isset( $_GET['form_status'] ) ) : ?>
<span class="lead-form__status"><?php echo 'success' === sanitize_text_field( wp_unslash( $_GET['form_status'] ) ) ? 'Заявка отправлена. Скоро свяжемся с вами.' : 'Заявка принята. Если сообщение не дошло в Telegram, мы проверим настройки отправки.'; ?></span>
<?php endif; ?>
</form>