Smilia: children's dental clinic website (WordPress theme and plugin)

This commit is contained in:
jimagie committed 2026-10-22 19:36:36 +05:00
commit 4f4b5f2c0a
266 files changed
+16459

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
<?php
use Smilia\Theme\Components;
defined( 'ABSPATH' ) || exit;
Components::use( array( 'demo-bar', 'site-header', 'site-footer', 'booking', 'not-found' ) );
get_header();
Components::render( 'not-found' );
get_footer();
@@ -0,0 +1,548 @@
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: transparent;
scroll-padding-top: 6rem;
}
@media (prefers-reduced-motion: no-preference) {
html {
scroll-behavior: smooth;
}
}
body {
margin: 0;
background: var(--color-bg);
color: var(--color-text);
font-family: var(--font-sans);
font-size: var(--fs-body);
font-weight: 500;
line-height: var(--leading-normal);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote,
dl,
dd {
margin: 0;
}
ul,
ol {
padding: 0;
list-style: none;
}
img,
svg {
display: block;
max-width: 100%;
}
img {
height: auto;
}
a {
color: inherit;
text-decoration: none;
}
button,
input,
select,
textarea {
font: inherit;
color: inherit;
}
button {
cursor: pointer;
}
:focus-visible {
outline: 3px solid var(--color-focus);
outline-offset: 3px;
}
.screen-reader-text {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.skip-link:focus {
position: fixed;
top: var(--space-4);
left: var(--space-4);
z-index: 100;
width: auto;
height: auto;
padding: var(--space-3) var(--space-6);
clip: auto;
background: var(--color-surface);
border-radius: var(--radius-full);
box-shadow: var(--shadow-lg);
}
.container {
width: 100%;
max-width: calc(var(--container) + var(--gutter) * 2);
margin-inline: auto;
padding-inline: var(--gutter);
}
.container--wide {
max-width: calc(var(--container-wide) + var(--gutter) * 2);
}
.section {
padding-block: var(--space-section);
}
.section--soft {
background: var(--color-bg-soft);
}
.section__title {
color: var(--color-text-heading);
font-size: var(--fs-h2);
font-weight: var(--font-weight-extrabold);
line-height: var(--leading-tight);
text-align: center;
text-wrap: balance;
}
.section__title + .section__lead {
margin-top: var(--space-3);
}
.section__lead {
max-width: 38rem;
margin-inline: auto;
color: var(--color-text-muted);
font-size: var(--fs-lead);
line-height: var(--leading-relaxed);
text-align: center;
text-wrap: pretty;
}
.section__head {
margin-bottom: var(--space-head);
}
.button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--space-2);
min-height: 3rem;
padding: var(--space-3) var(--space-8);
border: 2px solid transparent;
border-radius: var(--radius-full);
font-size: var(--fs-button);
font-weight: var(--font-weight-extrabold);
line-height: 1;
white-space: nowrap;
transition: background-color var(--duration-fast) ease, color var(--duration-fast) ease, border-color var(--duration-fast) ease, transform 0.08s ease;
}
.button:active {
transform: scale(0.97);
}
.button--primary {
background: var(--color-accent);
color: var(--color-white);
box-shadow: var(--shadow-accent);
}
.button--outline {
background: var(--color-surface);
border-color: var(--color-accent);
color: var(--color-accent);
}
.button--lg {
min-height: 3.5rem;
padding-inline: var(--space-10);
font-size: var(--text-lg);
}
.link-underline {
color: var(--color-accent-strong);
font-weight: var(--font-weight-extrabold);
border-bottom: 2px solid var(--color-accent-light);
transition: color var(--duration-fast) ease;
}
:has(> .edit-badge) {
position: relative;
}
.edit-badge {
position: absolute;
top: var(--space-2);
right: var(--space-2);
z-index: 5;
display: none;
padding: var(--space-1) var(--space-3);
background: var(--color-accent);
border: 0;
border-radius: var(--radius-full);
box-shadow: var(--shadow-sm);
color: var(--color-white);
font-family: var(--font-sans);
font-size: var(--text-sm);
font-weight: var(--font-weight-bold);
line-height: var(--leading-normal);
text-decoration: none;
cursor: pointer;
}
.wave {
position: absolute;
bottom: -2px;
left: 0;
z-index: 3;
display: block;
width: 100%;
height: var(--wave-height, var(--space-32));
}
.wave__back {
fill: var(--wave-back, var(--color-pink-200));
}
.wave__middle {
fill: var(--wave-middle, var(--color-accent-light));
}
.wave__front {
fill: var(--wave-front, var(--color-bg));
}
.wp-block-breadcrumbs {
max-width: calc(var(--container) + var(--gutter) * 2);
margin-inline: auto;
padding: var(--space-4) var(--gutter) 0;
color: var(--color-text-muted);
font-size: var(--fs-small);
font-weight: var(--font-weight-bold);
}
.wp-block-breadcrumbs--flush {
max-width: none;
padding: 0;
}
.wp-block-breadcrumbs--wide {
max-width: calc(var(--container-wide) + var(--gutter) * 2);
}
.wp-block-breadcrumbs li {
gap: var(--space-2);
}
.wp-block-breadcrumbs a {
padding-block: var(--space-1);
}
@media (pointer: coarse) {
.wp-block-breadcrumbs a {
padding-block: var(--space-3);
}
}
.wp-block-breadcrumbs ol {
column-gap: var(--space-2);
}
.wp-block-breadcrumbs ol li:not(:last-child)::after {
margin: 0;
}
.wp-block-breadcrumbs span[aria-current] {
color: var(--color-accent-strong);
}
.reveal--hidden {
opacity: 0;
translate: 0 1.5rem;
}
.reveal--visible {
animation: reveal-rise var(--duration-slow) var(--ease-out) var(--reveal-delay, 0ms) both;
}
@keyframes reveal-rise {
from {
opacity: 0;
translate: 0 1.5rem;
}
to {
opacity: 1;
translate: 0 0;
}
}
@media (hover: hover) {
.wp-block-breadcrumbs a:hover {
color: var(--color-accent-strong);
}
:has(> .edit-badge):hover {
outline: 2px solid var(--color-accent);
outline-offset: 4px;
}
:hover > .edit-badge {
display: block;
}
.edit-badge:hover {
background: var(--color-accent-hover);
color: var(--color-white);
}
}
@media (hover: hover) {
a:hover {
color: var(--color-accent);
}
.button--primary:hover {
background: var(--color-accent-hover);
color: var(--color-white);
}
.button--outline:hover {
background: color-mix(in srgb, var(--color-accent) 6%, var(--color-surface));
color: var(--color-accent);
}
.showcase__figma:hover {
color: var(--color-accent-strong);
}
.link-underline:hover {
color: var(--color-accent);
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
@media print {
.reveal--hidden {
opacity: 1;
translate: none;
}
}
.container--text {
max-width: calc(var(--container-text) + var(--gutter) * 2);
}
.legal {
--container-text: 52rem;
--legal-title-size: clamp(var(--text-3xl), 4vw, 2.75rem);
padding-block: var(--space-6) var(--space-16);
}
.legal__crumbs {
margin-bottom: var(--space-4);
}
.legal__title {
margin-bottom: var(--space-4);
color: var(--color-accent-strong);
font-size: var(--legal-title-size);
font-weight: var(--font-weight-extrabold);
line-height: 1.1;
text-wrap: balance;
}
.legal__intro,
.legal__text,
.legal__list {
margin-top: var(--space-4);
color: var(--color-text-body);
font-size: var(--text-lg);
line-height: var(--leading-loose);
text-wrap: pretty;
}
.legal__title + .legal__intro {
margin-top: 0;
}
.legal__heading {
margin-top: var(--space-10);
color: var(--color-text-heading);
font-size: var(--text-2xl);
font-weight: var(--font-weight-extrabold);
line-height: var(--leading-snug);
}
.legal__heading + .legal__text,
.legal__heading + .legal__list {
margin-top: var(--space-3);
}
.legal__list {
padding-left: var(--space-6);
list-style: disc;
}
.legal__item + .legal__item {
margin-top: var(--space-2);
}
.legal__link {
color: var(--color-accent-strong);
font-weight: var(--font-weight-bold);
text-decoration: underline;
text-underline-offset: 0.2em;
}
.showcase .wp-block-group__inner-container {
display: contents;
}
.showcase__admin {
display: flex;
flex-wrap: wrap;
gap: var(--space-3);
margin-top: var(--space-8);
}
.showcase__figma {
border-color: var(--color-accent-strong);
color: var(--color-accent-strong);
}
.showcase__list {
display: grid;
gap: var(--space-3);
margin-top: var(--space-8);
}
.showcase__item {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-4);
padding: var(--space-4) var(--space-6);
background: var(--color-surface);
border-radius: var(--radius-xl);
box-shadow: var(--shadow-sm);
}
.showcase__info {
display: grid;
gap: var(--space-1);
min-width: 0;
}
.showcase__name {
color: var(--color-text-heading);
font-size: var(--text-lg);
font-weight: var(--font-weight-extrabold);
line-height: var(--leading-snug);
}
.showcase__kind {
color: var(--color-text-muted);
font-size: var(--text-sm);
}
.showcase__checks {
display: flex;
flex-wrap: wrap;
gap: var(--space-1) var(--space-4);
font-size: var(--text-sm);
}
.showcase__check {
color: var(--color-accent-strong);
font-weight: var(--font-weight-bold);
text-decoration: underline;
text-underline-offset: 0.2em;
}
@media (pointer: coarse) {
.showcase__check {
display: inline-block;
padding-block: var(--space-3);
}
}
@media (hover: hover) {
.showcase__check:hover {
color: var(--color-accent);
}
}
.showcase__links {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: var(--space-2);
}
.showcase__link {
min-height: 2.75rem;
padding-inline: var(--space-5);
}
@media (max-width: 760px) {
.showcase__item {
flex-direction: column;
align-items: stretch;
padding: var(--space-4);
}
.showcase__links {
justify-content: flex-start;
}
.showcase__admin-link {
width: 100%;
}
}
@media (max-width: 400px) {
.showcase__link {
flex: 1 1 auto;
}
}
@@ -0,0 +1,17 @@
.is-root-container > [data-type^="smilia/"] {
max-width: none;
margin-block: 0;
}
[data-edit-url] a:focus {
box-shadow: none;
outline: none;
}
.prices__tools td {
display: flex;
flex-wrap: wrap;
align-items: flex-end;
gap: var(--space-3);
padding: var(--space-3) var(--space-6) var(--space-5);
}
@@ -0,0 +1,321 @@
@font-face {
font-family: "Nunito";
font-style: normal;
font-weight: 500 800;
font-display: swap;
src: url("../fonts/nunito-cyrillic.woff2") format("woff2");
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
font-family: "Nunito";
font-style: normal;
font-weight: 500 800;
font-display: swap;
src: url("../fonts/nunito-latin-ext.woff2") format("woff2");
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: "Nunito";
font-style: normal;
font-weight: 500 800;
font-display: swap;
src: url("../fonts/nunito-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: "Neucha";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("../fonts/neucha-cyrillic.woff2") format("woff2");
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
font-family: "Neucha";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("../fonts/neucha-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: "Pangolin";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("../fonts/pangolin-latin-ext.woff2") format("woff2");
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: "Pangolin";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("../fonts/pangolin-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: "Comfortaa";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("../fonts/comfortaa-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: "Comfortaa";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("../fonts/comfortaa-latin-ext.woff2") format("woff2");
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: "Comfortaa";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("../fonts/comfortaa-cyrillic.woff2") format("woff2");
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
font-family: "Nunito Fallback";
font-weight: 100 549;
src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo");
size-adjust: 102.32%;
ascent-override: 98.81%;
descent-override: 34.5%;
line-gap-override: 0%;
}
@font-face {
font-family: "Nunito Fallback";
font-weight: 550 649;
src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Arimo Bold");
size-adjust: 96.43%;
ascent-override: 104.84%;
descent-override: 36.61%;
line-gap-override: 0%;
}
@font-face {
font-family: "Nunito Fallback";
font-weight: 650 749;
src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Arimo Bold");
size-adjust: 98.52%;
ascent-override: 102.62%;
descent-override: 35.83%;
line-gap-override: 0%;
}
@font-face {
font-family: "Nunito Fallback";
font-weight: 750 900;
src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Arimo Bold");
size-adjust: 100.76%;
ascent-override: 100.34%;
descent-override: 35.03%;
line-gap-override: 0%;
}
@font-face {
font-family: "Comfortaa Fallback";
font-weight: 700;
src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Arimo Bold");
size-adjust: 117.72%;
ascent-override: 74.84%;
descent-override: 19.88%;
line-gap-override: 0%;
}
:root {
--color-white: #ffffff;
--color-cyan-200: #8fe4ef;
--color-teal-50: #f2fbfc;
--color-teal-100: #dff2f6;
--color-teal-200: #cde9ee;
--color-teal-300: #8fd9e2;
--color-teal-500: #00b3c7;
--color-teal-600: #009fb1;
--color-teal-700: #00778a;
--color-teal-800: #00566b;
--color-teal-950: #12414c;
--color-slate-400: #8a9ca3;
--color-slate-500: #5d7078;
--color-slate-700: #4a565c;
--color-slate-800: #3d4a51;
--color-slate-900: #222b30;
--color-slate-950: #19232a;
--color-yellow-50: #fdf3d0;
--color-yellow-100: #fbefcd;
--color-yellow-200: #f5e6a8;
--color-yellow-300: #ecd07a;
--color-yellow-900: #5f4a0f;
--color-pink-100: #fbe3ee;
--color-pink-200: #f9cfe4;
--color-pink-300: #f2a9c9;
--color-pink-700: #b03a72;
--color-green-700: #15803d;
--color-red-700: #b91c1c;
--color-lavender-100: #e7ecf2;
--color-lavender-200: #cfd7e3;
--color-peach-100: #fbe4d3;
--color-peach-200: #f0cdb0;
--color-sand-50: #fdf8ec;
--font-sans: "Nunito", "Nunito Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
--font-logo: "Comfortaa", "Comfortaa Fallback", "Nunito", sans-serif;
--font-hand: "Neucha", "Segoe Print", "Bradley Hand", cursive;
--text-xs: 0.75rem;
--text-sm: 0.875rem;
--text-base: 1rem;
--text-lg: 1.125rem;
--text-xl: 1.25rem;
--text-2xl: 1.5rem;
--text-3xl: 1.875rem;
--text-4xl: 2.25rem;
--text-5xl: 3rem;
--text-6xl: 3.75rem;
--text-7xl: 4.5rem;
--text-8xl: 6rem;
--font-weight-normal: 400;
--font-weight-semibold: 600;
--font-weight-bold: 700;
--font-weight-extrabold: 800;
--leading-tight: 1.2;
--leading-snug: 1.3;
--leading-normal: 1.5;
--leading-relaxed: 1.6;
--leading-loose: 1.7;
--tracking-wide: 0.09em;
--tracking-wider: 0.14em;
--space-1: 0.25rem;
--space-2: 0.5rem;
--space-3: 0.75rem;
--space-4: 1rem;
--space-5: 1.25rem;
--space-6: 1.5rem;
--space-7: 1.75rem;
--space-8: 2rem;
--space-10: 2.5rem;
--space-12: 3rem;
--space-16: 4rem;
--space-24: 6rem;
--space-32: 8rem;
--space-40: 10rem;
--radius-sm: 0.25rem;
--radius-md: 0.5rem;
--radius-lg: 0.75rem;
--radius-xl: 1rem;
--radius-2xl: 1.5rem;
--radius-3xl: 2rem;
--radius-full: 9999px;
--shadow-sm: 0 2px 12px color-mix(in srgb, var(--color-teal-950) 8%, transparent);
--shadow-md: 0 10px 26px color-mix(in srgb, var(--color-teal-950) 9%, transparent);
--shadow-lg: 0 20px 40px color-mix(in srgb, var(--color-teal-950) 16%, transparent);
--shadow-accent: 0 10px 24px color-mix(in srgb, var(--color-teal-500) 28%, transparent);
--ease-out: cubic-bezier(0.22, 0.8, 0.28, 1);
--duration-fast: 0.2s;
--duration-base: 0.28s;
--duration-slow: 1s;
--container: 70rem;
--container-wide: 87.5rem;
--color-bg: var(--color-white);
--color-bg-soft: var(--color-teal-50);
--color-bg-paper: var(--color-sand-50);
--color-surface: var(--color-white);
--color-text: var(--color-slate-900);
--color-text-heading: var(--color-slate-700);
--color-text-body: var(--color-slate-800);
--color-text-muted: var(--color-slate-500);
--color-text-faint: var(--color-slate-400);
--color-text-strong: var(--color-teal-950);
--color-line: var(--color-teal-200);
--color-line-soft: var(--color-teal-100);
--color-accent: var(--color-teal-500);
--color-accent-hover: var(--color-teal-600);
--color-accent-strong: var(--color-teal-700);
--color-accent-soft: var(--color-teal-100);
--color-danger: var(--color-pink-700);
--color-status-open: var(--color-green-700);
--color-status-closed: var(--color-red-700);
--color-focus: var(--color-teal-700);
--color-overlay: color-mix(in srgb, var(--color-teal-950) 45%, transparent);
--color-accent-light: var(--color-teal-300);
--color-accent-deep: var(--color-teal-800);
--color-shadow: var(--color-teal-950);
--color-night: var(--color-slate-900);
--color-night-deep: var(--color-slate-950);
--color-highlight: var(--color-yellow-200);
--color-highlight-cool: var(--color-cyan-200);
--color-note: var(--color-yellow-100);
--color-paper: var(--color-yellow-50);
--color-on-dark-muted: var(--color-teal-100);
--fs-display: var(--text-7xl);
--fs-h1: var(--text-6xl);
--fs-h2: var(--text-5xl);
--fs-h3: var(--text-3xl);
--fs-card-title: var(--text-xl);
--fs-lead: var(--text-lg);
--fs-body: var(--text-base);
--fs-small: var(--text-sm);
--fs-caption: var(--text-xs);
--fs-button: var(--text-base);
--space-section: var(--space-24);
--space-head: var(--space-12);
--space-card: var(--space-6);
--gutter: var(--space-16);
}
@media (max-width: 980px) {
:root {
--fs-h1: var(--text-5xl);
--fs-h2: var(--text-4xl);
--space-section: var(--space-16);
--gutter: var(--space-8);
}
}
@media (max-width: 760px) {
:root {
--fs-h1: var(--text-4xl);
--fs-h2: var(--text-3xl);
--fs-h3: var(--text-2xl);
--fs-card-title: var(--text-lg);
--space-head: var(--space-10);
--gutter: var(--space-6);
}
}
@media (max-width: 400px) {
:root {
--space-section: var(--space-12);
--gutter: var(--space-4);
}
}
:root:lang(pl) {
--font-hand: "Pangolin", "Segoe Print", "Bradley Hand", cursive;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

@@ -0,0 +1,5 @@
<svg width="512" height="512" viewBox="30 70 1180 1145" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M460.765 401.925C540.284 395.719 595.287 472.8 612.874 472.927C616.989 472.957 621.11 470.96 624.569 468.897C631.99 464.467 638.891 457.869 645.749 452.516C659.152 442.056 673.425 432.236 688.61 424.53C709.453 413.955 733.553 407.529 756.913 407.138C786.53 406.643 815.761 415.984 837.192 436.98C862.688 461.96 872.963 497.791 873.049 532.756C873.293 634.844 802.774 739.511 733.786 809.301C704.01 838.68 671.827 867.085 635.211 887.707C628.433 891.522 620.246 896.481 612.335 897.075C590.619 898.716 521.722 843.186 504.449 828.301C427.225 761.738 349.758 662.238 342.098 556.823C339.153 516.28 347.796 475.297 375.102 444.007C397.144 418.748 427.434 404.188 460.765 401.925Z" fill="#8DD0D8"></path>
<path d="M336.775 75.0447C389.454 71.786 449.686 84.5868 499.756 100.595C537.592 110.849 594.403 141.753 633.968 136.27C692.921 128.099 748.757 96.4594 808.75 84.7901C898.282 67.3755 989.919 68.8659 1068.82 119.73C1143.93 168.149 1182.55 250.331 1200.85 335.096C1225.6 452.952 1207.13 572.335 1167.71 684.697C1162.72 698.86 1157.43 712.906 1151.84 726.836C1149.87 731.771 1145.98 742.181 1143.25 746.387C1144.89 738.923 1145.4 728.673 1145.68 720.94C1146.61 695.223 1144.97 670.467 1134.58 646.612C1131.59 637.728 1120.35 625.837 1120.95 616.291C1121.52 607.211 1123.79 595.453 1125.16 586.279C1127.79 568.999 1129.96 551.655 1131.69 534.263C1141.12 437.133 1133.22 324.91 1080.42 239.828C1016.25 136.401 895.796 140.403 791.851 167.269C746.491 178.993 700.997 196.666 654.56 202.809C621.024 207.245 594.602 204.198 561.943 197.035C530.346 189.304 498.868 178.332 467.168 169.772C399.131 151.402 323.668 140.588 255.949 166.017C203.025 185.89 166.293 229.648 144.066 280.222C87.6913 408.484 105.213 574.703 162.097 699.509C187.362 753.888 220.34 804.342 260.01 849.309C280.773 872.755 303.19 894.687 327.089 914.93C330.63 917.955 334.34 920.943 337.816 924.017C341.213 927.029 349.125 932.136 346.164 937.194C339.977 940.69 322.366 934.842 315.271 932.571C268.788 917.667 219.606 892.226 183.846 858.592C107.834 787.087 62.8476 675.831 44.1997 575.014C38.3652 542.352 34.8418 509.319 33.6556 476.161C25.4342 273.769 112.409 83.7082 336.775 75.0447Z" fill="#039FB9"></path>
<path d="M1084.5 686.883C1102.68 687.508 1101.87 736.131 1100.98 750.024C1092.88 876.894 1012.03 997.346 921.108 1080.96C833.91 1161.15 718.527 1217.22 598.344 1210.42C476.347 1204.37 360.551 1132.96 280.129 1044.59C264.389 1027.51 214.421 970.534 215.477 947.425C215.565 945.49 216.115 943.5 217.763 942.294C218.827 941.516 220.239 941.161 221.532 941.039C235.725 939.71 273.101 967.484 286.303 975.622C340.609 1009.27 400.17 1033.58 462.511 1047.53C684.275 1098.13 913.099 998.136 1026.61 801.023C1038.46 781.086 1048.9 760.342 1057.85 738.948C1063.41 725.569 1067.99 711.48 1074.33 698.462C1076.86 693.251 1079.47 689.945 1084.5 686.883Z" fill="#FCA1B7"></path>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

@@ -0,0 +1,145 @@
(() => {
const GROUP = 3;
const setup = (input) => {
const code = input.dataset.phoneCode;
const length = Number(input.dataset.phoneDigits);
const prefix = `+${code} `;
const digitsOf = (value) => value.slice(prefix.length).replace(/\D/g, '');
const format = (digits) => {
const groups = [];
for (let i = 0; i < digits.length; i += GROUP) {
groups.push(digits.slice(i, i + GROUP));
}
return prefix + groups.join(' ');
};
const positionOf = (digitIndex) => {
if (digitIndex <= 0) {
return prefix.length;
}
return prefix.length + digitIndex + Math.floor((digitIndex - 1) / GROUP);
};
const indexOf = (position) => input.value.slice(prefix.length, Math.max(position, prefix.length)).replace(/\D/g, '').length;
const render = (digits, caret = digits.length) => {
input.value = format(digits);
const position = positionOf(caret);
input.setSelectionRange(position, position);
};
const normalize = (raw) => {
let digits = raw.replace(/\D/g, '');
if (digits.length > length) {
if (digits.startsWith(`00${code}`)) {
digits = digits.slice(code.length + 2);
} else if (digits.startsWith(code)) {
digits = digits.slice(code.length);
}
}
return digits;
};
const replace = (text, isPaste) => {
const current = digitsOf(input.value);
const start = indexOf(input.selectionStart);
const end = indexOf(input.selectionEnd);
const whole = start === 0 && end === current.length;
const room = length - current.length + (end - start);
const clean = isPaste && whole ? normalize(text) : text.replace(/\D/g, '');
if (isPaste && clean.length > room) {
return;
}
const inserted = clean.slice(0, room);
if (!inserted) {
return;
}
render(current.slice(0, start) + inserted + current.slice(end), start + inserted.length);
};
const remove = (inputType) => {
const current = digitsOf(input.value);
let start = indexOf(input.selectionStart);
let end = indexOf(input.selectionEnd);
if (start === end) {
if (inputType.includes('Backward')) {
if (inputType.includes('Line')) {
start = 0;
} else if (inputType.includes('Word')) {
start = Math.max(0, Math.floor((start - 1) / GROUP) * GROUP);
} else {
start = Math.max(0, start - 1);
}
} else if (inputType.includes('Line')) {
end = current.length;
} else if (inputType.includes('Word')) {
end = Math.min(current.length, (Math.floor(end / GROUP) + 1) * GROUP);
} else {
end = Math.min(current.length, end + 1);
}
}
render(current.slice(0, start) + current.slice(end), start);
};
const keepCaret = () => {
window.setTimeout(() => {
if (document.activeElement !== input) {
return;
}
if (!input.value.startsWith(prefix)) {
render(normalize(input.value));
return;
}
if (input.selectionStart === input.selectionEnd && input.selectionStart < prefix.length) {
input.setSelectionRange(prefix.length, prefix.length);
}
}, 0);
};
input.addEventListener('beforeinput', (event) => {
event.preventDefault();
if (event.inputType.startsWith('delete')) {
remove(event.inputType);
} else if (event.inputType === 'insertFromPaste') {
replace(event.data ?? event.dataTransfer?.getData('text') ?? '', true);
} else if (event.inputType.startsWith('insert') && event.data) {
replace(event.data, event.inputType === 'insertReplacementText');
}
});
input.addEventListener('input', () => {
render(normalize(input.value.startsWith(prefix) ? digitsOf(input.value) : input.value).slice(0, length));
});
input.addEventListener('focus', () => {
if (!input.value) {
render('');
}
keepCaret();
});
input.addEventListener('blur', () => {
if (!digitsOf(input.value)) {
input.value = '';
}
});
['click', 'keyup', 'select'].forEach((type) => input.addEventListener(type, keepCaret));
input.smiliaPhone = {
value: () => {
const digits = digitsOf(input.value);
return digits ? `+${code}${digits}` : '';
},
complete: () => digitsOf(input.value).length === length,
reset: () => {
input.value = '';
},
};
};
document.querySelectorAll('[data-phone-code]').forEach(setup);
})();
@@ -0,0 +1,42 @@
( () => {
const items = document.querySelectorAll( '[data-reveal]' );
if (
! items.length ||
! ( 'IntersectionObserver' in window ) ||
window.matchMedia( '(prefers-reduced-motion: reduce)' ).matches
) {
return;
}
const observer = new IntersectionObserver(
( entries ) => {
entries
.filter( ( entry ) => entry.isIntersecting )
.forEach( ( entry, index ) => {
entry.target.style.setProperty( '--reveal-delay', `${ index * 120 }ms` );
entry.target.classList.remove( 'reveal--hidden' );
entry.target.classList.add( 'reveal--visible' );
observer.unobserve( entry.target );
} );
},
{ threshold: 0.2 }
);
const start = () =>
window.requestAnimationFrame( () => {
items.forEach( ( item ) => {
const rect = item.getBoundingClientRect();
const shown = Math.min( rect.right, window.innerWidth ) - Math.max( rect.left, 0 );
if ( rect.top > window.innerHeight && shown >= rect.width * 0.2 ) {
item.classList.add( 'reveal--hidden' );
observer.observe( item );
}
} );
} );
if ( document.readyState === 'complete' ) {
start();
} else {
window.addEventListener( 'load', start, { once: true } );
}
} )();
@@ -0,0 +1,13 @@
{
"name": "Smilia",
"short_name": "Smilia",
"start_url": "/",
"display": "browser",
"background_color": "#ffffff",
"icons": [
{ "src": "img/icons/icon-maskable-192.png", "sizes": "192x192", "type": "image/png", "purpose": "any" },
{ "src": "img/icons/icon-maskable-512.png", "sizes": "512x512", "type": "image/png", "purpose": "any" },
{ "src": "img/icons/icon-maskable-192.png", "sizes": "192x192", "type": "image/png", "purpose": "maskable" },
{ "src": "img/icons/icon-maskable-512.png", "sizes": "512x512", "type": "image/png", "purpose": "maskable" }
]
}
@@ -0,0 +1,349 @@
.booking {
--booking-shadow: 0 1.875rem 4.375rem color-mix(in srgb, var(--color-shadow) 30%, transparent);
width: min(32.5rem, calc(100% - var(--space-12)));
max-height: calc(100% - var(--space-12));
padding: var(--space-10) var(--space-10) var(--space-10);
overflow: auto;
background: var(--color-surface);
border: 0;
border-radius: var(--radius-2xl);
box-shadow: var(--booking-shadow);
color: var(--color-text);
}
.booking::backdrop {
background: var(--color-overlay);
}
.booking[open] {
animation: booking-in var(--duration-base) var(--ease-out);
}
.booking__close {
position: absolute;
top: var(--space-5);
right: var(--space-5);
display: flex;
align-items: center;
justify-content: center;
width: 2.75rem;
height: 2.75rem;
padding: 0;
background: var(--color-bg-soft);
border: 0;
border-radius: 50%;
color: var(--color-accent-strong);
transition: background-color var(--duration-fast) ease, transform 0.08s ease;
}
.booking__close-icon {
width: 1.25rem;
height: 1.25rem;
fill: none;
stroke: currentColor;
stroke-width: 2.4;
stroke-linecap: round;
}
.booking__title {
padding-right: var(--space-12);
margin-bottom: var(--space-2);
color: var(--color-text-heading);
font-size: var(--text-2xl);
font-weight: var(--font-weight-extrabold);
line-height: var(--leading-snug);
}
.booking__lead {
margin-bottom: var(--space-6);
color: var(--color-text-muted);
line-height: var(--leading-relaxed);
text-wrap: pretty;
}
.booking__demo {
margin-bottom: var(--space-6);
padding: var(--space-3) var(--space-4);
background: var(--color-note);
border-radius: var(--radius-lg);
color: var(--color-text-body);
font-size: var(--fs-small);
line-height: var(--leading-normal);
}
.booking__fields {
display: flex;
flex-direction: column;
gap: var(--space-4);
}
.booking__row {
display: grid;
grid-template-columns: 7rem 1fr;
gap: var(--space-3);
}
.field {
display: flex;
flex-direction: column;
gap: var(--space-2);
}
.field__label {
color: var(--color-accent-strong);
font-size: var(--fs-small);
font-weight: var(--font-weight-bold);
}
.field__input {
width: 100%;
min-height: 3.25rem;
padding: var(--space-3) var(--space-4);
background: var(--color-bg-soft);
border: 1.5px solid var(--color-line);
border-radius: var(--radius-lg);
color: var(--color-text-strong);
font-size: var(--fs-body);
outline: none;
appearance: none;
transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}
.field__input::placeholder {
color: var(--color-text-faint);
}
.field__input:focus {
border-color: var(--color-accent);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 16%, transparent);
}
.field__input[aria-invalid="true"] {
border-color: var(--color-danger);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-danger) 14%, transparent);
}
.field__select {
position: relative;
display: block;
}
.field__select::after {
content: "";
position: absolute;
top: 50%;
right: var(--space-4);
width: 0.5rem;
height: 0.5rem;
margin-top: -0.375rem;
border-right: 2px solid var(--color-accent-strong);
border-bottom: 2px solid var(--color-accent-strong);
transform: rotate(45deg);
pointer-events: none;
}
.field__select .field__input {
padding-right: var(--space-10);
cursor: pointer;
}
@supports (appearance: base-select) {
.field__select::after {
display: none;
}
.field__select select.field__input {
appearance: base-select;
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-3);
padding-right: var(--space-4);
}
select.field__input::picker-icon {
content: "";
flex: none;
width: 0.5rem;
height: 0.5rem;
margin-top: -0.25rem;
border-right: 2px solid var(--color-accent-strong);
border-bottom: 2px solid var(--color-accent-strong);
rotate: 45deg;
transition: rotate var(--duration-fast) ease;
}
select.field__input:open::picker-icon {
margin-top: 0.25rem;
rotate: 225deg;
}
select.field__input::picker(select) {
appearance: base-select;
min-width: anchor-size(width);
margin-top: var(--space-2);
padding: var(--space-2);
background: var(--color-surface);
border: 1.5px solid var(--color-line);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-lg);
}
select.field__input option {
display: flex;
align-items: center;
justify-content: flex-start;
gap: var(--space-3);
padding: var(--space-3) var(--space-4);
border-radius: var(--radius-md);
color: var(--color-text-strong);
font-size: var(--fs-body);
cursor: pointer;
}
select.field__input option:checked {
background: var(--color-accent-soft);
color: var(--color-accent-strong);
font-weight: var(--font-weight-bold);
}
select.field__input option::checkmark {
order: 1;
margin-left: auto;
color: var(--color-accent-strong);
}
select.field__input option:focus-visible {
background: var(--color-bg-soft);
outline: 2px solid var(--color-focus);
outline-offset: -2px;
}
}
@media (hover: hover) {
@supports (appearance: base-select) {
select.field__input option:hover {
background: var(--color-bg-soft);
color: var(--color-accent-strong);
}
}
}
.booking__trap {
position: absolute;
left: -9999px;
width: 1px;
height: 1px;
overflow: hidden;
}
.consent {
display: flex;
align-items: flex-start;
gap: var(--space-3);
margin-top: var(--space-5);
color: var(--color-text-muted);
font-size: var(--fs-small);
line-height: var(--leading-normal);
cursor: pointer;
}
.consent__box {
flex: none;
width: 1.25rem;
height: 1.25rem;
margin: 0.125rem 0 0;
background: var(--color-bg-soft);
border: 1.5px solid var(--color-line);
border-radius: var(--radius-sm);
appearance: none;
cursor: pointer;
transition: background-color var(--duration-fast) ease, border-color var(--duration-fast) ease;
}
.consent__box:checked {
background: var(--color-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
border-color: var(--color-accent);
}
.consent__box[aria-invalid="true"] {
border-color: var(--color-danger);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-danger) 14%, transparent);
}
.consent__line {
display: block;
}
.consent__text a {
color: var(--color-accent-strong);
font-weight: var(--font-weight-bold);
text-decoration: underline;
text-underline-offset: 2px;
}
.booking__message {
min-height: calc(2 * 1.5em);
margin: var(--space-2) 0;
color: var(--color-danger);
font-size: var(--fs-small);
font-weight: var(--font-weight-bold);
line-height: 1.5;
}
.booking__submit {
width: 100%;
}
.booking__submit[aria-busy="true"] {
cursor: progress;
}
.booking__done {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: var(--space-2);
}
.booking__done[hidden] {
display: none;
}
@keyframes booking-in {
from {
opacity: 0;
transform: translateY(1rem) scale(0.98);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
.booking__close:active {
transform: scale(0.94);
}
@media (hover: hover) {
.booking__close:hover {
background: var(--color-accent-soft);
}
.consent__box:hover {
border-color: var(--color-accent);
}
}
@media (max-width: 560px) {
.booking {
width: calc(100% - var(--space-6));
max-height: calc(100% - var(--space-6));
padding: var(--space-8) var(--space-5) var(--space-6);
}
.booking__row {
grid-template-columns: 1fr;
}
}
@@ -0,0 +1,183 @@
(() => {
const dialog = document.getElementById('booking');
if (!dialog || typeof dialog.showModal !== 'function') {
return;
}
const form = dialog.querySelector('[data-booking-form]');
const done = dialog.querySelector('[data-booking-done]');
const doneText = dialog.querySelector('[data-booking-done-text]');
const message = dialog.querySelector('[data-booking-message]');
const submit = form.querySelector('.booking__submit');
const texts = JSON.parse(form.dataset.messages || '{}');
const phone = form.elements.namedItem('phone');
const guard = form.querySelector('altcha-widget');
const arm = () => {
if (!guard) {
return;
}
if (!document.querySelector('script[data-altcha]')) {
const script = document.createElement('script');
script.type = 'module';
script.src = form.dataset.altchaScript || '';
script.setAttribute('data-altcha', '');
document.head.appendChild(script);
return;
}
if (typeof guard.getState === 'function' && !['verified', 'verifying'].includes(guard.getState())) {
guard.verify();
}
};
const ready = () =>
new Promise((resolve) => {
let tick = 0;
const poll = () => {
const state = guard && typeof guard.getState === 'function' ? guard.getState() : '';
if (state === 'verified') {
resolve(guard.value || form.elements.namedItem('altcha')?.value || '');
return;
}
const failed = state === 'error' || state === 'expired';
const idle = state === 'unverified' && tick >= 30;
if ((failed || idle) && tick % 30 === 0) {
guard.verify();
}
if (++tick > 150) {
resolve('');
return;
}
setTimeout(poll, 100);
};
poll();
});
const rearm = () => {
if (guard && typeof guard.reset === 'function') {
guard.reset();
guard.verify();
}
};
const clearErrors = () => {
message.textContent = '';
form.querySelectorAll('[aria-invalid="true"]').forEach((field) => {
field.removeAttribute('aria-invalid');
field.removeAttribute('aria-describedby');
});
};
const showError = (fieldName, text) => {
message.textContent = text;
const field = fieldName ? form.elements.namedItem(fieldName) : null;
if (field instanceof HTMLElement) {
field.setAttribute('aria-invalid', 'true');
field.setAttribute('aria-describedby', message.id);
field.focus();
}
};
const validate = () => {
const name = form.elements.namedItem('name').value.trim();
if (name.length < 2) {
return 'name';
}
if (phone.smiliaPhone ? !phone.smiliaPhone.complete() : phone.value.replace(/\D/g, '').length < 9) {
return 'phone';
}
if (!form.elements.namedItem('consent').checked) {
return 'consent';
}
return '';
};
const open = () => {
form.hidden = false;
done.hidden = true;
clearErrors();
form.elements.namedItem('page').value = window.location.href;
arm();
dialog.showModal();
};
document.addEventListener('click', (event) => {
if (event.target.closest('[data-booking-open]')) {
event.preventDefault();
open();
}
});
dialog.addEventListener('click', (event) => {
if (event.target === dialog || event.target.closest('[data-booking-close]')) {
dialog.close();
}
});
form.addEventListener('input', (event) => {
if (event.target.getAttribute('aria-invalid') === 'true') {
event.target.removeAttribute('aria-invalid');
message.textContent = '';
}
});
form.addEventListener('submit', async (event) => {
event.preventDefault();
clearErrors();
const invalid = validate();
if (invalid) {
showError(invalid, texts[invalid]);
return;
}
submit.disabled = true;
submit.setAttribute('aria-busy', 'true');
try {
const proof = await ready();
if (!proof) {
showError('', texts.guard);
rearm();
return;
}
const body = new FormData(form);
body.set('altcha', proof);
if (phone.smiliaPhone) {
body.set('phone', phone.smiliaPhone.value());
}
const response = await fetch(form.action, {
method: 'POST',
credentials: 'same-origin',
headers: {
Accept: 'application/json',
'X-WP-Nonce': form.dataset.restNonce || '',
},
body,
});
rearm();
if (response.status === 429) {
showError('', texts.limit);
return;
}
const result = await response.json().catch(() => ({}));
if (!response.ok || !result.ok) {
showError(result.field || '', result.message || texts.network);
return;
}
form.reset();
phone.smiliaPhone?.reset();
form.hidden = true;
doneText.textContent = result.message;
done.hidden = false;
} catch (error) {
showError('', texts.network);
} finally {
submit.disabled = false;
submit.removeAttribute('aria-busy');
}
});
})();
@@ -0,0 +1,101 @@
<?php
use Smilia\Theme\Data;
defined( 'ABSPATH' ) || exit;
$smilia_form = Data::booking();
if ( ! $smilia_form ) {
return;
}
$smilia_messages = array(
'name' => __( 'Проверьте имя.', 'smilia' ),
'phone' => __( 'Проверьте номер телефона.', 'smilia' ),
'consent' => __( 'Нужно ваше согласие на обработку персональных данных.', 'smilia' ),
'network' => __( 'Не получилось отправить заявку. Проверьте интернет или позвоните нам.', 'smilia' ),
'limit' => __( 'Слишком много заявок подряд. Попробуйте через минуту.', 'smilia' ),
'guard' => __( 'Не удалось подтвердить отправку. Обновите страницу и отправьте заявку ещё раз.', 'smilia' ),
);
?>
<dialog class="booking" id="booking" aria-labelledby="booking-title">
<button type="button" class="booking__close" data-booking-close aria-label="<?php esc_attr_e( 'Закрыть', 'smilia' ); ?>">
<svg class="booking__close-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M6 6l12 12M18 6L6 18"/></svg>
</button>
<form class="booking__form" method="post" action="<?php echo esc_url( $smilia_form['endpoint'] ); ?>" novalidate data-booking-form data-rest-nonce="<?php echo esc_attr( $smilia_form['rest'] ); ?>" data-altcha-script="<?php echo esc_url( $smilia_form['script'] ); ?>" data-messages="<?php echo esc_attr( wp_json_encode( $smilia_messages ) ); ?>">
<h2 class="booking__title" id="booking-title"><?php echo esc_html( Data::setting( 'booking_title' ) ); ?></h2>
<p class="booking__lead"><?php echo esc_html( Data::setting( 'booking_lead' ) ); ?></p>
<p class="booking__demo"><?php esc_html_e( 'Демонстрационный сайт: заявка не будет обработана.', 'smilia' ); ?></p>
<div class="booking__fields">
<label class="field">
<span class="field__label"><?php esc_html_e( 'Ваше имя', 'smilia' ); ?></span>
<input class="field__input" type="text" name="name" autocomplete="name" maxlength="80" required placeholder="<?php esc_attr_e( 'Как к вам обращаться', 'smilia' ); ?>">
</label>
<label class="field">
<span class="field__label"><?php esc_html_e( 'Телефон', 'smilia' ); ?></span>
<input class="field__input" type="tel" name="phone" autocomplete="tel" inputmode="tel" maxlength="24" required placeholder="<?php echo esc_attr( $smilia_form['phone']['example'] ); ?>" data-phone-code="<?php echo esc_attr( $smilia_form['phone']['code'] ); ?>" data-phone-digits="<?php echo esc_attr( (string) $smilia_form['phone']['digits'] ); ?>">
</label>
<div class="booking__row">
<label class="field">
<span class="field__label"><?php esc_html_e( 'Возраст', 'smilia' ); ?></span>
<input class="field__input" type="text" name="age" maxlength="20" placeholder="<?php esc_attr_e( '5 лет', 'smilia' ); ?>">
</label>
<label class="field">
<span class="field__label"><?php esc_html_e( 'Что беспокоит', 'smilia' ); ?></span>
<span class="field__select">
<select class="field__input" name="concern">
<?php foreach ( $smilia_form['concerns'] as $smilia_value => $smilia_label ) : ?>
<option value="<?php echo esc_attr( $smilia_value ); ?>"><?php echo esc_html( $smilia_label ); ?></option>
<?php endforeach; ?>
</select>
</span>
</label>
</div>
</div>
<div class="booking__trap" aria-hidden="true">
<label><?php esc_html_e( 'Сайт', 'smilia' ); ?><input type="text" name="website" tabindex="-1" autocomplete="off"></label>
</div>
<altcha-widget name="altcha" challenge="<?php echo esc_url( $smilia_form['captcha'] ); ?>" auto="onload" display="invisible"></altcha-widget>
<input type="hidden" name="smilia_nonce" value="<?php echo esc_attr( $smilia_form['nonce'] ); ?>">
<input type="hidden" name="started" value="<?php echo esc_attr( $smilia_form['started'] ); ?>">
<input type="hidden" name="page" value="">
<label class="consent">
<input class="consent__box" type="checkbox" name="consent" value="1" required>
<span class="consent__text">
<span class="consent__line">
<?php
printf(
wp_kses(
__( 'Нажимая «%1$s», я соглашаюсь на обработку <a href="%2$s" target="_blank">персональных данных</a> на условиях и для целей, определённых <a href="%3$s" target="_blank">Политикой конфиденциальности</a>.', 'smilia' ),
array(
'a' => array(
'href' => array(),
'target' => array(),
),
)
),
esc_html( Data::setting( 'booking_submit' ) ),
esc_url( $smilia_form['consent'] ),
esc_url( $smilia_form['privacy'] )
);
?>
</span>
</span>
</label>
<p class="booking__message" id="booking-message" role="alert" aria-live="assertive" data-booking-message></p>
<button type="submit" class="button button--primary button--lg booking__submit"><?php echo esc_html( Data::setting( 'booking_submit' ) ); ?></button>
</form>
<div class="booking__done" hidden data-booking-done>
<h2 class="booking__title"><?php echo esc_html( Data::setting( 'booking_done' ) ); ?></h2>
<p class="booking__lead" data-booking-done-text></p>
<p class="booking__demo"><?php esc_html_e( 'Демонстрационный сайт: заявка не будет обработана.', 'smilia' ); ?></p>
<button type="button" class="button button--primary" data-booking-close><?php esc_html_e( 'Хорошо', 'smilia' ); ?></button>
</div>
</dialog>
@@ -0,0 +1,57 @@
.cookie-bar {
position: fixed;
inset: auto var(--space-4) var(--space-4);
z-index: 70;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: var(--space-4) var(--space-8);
max-width: 62rem;
margin-inline: auto;
padding: var(--space-5) var(--space-6);
background: var(--color-surface);
border: 1.5px solid var(--color-line);
border-radius: var(--radius-2xl);
box-shadow: var(--shadow-lg);
color: var(--color-text);
font-size: var(--fs-small);
line-height: var(--leading-normal);
}
.cookie-bar[hidden] {
display: none;
}
.cookie-bar__text {
flex: 1 1 24rem;
text-wrap: pretty;
}
.cookie-bar__text a {
color: var(--color-accent-strong);
text-decoration: underline;
text-underline-offset: 0.2em;
}
.cookie-bar__actions {
display: flex;
flex-wrap: wrap;
gap: var(--space-3);
}
@media (max-width: 560px) {
.cookie-bar {
inset: auto var(--space-3) var(--space-3);
padding: var(--space-4);
}
.cookie-bar__actions {
flex-wrap: nowrap;
width: 100%;
}
.cookie-bar__actions .button {
flex: 1;
}
}
@@ -0,0 +1,58 @@
( () => {
const banner = document.querySelector( '[data-consent]' );
if ( ! banner ) {
return;
}
const key = 'smilia-consent';
const previous = 'smilia-map-consent';
const read = () => {
try {
window.localStorage.removeItem( previous );
return window.localStorage.getItem( key ) || '';
} catch ( error ) {
return '';
}
};
const write = ( value ) => {
try {
window.localStorage.removeItem( previous );
if ( value ) {
window.localStorage.setItem( key, value );
} else {
window.localStorage.removeItem( key );
}
} catch ( error ) {
return;
}
};
const set = ( state, fromBanner ) => {
write( state );
banner.hidden = '' !== state;
if ( '' === state ) {
banner.setAttribute( 'tabindex', '-1' );
banner.focus( { preventScroll: true } );
} else if ( fromBanner ) {
document.querySelector( '[data-consent-open]' )?.focus( { preventScroll: true } );
}
document.dispatchEvent(
new CustomEvent( 'smilia:consent', { detail: { state } } )
);
};
banner.hidden = '' !== read();
banner
.querySelector( '[data-consent-accept]' )
.addEventListener( 'click', () => set( 'granted', true ) );
banner
.querySelector( '[data-consent-decline]' )
.addEventListener( 'click', () => set( 'denied', true ) );
document.addEventListener( 'smilia:consent-open', () => set( '' ) );
document.addEventListener( 'smilia:consent-request', () =>
set( 'granted' )
);
} )();
@@ -0,0 +1,27 @@
<?php
use Smilia\Core\Markup;
defined( 'ABSPATH' ) || exit;
?>
<div class="cookie-bar" data-consent role="region" aria-label="<?php esc_attr_e( 'Согласие на сторонние сервисы', 'smilia' ); ?>" hidden>
<p class="cookie-bar__text">
<?php esc_html_e( 'Сайт использует cookie и сторонние сервисы.', 'smilia' ); ?>
<?php
echo wp_kses(
sprintf( __( 'Подробнее в <a href="%s" target="_blank">политике конфиденциальности</a>.', 'smilia' ), esc_url( Markup::url( '/privacy-policy/' ) ) ),
array(
'a' => array(
'href' => true,
'target' => true,
),
)
);
?>
</p>
<div class="cookie-bar__actions">
<button type="button" class="button button--primary" data-consent-accept><?php esc_html_e( 'Принять', 'smilia' ); ?></button>
<button type="button" class="button button--outline" data-consent-decline><?php esc_html_e( 'Отклонить', 'smilia' ); ?></button>
</div>
</div>
@@ -0,0 +1,26 @@
.demo-bar {
--demo-bar-bg: var(--color-text-strong);
--demo-bar-text: color-mix(in srgb, var(--color-white) 82%, transparent);
--demo-bar-link: var(--color-highlight);
padding: var(--space-2) var(--gutter);
background: var(--demo-bar-bg);
text-align: center;
}
.demo-bar__text {
color: var(--demo-bar-text);
font-size: var(--fs-small);
line-height: var(--leading-normal);
}
.demo-bar__link {
color: var(--demo-bar-link);
text-decoration: underline;
text-underline-offset: 0.2em;
}
@media (hover: hover) {
.demo-bar__link:hover {
color: var(--color-white);
}
}
@@ -0,0 +1,28 @@
<?php
use Smilia\Core\Markup;
defined( 'ABSPATH' ) || exit;
?>
<div class="demo-bar">
<p class="demo-bar__text">
<?php
printf(
wp_kses(
__( 'Сайт представлен <a class="demo-bar__link" href="%1$s">jimagie</a> в демонстрационных целях: заявки не обрабатываются. <a class="demo-bar__link" href="%4$s">Список страниц</a>. По вопросам: <a class="demo-bar__link" href="%3$s">%2$s</a>', 'smilia' ),
array(
'a' => array(
'class' => array(),
'href' => array(),
),
)
),
esc_url( __( 'https://jimagie.com/ru/', 'smilia' ) ),
esc_html( 'siema@jimagie.com' ),
esc_url( 'mailto:siema@jimagie.com' ),
esc_url( Markup::url( '/smilia/' ) )
);
?>
</p>
</div>
@@ -0,0 +1,94 @@
.not-found {
--not-found-bg: var(--color-night);
--not-found-code-size: clamp(5rem, 12vw, 8rem);
--not-found-image-size: clamp(10rem, 18vw, 14rem);
--wave-height: var(--space-32);
--wave-back: var(--color-highlight);
--wave-middle: var(--color-accent-light);
--wave-front: var(--color-accent-strong);
position: relative;
display: flex;
align-items: center;
justify-content: center;
min-height: min(calc(100svh - 7rem), 46rem);
padding: var(--space-16) var(--gutter) calc(var(--wave-height) + var(--space-8));
overflow: hidden;
background: var(--not-found-bg);
text-align: center;
}
.not-found__image {
width: var(--not-found-image-size);
height: auto;
margin-bottom: var(--space-2);
}
.not-found__content {
position: relative;
z-index: 2;
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-4);
max-width: 40rem;
}
.not-found__code {
color: var(--color-highlight);
font-size: var(--not-found-code-size);
font-weight: var(--font-weight-extrabold);
line-height: 1;
letter-spacing: -0.02em;
}
.not-found__title {
color: var(--color-highlight);
font-size: var(--fs-h2);
font-weight: var(--font-weight-extrabold);
line-height: var(--leading-tight);
}
.not-found__text {
color: var(--color-highlight-cool);
font-size: var(--fs-lead);
line-height: var(--leading-relaxed);
}
.not-found__actions {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: var(--space-4);
margin-top: var(--space-6);
}
.not-found__book {
background: transparent;
border-color: var(--color-white);
color: var(--color-white);
}
@media (hover: hover) {
.not-found__book:hover {
background: color-mix(in srgb, var(--color-white) 12%, transparent);
color: var(--color-white);
}
}
@media (max-width: 760px) {
.not-found {
--wave-height: var(--space-16);
}
}
@media (max-width: 560px) {
.not-found__actions {
flex-direction: column;
align-items: center;
}
.not-found__action {
width: 100%;
max-width: 16rem;
}
}
@@ -0,0 +1,21 @@
<?php
use Smilia\Core\Markup;
use Smilia\Theme\Data;
defined( 'ABSPATH' ) || exit;
?>
<section class="not-found">
<div class="not-found__content">
<?php Data::illustration( 'visit/kid-4.svg', 'not-found__image', 'eager' ); ?>
<p class="not-found__code">404</p>
<h1 class="not-found__title"><?php esc_html_e( 'Такой страницы нет', 'smilia' ); ?></h1>
<p class="not-found__text"><?php esc_html_e( 'Возможно, адрес изменился или в нём опечатка.', 'smilia' ); ?></p>
<div class="not-found__actions">
<a class="button button--primary button--lg not-found__action" href="<?php echo esc_url( Data::home_url() ); ?>"><?php esc_html_e( 'На главную', 'smilia' ); ?></a>
<button type="button" class="button button--outline button--lg not-found__action not-found__book" data-booking-open><?php esc_html_e( 'Записаться', 'smilia' ); ?></button>
</div>
</div>
<?php Markup::wave(); ?>
</section>
@@ -0,0 +1,154 @@
.site-footer {
padding-block: var(--space-8);
background: var(--color-accent-strong);
color: var(--color-on-dark-muted);
}
.site-footer__inner {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: var(--space-4) var(--space-8);
}
.logo--inverse {
color: var(--color-white);
}
.logo--inverse .logo__mark {
width: 2.125rem;
filter: brightness(0) invert(1);
}
.logo--inverse .logo__text {
font-size: var(--text-2xl);
}
.footer-nav__list {
display: flex;
flex-wrap: wrap;
gap: var(--space-6);
}
.footer-nav__link {
color: var(--color-on-dark-muted);
font-weight: var(--font-weight-bold);
transition: color var(--duration-fast) ease;
}
.site-footer__bottom {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: var(--space-2) var(--space-8);
margin-top: var(--space-4);
padding-top: var(--space-4);
border-top: 1px solid color-mix(in srgb, var(--color-white) 18%, transparent);
}
.site-footer__copyright {
color: var(--color-on-dark-muted);
font-size: var(--fs-small);
}
.site-footer__legal {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--space-2) var(--space-6);
font-size: var(--fs-small);
}
.footer-legal__list {
display: flex;
flex-wrap: wrap;
gap: var(--space-2) var(--space-6);
}
.footer-legal__link {
position: relative;
color: var(--color-on-dark-muted);
font-weight: var(--font-weight-bold);
text-decoration: underline;
text-underline-offset: 0.2em;
transition: color var(--duration-fast) ease;
}
.site-footer__consent-button {
position: relative;
padding: 0;
background: none;
border: 0;
font: inherit;
cursor: pointer;
color: var(--color-on-dark-muted);
font-weight: var(--font-weight-bold);
text-decoration: underline;
text-underline-offset: 0.2em;
transition: color var(--duration-fast) ease;
}
@media (pointer: coarse) {
.site-footer__consent-button::before {
content: "";
position: absolute;
inset: calc(var(--space-3) * -1) calc(var(--space-2) * -1);
}
}
@media (pointer: coarse) {
.footer-nav__link,
.footer-legal__link {
display: inline-block;
padding: var(--space-3) var(--space-2);
}
.footer-legal__list {
gap: 0 var(--space-4);
}
}
@media (hover: hover) {
.footer-nav__link:hover,
.footer-legal__link:hover,
.site-footer__consent-button:hover,
.logo--inverse:hover {
color: var(--color-white);
}
}
@media (max-width: 560px) {
.site-footer__inner {
flex-direction: column;
align-items: center;
}
.footer-nav__list {
justify-content: center;
gap: var(--space-3) var(--space-5);
}
.site-footer__bottom {
flex-direction: column;
justify-content: center;
}
.site-footer__copyright {
text-align: center;
}
.site-footer__legal {
justify-content: center;
text-align: center;
}
.footer-legal__list {
justify-content: center;
}
}
.site-footer :focus-visible {
outline-color: var(--color-white);
}
@@ -0,0 +1,7 @@
( () => {
document.querySelectorAll( '[data-consent-open]' ).forEach( ( button ) => {
button.addEventListener( 'click', () => {
document.dispatchEvent( new CustomEvent( 'smilia:consent-open' ) );
} );
} );
} )();
@@ -0,0 +1,62 @@
<?php
use Smilia\Theme\Media;
use Smilia\Theme\Nav_Walker;
defined( 'ABSPATH' ) || exit;
?>
<footer class="site-footer">
<div class="container site-footer__inner">
<a class="logo logo--inverse" href="<?php echo esc_url( home_url( '/' ) ); ?>" aria-label="<?php esc_attr_e( 'Smilia, на главную', 'smilia' ); ?>">
<?php Media::svg( 'smilia-mark.svg', 'logo__mark' ); ?>
<span class="logo__text">Smilia</span>
</a>
<nav class="footer-nav" aria-label="<?php esc_attr_e( 'Меню в подвале', 'smilia' ); ?>">
<?php
wp_nav_menu(
array(
'theme_location' => 'footer',
'container' => false,
'items_wrap' => '<ul class="footer-nav__list">%3$s</ul>',
'walker' => new Nav_Walker( 'footer-nav' ),
'depth' => 1,
'fallback_cb' => false,
)
);
?>
</nav>
</div>
<div class="container">
<div class="site-footer__bottom">
<p class="site-footer__copyright">
<?php
echo esc_html(
sprintf(
__( '© %s Smilia, детская стоматология в Лодзи.', 'smilia' ),
wp_date( 'Y' )
)
);
?>
</p>
<div class="site-footer__legal">
<nav class="footer-legal" aria-label="<?php esc_attr_e( 'Документы', 'smilia' ); ?>">
<?php
wp_nav_menu(
array(
'theme_location' => 'footer_legal',
'container' => false,
'items_wrap' => '<ul class="footer-legal__list">%3$s</ul>',
'walker' => new Nav_Walker( 'footer-legal' ),
'depth' => 1,
'fallback_cb' => false,
)
);
?>
</nav>
<p class="site-footer__consent">
<button type="button" class="site-footer__consent-button" data-consent-open><?php esc_html_e( 'Настройки согласия', 'smilia' ); ?></button>
</p>
</div>
</div>
</div>
</footer>
@@ -0,0 +1,518 @@
.site-header {
--site-header-height: 4.5rem;
--site-header-book-width: 10.75rem;
--site-header-call-width: 9.75rem;
position: sticky;
top: 0;
z-index: 50;
background: var(--color-surface);
box-shadow: var(--shadow-sm);
}
.admin-bar .site-header {
top: var(--wp-admin--admin-bar--height, 0px);
}
.site-header__inner {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-6);
min-height: var(--site-header-height);
padding-block: var(--space-3);
}
.site-header__actions {
display: flex;
align-items: center;
gap: var(--space-4);
}
.site-header__book {
min-width: var(--site-header-book-width);
}
.call-menu__toggle {
min-width: var(--site-header-call-width);
}
.site-header__burger {
display: none;
flex-direction: column;
justify-content: center;
gap: 0.375rem;
width: 2.75rem;
height: 2.75rem;
padding: 0 var(--space-2);
background: none;
border: 0;
border-radius: var(--radius-full);
cursor: pointer;
transition: transform 0.08s ease;
}
.site-header__burger-line {
display: block;
height: 2px;
background: var(--color-accent-strong);
border-radius: var(--radius-full);
transition: transform var(--duration-fast) ease, opacity var(--duration-fast) ease;
}
.site-header--open .site-header__burger-line:nth-child(1) {
transform: translateY(0.5rem) rotate(45deg);
}
.site-header--open .site-header__burger-line:nth-child(2) {
opacity: 0;
}
.site-header--open .site-header__burger-line:nth-child(3) {
transform: translateY(-0.5rem) rotate(-45deg);
}
.logo {
position: relative;
display: inline-flex;
align-items: center;
gap: var(--space-2);
color: var(--color-accent);
}
@media (pointer: coarse) {
.logo::before {
content: "";
position: absolute;
inset: calc(var(--space-2) * -1) 0;
}
}
.logo__mark {
width: 2.875rem;
height: auto;
}
.logo__text {
font-family: var(--font-logo);
font-size: var(--text-3xl);
font-weight: var(--font-weight-bold);
letter-spacing: 0.02em;
line-height: 1;
}
.site-nav__list {
display: flex;
align-items: center;
gap: var(--space-6);
}
.site-nav__item {
position: relative;
}
.site-nav__link {
display: inline-flex;
align-items: center;
gap: var(--space-2);
padding-block: var(--space-2);
font-size: var(--fs-body);
font-weight: var(--font-weight-semibold);
white-space: nowrap;
transition: color var(--duration-fast) ease;
}
.site-nav__link--current {
color: var(--color-accent-strong);
}
.site-nav__item--has-children > .site-nav__link::after {
content: "";
width: 0.45em;
height: 0.45em;
margin-top: -0.2em;
border-right: 2px solid currentColor;
border-bottom: 2px solid currentColor;
opacity: 0.55;
transform: rotate(45deg);
transition: transform var(--duration-fast) ease, opacity var(--duration-fast) ease;
}
.site-nav__item--has-children:focus-within > .site-nav__link::after {
opacity: 1;
transform: translateY(0.2em) rotate(225deg);
}
.site-nav__dropdown {
position: absolute;
top: 100%;
left: 50%;
z-index: 60;
display: flex;
flex-direction: column;
gap: 2px;
width: 18rem;
padding: var(--space-4) var(--space-3) var(--space-3);
margin-top: var(--space-4);
background: var(--color-surface);
border-top: 4px solid var(--color-accent);
border-radius: var(--radius-2xl);
box-shadow: var(--shadow-lg);
opacity: 0;
visibility: hidden;
transform: translate(-50%, var(--space-2));
transition: opacity var(--duration-fast) ease, transform var(--duration-fast) ease, visibility var(--duration-fast);
transition-delay: 0.15s;
}
.site-nav__dropdown::before {
content: "";
position: absolute;
inset: calc(var(--space-4) * -1 - 4px) 0 auto;
height: var(--space-4);
}
.site-nav__item--has-children:focus-within > .site-nav__dropdown {
opacity: 1;
visibility: visible;
transform: translate(-50%, 0);
transition-delay: 0s;
}
.site-nav__sublink {
display: block;
padding: var(--space-3) var(--space-4);
border-radius: var(--radius-lg);
color: var(--color-text-strong);
font-size: var(--fs-body);
font-weight: var(--font-weight-semibold);
transition: background-color var(--duration-fast) ease, color var(--duration-fast) ease;
}
.site-nav {
display: flex;
align-items: center;
gap: var(--space-6);
}
.lang-menu {
position: relative;
}
.lang-menu__toggle {
display: inline-flex;
align-items: center;
gap: var(--space-2);
min-height: 2.75rem;
padding: 0 var(--space-2);
background: none;
border: 0;
border-radius: var(--radius-full);
color: var(--color-text-strong);
font-family: inherit;
font-size: var(--fs-body);
font-weight: var(--font-weight-bold);
cursor: pointer;
transition: color var(--duration-fast) ease, transform 0.08s ease;
}
.lang-menu__toggle::after {
content: "";
width: 0.45em;
height: 0.45em;
margin-top: -0.2em;
border-right: 2px solid currentColor;
border-bottom: 2px solid currentColor;
opacity: 0.55;
transform: rotate(45deg);
transition: transform var(--duration-fast) ease, opacity var(--duration-fast) ease;
}
.lang-menu__toggle[aria-expanded="true"]::after {
opacity: 1;
transform: translateY(0.2em) rotate(225deg);
}
.lang-menu__panel {
position: absolute;
top: calc(100% + var(--space-3));
right: 0;
z-index: 20;
display: flex;
flex-direction: column;
gap: 2px;
min-width: 11rem;
padding: var(--space-3);
background: var(--color-surface);
border-radius: var(--radius-2xl);
box-shadow: var(--shadow-lg);
}
.lang-menu__panel[hidden] {
display: none;
}
.lang-menu__item {
display: block;
padding: var(--space-2) var(--space-4);
border-radius: var(--radius-lg);
color: var(--color-text-strong);
font-weight: var(--font-weight-semibold);
transition: background-color var(--duration-fast) ease, color var(--duration-fast) ease;
}
.lang-menu__item--current {
background: var(--color-accent-soft);
color: var(--color-accent-strong);
}
.site-nav__phones,
.site-nav__book {
display: none;
}
.call-menu {
position: relative;
}
.call-menu__panel {
position: absolute;
top: calc(100% + var(--space-3));
right: 0;
z-index: 20;
display: flex;
flex-direction: column;
gap: var(--space-4);
min-width: 18rem;
padding: var(--space-6);
background: var(--color-surface);
border-radius: var(--radius-2xl);
box-shadow: var(--shadow-lg);
}
.call-menu__panel[hidden] {
display: none;
}
.call-menu__panel::before {
content: "";
position: absolute;
top: -0.5rem;
right: 2.75rem;
width: 1rem;
height: 1rem;
background: var(--color-surface);
transform: rotate(45deg);
}
.call-menu__item {
display: flex;
flex-direction: column;
gap: 2px;
}
.call-menu__label {
color: var(--color-text-faint);
font-size: var(--fs-small);
font-weight: var(--font-weight-semibold);
}
.call-menu__number {
color: var(--color-accent-strong);
font-size: var(--text-lg);
font-weight: var(--font-weight-bold);
}
.site-header__burger:active,
.lang-menu__toggle:active {
transform: scale(0.94);
}
.site-nav__item--has-children.site-nav__item.site-nav__item--dismissed > .site-nav__dropdown {
opacity: 0;
visibility: hidden;
}
.site-nav__item--has-children.site-nav__item.site-nav__item--dismissed > .site-nav__link::after {
opacity: 0.55;
transform: rotate(45deg);
}
@media (hover: hover) {
.site-nav__item--has-children:hover > .site-nav__link::after {
opacity: 1;
transform: translateY(0.2em) rotate(225deg);
}
.site-nav__item--has-children:hover > .site-nav__dropdown {
opacity: 1;
visibility: visible;
transform: translate(-50%, 0);
transition-delay: 0s;
}
.site-nav__sublink:hover {
background: var(--color-accent-soft);
color: var(--color-accent-strong);
}
.call-menu__item:hover .call-menu__number {
color: var(--color-accent);
}
.site-header__burger:hover .site-header__burger-line {
background: var(--color-accent);
}
.lang-menu__toggle:hover {
color: var(--color-accent-strong);
}
.lang-menu__item:hover {
background: var(--color-accent-soft);
color: var(--color-accent-strong);
}
}
@media (max-width: 1310px), (hover: none) {
.site-header__burger {
display: flex;
}
.site-nav {
position: absolute;
top: 100%;
right: 0;
left: 0;
display: none;
max-height: calc(100dvh - var(--site-nav-top, var(--site-header-height)));
padding: var(--space-4) var(--gutter) var(--space-8);
overflow-y: auto;
background: var(--color-surface);
border-top: 1px solid var(--color-line-soft);
box-shadow: var(--shadow-lg);
}
.site-header--open .site-nav {
display: block;
}
.site-nav__list {
flex-direction: column;
align-items: stretch;
gap: 0;
}
.site-nav__link {
display: flex;
padding-block: var(--space-3);
font-size: var(--text-lg);
}
.site-nav__item--has-children > .site-nav__link::after {
display: none;
}
.site-nav__dropdown {
position: static;
width: auto;
padding: 0 0 var(--space-2) var(--space-4);
margin-top: 0;
background: none;
border-top: 0;
border-radius: 0;
box-shadow: none;
opacity: 1;
visibility: visible;
transform: none;
}
.site-nav__dropdown::before {
display: none;
}
.site-nav__item--has-children:hover > .site-nav__dropdown,
.site-nav__item--has-children:focus-within > .site-nav__dropdown {
transform: none;
}
.site-nav__sublink {
margin-left: calc(var(--space-3) * -1);
padding: var(--space-2) var(--space-3);
color: var(--color-text-muted);
}
}
@media (max-width: 760px) {
.call-menu {
display: none;
}
.site-nav__phones {
display: flex;
flex-direction: column;
gap: var(--space-4);
margin-top: var(--space-4);
padding-top: var(--space-6);
border-top: 1px solid var(--color-line-soft);
}
.logo__mark {
width: 2.25rem;
}
.logo__text {
font-size: var(--text-2xl);
}
}
@media (max-width: 560px) {
.site-header__inner {
gap: var(--space-3);
}
.site-header__book {
display: none;
}
.site-nav__book {
display: flex;
width: 100%;
margin-bottom: var(--space-4);
}
}
@media (max-width: 400px) {
.site-header__inner {
gap: var(--space-2);
}
.logo {
gap: var(--space-1);
}
.logo__text {
font-size: var(--text-xl);
}
}
@media (max-width: 600px) {
.admin-bar .site-header {
top: 0;
}
}
@media (pointer: coarse) {
.lang-menu__item {
padding-block: var(--space-3);
}
.site-nav__sublink {
padding-block: var(--space-3);
}
}
@@ -0,0 +1,120 @@
(() => {
const setupDropdown = (root, toggle, panel) => {
const setOpen = (open) => {
panel.hidden = !open;
toggle.setAttribute('aria-expanded', String(open));
};
toggle.addEventListener('click', () => setOpen(panel.hidden));
document.addEventListener('click', (event) => {
if (!panel.hidden && !root.contains(event.target)) {
setOpen(false);
}
});
document.addEventListener('keydown', (event) => {
if (event.key === 'Escape' && !panel.hidden) {
setOpen(false);
toggle.focus();
}
});
};
document.querySelectorAll('[data-dropdown]').forEach((root) => {
const toggle = root.querySelector('[data-dropdown-toggle]');
const panel = root.querySelector('[data-dropdown-panel]');
if (toggle && panel) {
setupDropdown(root, toggle, panel);
}
});
})();
(() => {
const header = document.querySelector('[data-site-header]');
const burger = header?.querySelector('.site-header__burger');
const nav = header?.querySelector('.site-nav');
if (!burger || !nav) {
return;
}
const desktop = window.matchMedia('(min-width: 1311px) and (hover: hover)');
const syncTop = () => {
header.style.setProperty('--site-nav-top', `${Math.max(0, header.getBoundingClientRect().bottom)}px`);
};
const setOpen = (open) => {
header.classList.toggle('site-header--open', open);
burger.setAttribute('aria-expanded', String(open));
if (open) {
syncTop();
nav.querySelector('a, button')?.focus({ preventScroll: true });
}
};
burger.addEventListener('click', () => {
setOpen(!header.classList.contains('site-header--open'));
});
nav.addEventListener('click', (event) => {
if (event.target.closest('a')) {
setOpen(false);
}
});
['scroll', 'resize'].forEach((name) => {
window.addEventListener(
name,
() => {
if (header.classList.contains('site-header--open')) {
syncTop();
}
},
{ passive: true }
);
});
document.addEventListener('click', (event) => {
if (header.classList.contains('site-header--open') && !header.contains(event.target)) {
setOpen(false);
}
});
document.addEventListener('keydown', (event) => {
if (event.key === 'Escape' && header.classList.contains('site-header--open')) {
setOpen(false);
burger.focus();
}
});
desktop.addEventListener('change', (event) => {
if (event.matches) {
setOpen(false);
}
});
})();
(() => {
const items = document.querySelectorAll('.site-nav__item--has-children');
items.forEach((item) => {
const reset = () => item.classList.remove('site-nav__item--dismissed');
item.addEventListener('mouseleave', reset);
item.addEventListener('focusout', (event) => {
if (!item.contains(event.relatedTarget)) {
reset();
}
});
});
document.addEventListener('keydown', (event) => {
if (event.key !== 'Escape') {
return;
}
const item = document.activeElement?.closest('.site-nav__item--has-children');
if (item) {
item.classList.add('site-nav__item--dismissed');
item.querySelector('.site-nav__link')?.focus();
}
});
})();
@@ -0,0 +1,90 @@
<?php
use Smilia\Theme\Data;
use Smilia\Theme\Media;
use Smilia\Theme\Nav_Walker;
defined( 'ABSPATH' ) || exit;
$smilia_languages = Data::languages();
$smilia_phones = array_filter(
array(
__( 'Новый пациент', 'smilia' ) => Data::setting( 'phone_new' ),
__( 'Действующий пациент', 'smilia' ) => Data::setting( 'phone_current' ),
)
);
?>
<header class="site-header" data-site-header>
<div class="site-header__inner container container--wide">
<a class="logo" href="<?php echo esc_url( home_url( '/' ) ); ?>" aria-label="<?php esc_attr_e( 'Smilia, на главную', 'smilia' ); ?>">
<?php Media::svg( 'smilia-mark.svg', 'logo__mark', '', 'eager' ); ?>
<span class="logo__text">Smilia</span>
</a>
<nav class="site-nav" id="site-nav" aria-label="<?php esc_attr_e( 'Главное меню', 'smilia' ); ?>">
<button type="button" class="button button--primary site-nav__book" data-booking-open><?php esc_html_e( 'Записаться', 'smilia' ); ?></button>
<?php
wp_nav_menu(
array(
'theme_location' => 'primary',
'container' => false,
'items_wrap' => '<ul class="site-nav__list">%3$s</ul>',
'walker' => new Nav_Walker( 'site-nav' ),
'depth' => 2,
'fallback_cb' => false,
)
);
?>
<?php if ( $smilia_phones ) : ?>
<ul class="site-nav__phones">
<?php foreach ( $smilia_phones as $smilia_label => $smilia_phone ) : ?>
<li>
<a class="call-menu__item" href="<?php echo esc_url( Data::tel( $smilia_phone ) ); ?>">
<span class="call-menu__label"><?php echo esc_html( $smilia_label ); ?></span>
<span class="call-menu__number"><?php echo esc_html( $smilia_phone ); ?></span>
</a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</nav>
<div class="site-header__actions">
<?php if ( $smilia_languages ) : ?>
<div class="lang-menu" data-dropdown>
<?php foreach ( $smilia_languages as $smilia_language ) : ?>
<?php if ( $smilia_language['current_lang'] ) : ?>
<button type="button" class="lang-menu__toggle" aria-expanded="false" aria-controls="lang-menu-panel" aria-label="<?php echo esc_attr( sprintf( __( 'Язык сайта: %s', 'smilia' ), strtoupper( $smilia_language['slug'] ) ) ); ?>" data-dropdown-toggle><?php echo esc_html( strtoupper( $smilia_language['slug'] ) ); ?></button>
<?php endif; ?>
<?php endforeach; ?>
<ul class="lang-menu__panel" id="lang-menu-panel" hidden data-dropdown-panel>
<?php foreach ( $smilia_languages as $smilia_language ) : ?>
<li>
<a class="lang-menu__item<?php echo $smilia_language['current_lang'] ? ' lang-menu__item--current' : ''; ?>" href="<?php echo esc_url( $smilia_language['url'] ); ?>" hreflang="<?php echo esc_attr( $smilia_language['slug'] ); ?>" lang="<?php echo esc_attr( $smilia_language['slug'] ); ?>"<?php echo $smilia_language['current_lang'] ? ' aria-current="true"' : ''; ?>><?php echo esc_html( $smilia_language['name'] ); ?></a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<button type="button" class="button button--primary site-header__book" data-booking-open><?php esc_html_e( 'Записаться', 'smilia' ); ?></button>
<?php if ( $smilia_phones ) : ?>
<div class="call-menu" data-dropdown>
<button type="button" class="button button--outline call-menu__toggle" aria-expanded="false" aria-controls="call-menu-panel" data-dropdown-toggle><?php esc_html_e( 'Позвонить', 'smilia' ); ?></button>
<div class="call-menu__panel" id="call-menu-panel" hidden data-dropdown-panel>
<?php foreach ( $smilia_phones as $smilia_label => $smilia_phone ) : ?>
<a class="call-menu__item" href="<?php echo esc_url( Data::tel( $smilia_phone ) ); ?>">
<span class="call-menu__label"><?php echo esc_html( $smilia_label ); ?></span>
<span class="call-menu__number"><?php echo esc_html( $smilia_phone ); ?></span>
</a>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
<button type="button" class="site-header__burger" aria-expanded="false" aria-controls="site-nav" aria-label="<?php esc_attr_e( 'Меню', 'smilia' ); ?>">
<span class="site-header__burger-line"></span>
<span class="site-header__burger-line"></span>
<span class="site-header__burger-line"></span>
</button>
</div>
</div>
</header>
+15
View File
@@ -0,0 +1,15 @@
<?php
use Smilia\Theme\Components;
defined( 'ABSPATH' ) || exit;
?>
</main>
<?php
Components::render( 'site-footer' );
Components::render( 'booking' );
Components::render( 'consent' );
wp_footer();
?>
</body>
</html>
+16
View File
@@ -0,0 +1,16 @@
<?php
use Smilia\Theme\Components;
defined( 'ABSPATH' ) || exit;
Components::use( array( 'demo-bar', 'site-header', 'site-footer', 'booking' ) );
get_header();
while ( have_posts() ) {
the_post();
the_content();
}
get_footer();
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace Smilia\Theme;
defined( 'ABSPATH' ) || exit;
spl_autoload_register(
static function ( string $class_name ): void {
$prefix = __NAMESPACE__ . '\\';
if ( 0 !== strpos( $class_name, $prefix ) ) {
return;
}
$relative = substr( $class_name, strlen( $prefix ) );
$file = __DIR__ . '/inc/class-' . strtolower( str_replace( '_', '-', $relative ) ) . '.php';
if ( is_readable( $file ) ) {
require $file;
}
}
);
Theme::instance()->register();
+18
View File
@@ -0,0 +1,18 @@
<?php
use Smilia\Theme\Components;
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(); ?>
<a class="skip-link screen-reader-text" href="#main"><?php esc_html_e( 'Перейти к содержимому', 'smilia' ); ?></a>
<?php Components::render( 'demo-bar' ); ?>
<?php Components::render( 'site-header' ); ?>
<main id="main" class="site-main">
@@ -0,0 +1,71 @@
<?php
namespace Smilia\Theme;
defined( 'ABSPATH' ) || exit;
final class Assets {
public function register(): void {
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue' ), 5 );
add_action( 'wp_enqueue_scripts', array( $this, 'dequeue_core' ), 100 );
add_filter( 'should_load_separate_core_block_assets', '__return_true' );
remove_action( 'wp_enqueue_scripts', 'wp_enqueue_global_styles' );
remove_action( 'wp_footer', 'wp_enqueue_global_styles', 1 );
add_action( 'wp_head', array( $this, 'preload_fonts' ), 1 );
}
public static function uri( string $path ): string {
return get_theme_file_uri( $path );
}
public static function version( string $path ): string {
$file = get_theme_file_path( $path );
return is_readable( $file ) ? (string) filemtime( $file ) : wp_get_theme()->get( 'Version' );
}
public function enqueue(): void {
wp_enqueue_style( 'smilia-tokens', self::uri( 'assets/css/tokens.css' ), array(), self::version( 'assets/css/tokens.css' ) );
wp_enqueue_style( 'smilia-base', self::uri( 'assets/css/base.css' ), array( 'smilia-tokens' ), self::version( 'assets/css/base.css' ) );
wp_register_script(
'smilia-phone-field',
self::uri( 'assets/js/phone-field.js' ),
array(),
self::version( 'assets/js/phone-field.js' ),
array(
'in_footer' => true,
'strategy' => 'defer',
)
);
wp_enqueue_script(
'smilia-reveal',
self::uri( 'assets/js/reveal.js' ),
array(),
self::version( 'assets/js/reveal.js' ),
array(
'in_footer' => true,
'strategy' => 'defer',
)
);
Components::enqueue_used();
}
public function dequeue_core(): void {
wp_dequeue_style( 'wp-block-library' );
wp_dequeue_style( 'classic-theme-styles' );
}
public function preload_fonts(): void {
$subsets = array(
'ru' => array( 'cyrillic', 'latin' ),
'pl' => array( 'latin', 'latin-ext' ),
);
$fonts = array( 'assets/fonts/comfortaa-latin.woff2' );
foreach ( $subsets[ substr( determine_locale(), 0, 2 ) ] ?? array( 'latin' ) as $subset ) {
$fonts[] = "assets/fonts/nunito-{$subset}.woff2";
}
foreach ( $fonts as $font ) {
printf( '<link rel="preload" href="%s" as="font" type="font/woff2" crossorigin>' . "\n", esc_url( self::uri( $font ) ) );
}
}
}
@@ -0,0 +1,55 @@
<?php
namespace Smilia\Theme;
defined( 'ABSPATH' ) || exit;
final class Components {
private const SCRIPT_DEPS = array(
'booking' => array( 'smilia-phone-field' ),
);
private static array $used = array();
public static function use( array $names ): void {
foreach ( $names as $name ) {
self::$used[ sanitize_key( $name ) ] = true;
}
}
public static function enqueue_used(): void {
foreach ( array_keys( self::$used ) as $name ) {
self::enqueue( $name );
}
}
private static function enqueue( string $name ): void {
$css = "components/{$name}/{$name}.css";
$js = "components/{$name}/{$name}.js";
if ( is_readable( get_theme_file_path( $css ) ) ) {
wp_enqueue_style( "smilia-{$name}", Assets::uri( $css ), array( 'smilia-base' ), Assets::version( $css ) );
}
if ( is_readable( get_theme_file_path( $js ) ) ) {
wp_enqueue_script(
"smilia-{$name}",
Assets::uri( $js ),
self::SCRIPT_DEPS[ $name ] ?? array(),
Assets::version( $js ),
array(
'in_footer' => true,
'strategy' => 'defer',
)
);
}
}
public static function render( string $name, array $args = array() ): void {
$name = sanitize_key( $name );
if ( ! isset( self::$used[ $name ] ) ) {
self::$used[ $name ] = true;
self::enqueue( $name );
}
get_template_part( "components/{$name}/{$name}", null, $args );
}
}
@@ -0,0 +1,51 @@
<?php
namespace Smilia\Theme;
use Smilia\Core\Booking;
use Smilia\Core\Markup;
use Smilia\Core\Settings;
defined( 'ABSPATH' ) || exit;
final class Data {
private static function ready(): bool {
return class_exists( Settings::class );
}
public static function setting( string $key ): string {
return self::ready() ? Settings::get( $key ) : '';
}
public static function tel( string $phone ): string {
return self::ready() ? Settings::tel( $phone ) : '';
}
public static function languages(): array {
if ( ! function_exists( 'pll_the_languages' ) ) {
return array();
}
$languages = pll_the_languages(
array(
'raw' => 1,
'hide_if_empty' => 0,
)
);
return is_array( $languages ) && count( $languages ) > 1 ? array_values( $languages ) : array();
}
public static function illustration( string $path, string $class_name, string $loading = 'lazy' ): void {
if ( self::ready() ) {
Markup::asset_svg( $path, $class_name, '', $loading );
}
}
public static function home_url(): string {
return function_exists( 'pll_home_url' ) ? pll_home_url() : home_url( '/' );
}
public static function booking(): array {
return self::ready() ? Booking::form_data() : array();
}
}
@@ -0,0 +1,16 @@
<?php
namespace Smilia\Theme;
use Smilia\Core\Picture;
defined( 'ABSPATH' ) || exit;
final class Media {
public static function svg( string $file, string $class_name = '', string $alt = '', string $loading = 'lazy' ): void {
if ( class_exists( Picture::class ) ) {
Picture::svg( get_theme_file_path( 'assets/img/' . $file ), Assets::uri( 'assets/img/' . $file ), $class_name, $alt, $loading );
}
}
}
@@ -0,0 +1,58 @@
<?php
namespace Smilia\Theme;
use Walker_Nav_Menu;
defined( 'ABSPATH' ) || exit;
final class Nav_Walker extends Walker_Nav_Menu {
private string $block;
public function __construct( string $block = 'site-nav' ) {
$this->block = $block;
}
public function start_lvl( &$output, $depth = 0, $args = null ): void {
$output .= '<ul class="' . esc_attr( $this->block ) . '__dropdown">';
}
public function end_lvl( &$output, $depth = 0, $args = null ): void {
$output .= '</ul>';
}
public function start_el( &$output, $data_object, $depth = 0, $args = null, $current_object_id = 0 ): void {
$item = $data_object;
$classes = (array) $item->classes;
$children = in_array( 'menu-item-has-children', $classes, true );
$anchor = false !== strpos( (string) $data_object->url, '#' );
$exact = in_array( 'current-menu-item', $classes, true ) && ! $anchor;
$current = ( $exact || in_array( 'current-menu-ancestor', $classes, true ) ) && ! $anchor;
$element = 0 === $depth ? 'item' : 'subitem';
$link = 0 === $depth ? 'link' : 'sublink';
$li_class = $this->block . '__' . $element;
if ( $children ) {
$li_class .= ' ' . $this->block . '__' . $element . '--has-children';
}
$a_class = $this->block . '__' . $link;
if ( $current ) {
$a_class .= ' ' . $this->block . '__' . $link . '--current';
}
$output .= '<li class="' . esc_attr( $li_class ) . '">';
$output .= sprintf(
'<a class="%s" href="%s"%s>%s</a>',
esc_attr( $a_class ),
esc_url( $item->url ),
$exact ? ' aria-current="page"' : '',
esc_html( apply_filters( 'the_title', $item->title, $item->ID ) )
);
}
public function end_el( &$output, $data_object, $depth = 0, $args = null ): void {
$output .= '</li>';
}
}
@@ -0,0 +1,99 @@
<?php
namespace Smilia\Theme;
defined( 'ABSPATH' ) || exit;
final class Theme {
private static ?Theme $instance = null;
public static function instance(): Theme {
if ( null === self::$instance ) {
self::$instance = new self();
}
return self::$instance;
}
public function register(): void {
add_action( 'after_setup_theme', array( $this, 'setup' ) );
add_action( 'init', array( $this, 'clean_head' ) );
add_filter( 'image_editor_output_format', array( $this, 'webp_output' ) );
add_filter( 'wp_editor_set_quality', array( $this, 'image_quality' ), 10, 2 );
add_filter( 'big_image_size_threshold', array( $this, 'big_image_threshold' ) );
add_filter( 'max_srcset_image_width', array( $this, 'max_srcset_width' ) );
add_filter( 'wp_img_tag_add_auto_sizes', '__return_true' );
add_filter( 'site_icon_meta_tags', array( $this, 'mobile_icons' ) );
( new Assets() )->register();
}
public function setup(): void {
load_theme_textdomain( 'smilia', get_template_directory() . '/languages' );
add_theme_support( 'title-tag' );
add_theme_support( 'post-thumbnails' );
add_theme_support( 'responsive-embeds' );
add_theme_support( 'editor-styles' );
add_editor_style( array( 'assets/css/tokens.css', 'assets/css/base.css', 'assets/css/editor.css' ) );
add_theme_support( 'html5', array( 'search-form', 'gallery', 'caption', 'style', 'script', 'navigation-widgets' ) );
register_nav_menus(
array(
'primary' => __( 'Главное меню', 'smilia' ),
'footer' => __( 'Меню в подвале', 'smilia' ),
'footer_legal' => __( 'Документы в подвале', 'smilia' ),
)
);
add_image_size( 'smilia-480', 480, 0 );
add_image_size( 'smilia-800', 800, 0 );
add_image_size( 'smilia-1600', 1600, 0 );
add_image_size( 'smilia-1920', 1920, 0 );
add_image_size( 'smilia-2560', 2560, 0 );
}
public function mobile_icons( array $tags ): array {
$tags = array_values( array_filter( $tags, static fn( string $tag ): bool => false === strpos( $tag, 'apple-touch-icon' ) ) );
$tags[] = sprintf( '<link rel="apple-touch-icon" href="%s" />', esc_url( self::asset_url( 'assets/img/icons/apple-touch-icon.png' ) ) );
$tags[] = sprintf( '<link rel="manifest" href="%s" />', esc_url( self::asset_url( 'assets/site.webmanifest' ) ) );
return $tags;
}
private static function asset_url( string $path ): string {
$file = get_theme_file_path( $path );
return add_query_arg( 'ver', is_readable( $file ) ? (string) filemtime( $file ) : '1', get_theme_file_uri( $path ) );
}
public function clean_head(): void {
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );
remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
remove_action( 'wp_head', 'rsd_link' );
remove_action( 'wp_head', 'wp_generator' );
remove_action( 'wp_head', 'wp_shortlink_wp_head' );
remove_action( 'wp_head', 'rest_output_link_wp_head' );
remove_action( 'wp_head', 'wp_oembed_add_discovery_links' );
remove_action( 'wp_head', 'feed_links', 2 );
remove_action( 'wp_head', 'feed_links_extra', 3 );
remove_action( 'template_redirect', 'rest_output_link_header', 11 );
remove_action( 'template_redirect', 'wp_shortlink_header', 11 );
}
public function big_image_threshold(): int {
return 6000;
}
public function max_srcset_width(): int {
return 2560;
}
public function image_quality( int $quality, string $mime_type ): int {
return 'image/webp' === $mime_type ? 90 : $quality;
}
public function webp_output( array $formats ): array {
$formats['image/jpeg'] = 'image/webp';
return $formats;
}
}
+27
View File
@@ -0,0 +1,27 @@
<?php
use Smilia\Theme\Components;
defined( 'ABSPATH' ) || exit;
Components::use( array( 'demo-bar', 'site-header', 'site-footer', 'booking' ) );
get_header();
?>
<div class="section">
<div class="container">
<?php
while ( have_posts() ) :
the_post();
?>
<article <?php post_class(); ?>>
<h1 class="section__title"><?php the_title(); ?></h1>
<div class="entry-content"><?php the_content(); ?></div>
</article>
<?php
endwhile;
?>
</div>
</div>
<?php
get_footer();
Binary file not shown.
+194
View File
@@ -0,0 +1,194 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Smilia\n"
"Language: en_US\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Domain: smilia\n"
#: components/booking/booking.php:13
msgid "Проверьте имя."
msgstr "Please check the name."
#: components/booking/booking.php:14
msgid "Проверьте номер телефона."
msgstr "Please check the phone number."
#: components/booking/booking.php:15
msgid "Нужно ваше согласие на обработку персональных данных."
msgstr "Consent to the processing of personal data is required."
#: components/booking/booking.php:16
msgid "Не получилось отправить заявку. Проверьте интернет или позвоните нам."
msgstr ""
"The request could not be sent. Check the connection or give us a call."
#: components/booking/booking.php:17
msgid "Слишком много заявок подряд. Попробуйте через минуту."
msgstr "Too many requests in a row. Please try again in a minute."
#: components/booking/booking.php:21
msgid "Закрыть"
msgstr "Close"
#: components/booking/booking.php:28 components/booking/booking.php:110
msgid "Демонстрационный сайт: заявка не будет обработана."
msgstr "Demo site: the request will not be processed."
#: components/booking/booking.php:32
msgid "Ваше имя"
msgstr "Name"
#: components/booking/booking.php:33
msgid "Как к вам обращаться"
msgstr "How to address you"
#: components/booking/booking.php:36
msgid "Телефон"
msgstr "Phone"
#: components/booking/booking.php:41
msgid "Возраст"
msgstr "Age"
#: components/booking/booking.php:42
msgid "5 лет"
msgstr "5 years"
#: components/booking/booking.php:45
msgid "Что беспокоит"
msgstr "Reason for visit"
#: components/booking/booking.php:58
msgid "Сайт"
msgstr "Website"
#: components/booking/booking.php:71
#, php-format
msgid ""
"Нажимая «%1$s», я соглашаюсь на обработку <a href=\"%2$s\" "
"target=\"_blank\">персональных данных</a> на условиях и для целей, "
"определённых <a href=\"%3$s\" target=\"_blank\">Политикой "
"конфиденциальности</a>."
msgstr ""
"By clicking “%1$s”, I agree to the processing of my <a href=\"%2$s\" "
"target=\"_blank\">personal data</a> on the terms and for the purposes set "
"out in the <a href=\"%3$s\" target=\"_blank\">Privacy Policy</a>."
#: components/booking/booking.php:111
msgid "Хорошо"
msgstr "OK"
#: components/demo-bar/demo-bar.php:11
#, php-format
msgid ""
"Сайт представлен <a class=\"demo-bar__link\" href=\"%1$s\">jimagie</a> в "
"демонстрационных целях: заявки не обрабатываются. <a class=\"demo-"
"bar__link\" href=\"%4$s\">Список страниц</a>. По вопросам: <a class=\"demo-"
"bar__link\" href=\"%3$s\">%2$s</a>"
msgstr ""
"Site presented by <a class=\"demo-bar__link\" href=\"%1$s\">jimagie</a> for "
"demonstration purposes: requests are not processed. <a class=\"demo-"
"bar__link\" href=\"%4$s\">List of pages</a>. Questions: <a class=\"demo-"
"bar__link\" href=\"%3$s\">%2$s</a>"
#: components/demo-bar/demo-bar.php:19
msgid "https://jimagie.com/ru/"
msgstr "https://jimagie.com/"
#: components/not-found/not-found.php:13
msgid "Такой страницы нет"
msgstr "This page does not exist"
#: components/not-found/not-found.php:14
msgid "Возможно, адрес изменился или в нём опечатка."
msgstr "The address may have changed or contain a typo."
#: components/not-found/not-found.php:16
msgid "На главную"
msgstr "Back to home"
#: components/not-found/not-found.php:17
#: components/site-header/site-header.php:77
msgid "Записаться"
msgstr "Book a visit"
#: components/site-footer/site-footer.php:10
#: components/site-header/site-header.php:19
msgid "Smilia, на главную"
msgstr "Smilia, home page"
#: components/site-footer/site-footer.php:14 inc/class-theme.php:40
msgid "Меню в подвале"
msgstr "Footer menu"
#: components/site-footer/site-footer.php:34
msgid "© %s Smilia, детская стоматология в Лодзи."
msgstr "© %s Smilia, pediatric dentistry in Łódź."
#: components/site-header/site-header.php:12
msgid "Новый пациент"
msgstr "New patient"
#: components/site-header/site-header.php:13
msgid "Действующий пациент"
msgstr "Existing patient"
#: components/site-header/site-header.php:24 inc/class-theme.php:39
msgid "Главное меню"
msgstr "Main menu"
#: components/site-header/site-header.php:65
msgid "Язык сайта: %s"
msgstr "Site language: %s"
#: components/site-header/site-header.php:80
msgid "Позвонить"
msgstr "Call"
#: components/site-header/site-header.php:91
msgid "Меню"
msgstr "Menu"
#: header.php:15
msgid "Перейти к содержимому"
msgstr "Skip to content"
#: components/site-footer/site-footer.php:1
msgid "Отозвать согласие на карту Google"
msgstr "Withdraw consent for Google Maps"
#: components/site-footer/site-footer.php:1
msgid "Согласие на карту отозвано."
msgstr "Consent for the map has been withdrawn."
msgid "Сайт использует cookie и сторонние сервисы."
msgstr "The site uses cookies and third-party services."
msgid "Принять"
msgstr "Accept"
msgid "Отклонить"
msgstr "Decline"
msgid "Настройки согласия"
msgstr "Consent settings"
msgid "Согласие на сторонние сервисы"
msgstr "Consent to third-party services"
#: components/consent/consent.php:13
#, php-format
msgid "Подробнее в <a href=\"%s\" target=\"_blank\">политике конфиденциальности</a>."
msgstr "Learn more in the <a href=\"%s\" target=\"_blank\">privacy policy</a>."
#: components/site-footer/site-footer.php
msgid "Документы"
msgstr "Documents"
#: inc/class-theme.php:42
msgid "Документы в подвале"
msgstr "Footer documents"
Binary file not shown.
+197
View File
@@ -0,0 +1,197 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Smilia\n"
"Language: pl_PL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
"X-Domain: smilia\n"
#: components/booking/booking.php:13
msgid "Проверьте имя."
msgstr "Sprawdź imię."
#: components/booking/booking.php:14
msgid "Проверьте номер телефона."
msgstr "Sprawdź numer telefonu."
#: components/booking/booking.php:15
msgid "Нужно ваше согласие на обработку персональных данных."
msgstr "Potrzebna jest zgoda na przetwarzanie danych osobowych."
#: components/booking/booking.php:16
msgid "Не получилось отправить заявку. Проверьте интернет или позвоните нам."
msgstr ""
"Nie udało się wysłać zgłoszenia. Sprawdź połączenie z internetem lub "
"zadzwoń."
#: components/booking/booking.php:17
msgid "Слишком много заявок подряд. Попробуйте через минуту."
msgstr "Zbyt wiele zgłoszeń z rzędu. Spróbuj ponownie za minutę."
#: components/booking/booking.php:21
msgid "Закрыть"
msgstr "Zamknij"
#: components/booking/booking.php:28 components/booking/booking.php:110
msgid "Демонстрационный сайт: заявка не будет обработана."
msgstr "Strona demonstracyjna: zgłoszenie nie zostanie zrealizowane."
#: components/booking/booking.php:32
msgid "Ваше имя"
msgstr "Imię"
#: components/booking/booking.php:33
msgid "Как к вам обращаться"
msgstr "Jak się zwracać"
#: components/booking/booking.php:36
msgid "Телефон"
msgstr "Telefon"
#: components/booking/booking.php:41
msgid "Возраст"
msgstr "Wiek"
#: components/booking/booking.php:42
msgid "5 лет"
msgstr "5 lat"
#: components/booking/booking.php:45
msgid "Что беспокоит"
msgstr "Powód wizyty"
#: components/booking/booking.php:58
msgid "Сайт"
msgstr "Strona"
#: components/booking/booking.php:71
#, php-format
msgid ""
"Нажимая «%1$s», я соглашаюсь на обработку <a href=\"%2$s\" "
"target=\"_blank\">персональных данных</a> на условиях и для целей, "
"определённых <a href=\"%3$s\" target=\"_blank\">Политикой "
"конфиденциальности</a>."
msgstr ""
"Klikając „%1$s”, wyrażam zgodę na przetwarzanie moich <a href=\"%2$s\" "
"target=\"_blank\">danych osobowych</a> na warunkach i w celach określonych w"
" <a href=\"%3$s\" target=\"_blank\">Polityce prywatności</a>."
#: components/booking/booking.php:111
msgid "Хорошо"
msgstr "OK"
#: components/demo-bar/demo-bar.php:11
#, php-format
msgid ""
"Сайт представлен <a class=\"demo-bar__link\" href=\"%1$s\">jimagie</a> в "
"демонстрационных целях: заявки не обрабатываются. <a class=\"demo-"
"bar__link\" href=\"%4$s\">Список страниц</a>. По вопросам: <a class=\"demo-"
"bar__link\" href=\"%3$s\">%2$s</a>"
msgstr ""
"Strona przygotowana przez <a class=\"demo-bar__link\" "
"href=\"%1$s\">jimagie</a> w celach demonstracyjnych: zgłoszenia nie są "
"realizowane. <a class=\"demo-bar__link\" href=\"%4$s\">Lista stron</a>. "
"Pytania: <a class=\"demo-bar__link\" href=\"%3$s\">%2$s</a>"
#: components/demo-bar/demo-bar.php:19
msgid "https://jimagie.com/ru/"
msgstr "https://jimagie.com/pl/"
#: components/not-found/not-found.php:13
msgid "Такой страницы нет"
msgstr "Nie ma takiej strony"
#: components/not-found/not-found.php:14
msgid "Возможно, адрес изменился или в нём опечатка."
msgstr "Możliwe, że adres się zmienił albo zawiera literówkę."
#: components/not-found/not-found.php:16
msgid "На главную"
msgstr "Na stronę główną"
#: components/not-found/not-found.php:17
#: components/site-header/site-header.php:77
msgid "Записаться"
msgstr "Umów wizytę"
#: components/site-footer/site-footer.php:10
#: components/site-header/site-header.php:19
msgid "Smilia, на главную"
msgstr "Smilia, strona główna"
#: components/site-footer/site-footer.php:14 inc/class-theme.php:40
msgid "Меню в подвале"
msgstr "Menu w stopce"
#: components/site-footer/site-footer.php:34
msgid "© %s Smilia, детская стоматология в Лодзи."
msgstr "© %s Smilia, stomatologia dziecięca w Łodzi."
#: components/site-header/site-header.php:12
msgid "Новый пациент"
msgstr "Nowy pacjent"
#: components/site-header/site-header.php:13
msgid "Действующий пациент"
msgstr "Obecny pacjent"
#: components/site-header/site-header.php:24 inc/class-theme.php:39
msgid "Главное меню"
msgstr "Menu główne"
#: components/site-header/site-header.php:65
msgid "Язык сайта: %s"
msgstr "Język strony: %s"
#: components/site-header/site-header.php:80
msgid "Позвонить"
msgstr "Zadzwoń"
#: components/site-header/site-header.php:91
msgid "Меню"
msgstr "Menu"
#: header.php:15
msgid "Перейти к содержимому"
msgstr "Przejdź do treści"
#: components/site-footer/site-footer.php:1
msgid "Отозвать согласие на карту Google"
msgstr "Wycofaj zgodę na mapę Google"
#: components/site-footer/site-footer.php:1
msgid "Согласие на карту отозвано."
msgstr "Zgoda na mapę została wycofana."
msgid "Сайт использует cookie и сторонние сервисы."
msgstr "Strona korzysta z plików cookie i usług zewnętrznych."
msgid "Принять"
msgstr "Zaakceptuj"
msgid "Отклонить"
msgstr "Odrzuć"
msgid "Настройки согласия"
msgstr "Ustawienia zgód"
msgid "Согласие на сторонние сервисы"
msgstr "Zgoda na usługi zewnętrzne"
#: components/consent/consent.php:13
#, php-format
msgid "Подробнее в <a href=\"%s\" target=\"_blank\">политике конфиденциальности</a>."
msgstr ""
"Więcej informacji w <a href=\"%s\" target=\"_blank\">polityce "
"prywatności</a>."
#: components/site-footer/site-footer.php
msgid "Документы"
msgstr "Dokumenty"
#: inc/class-theme.php:42
msgid "Документы в подвале"
msgstr "Dokumenty w stopce"
+16
View File
@@ -0,0 +1,16 @@
<?php
use Smilia\Theme\Components;
defined( 'ABSPATH' ) || exit;
Components::use( array( 'demo-bar', 'site-header', 'site-footer', 'booking' ) );
get_header();
while ( have_posts() ) {
the_post();
the_content();
}
get_footer();
@@ -0,0 +1,16 @@
<?php
use Smilia\Theme\Components;
defined( 'ABSPATH' ) || exit;
Components::use( array( 'demo-bar', 'site-header', 'site-footer', 'booking' ) );
get_header();
while ( have_posts() ) {
the_post();
the_content();
}
get_footer();
@@ -0,0 +1,16 @@
<?php
use Smilia\Theme\Components;
defined( 'ABSPATH' ) || exit;
Components::use( array( 'demo-bar', 'site-header', 'site-footer', 'booking' ) );
get_header();
while ( have_posts() ) {
the_post();
the_content();
}
get_footer();
+8
View File
@@ -0,0 +1,8 @@
/*
Theme Name: Smilia
Description: Тема сайта детской стоматологии Smilia.
Version: 0.1.0
Requires at least: 6.5
Requires PHP: 8.2
Text Domain: smilia
*/