GLOBAL PATCH
This commit is contained in:
1 parent
78b8ff61a7
commit
df3165dac0
31 files changed
+1678
-1323
No files matched your search
@@ -11,7 +11,6 @@
|
||||
.story,
|
||||
.principles,
|
||||
.production {
|
||||
width: 100%;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,233 @@
|
||||
.page {
|
||||
width: 100%;
|
||||
min-height: 70vh;
|
||||
padding: 126px 20px 96px;
|
||||
background: #ffffff;
|
||||
box-sizing: border-box;
|
||||
color: #151515;
|
||||
}
|
||||
|
||||
.hero,
|
||||
.mapBlock {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.hero {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
|
||||
gap: 56px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.heroText {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.kicker {
|
||||
display: inline-block;
|
||||
margin-bottom: 16px;
|
||||
color: var(--lightblue);
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.hero h1 {
|
||||
max-width: 760px;
|
||||
margin: 0;
|
||||
color: #111111;
|
||||
font-size: clamp(38px, 5vw, 64px);
|
||||
line-height: 1.06;
|
||||
}
|
||||
|
||||
.hero p {
|
||||
max-width: 640px;
|
||||
margin: 26px 0 0;
|
||||
color: #3f4652;
|
||||
font-size: 19px;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.contactPanel {
|
||||
display: grid;
|
||||
gap: 18px;
|
||||
padding: 28px;
|
||||
border: 1px solid #e7ebf0;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(135deg, #f7fbff 0%, #ffffff 62%, #fff7cf 100%);
|
||||
box-shadow: 0 18px 50px rgba(17, 31, 51, 0.07);
|
||||
}
|
||||
|
||||
.contactItem {
|
||||
display: grid;
|
||||
grid-template-columns: 52px minmax(0, 1fr);
|
||||
gap: 16px;
|
||||
padding: 20px;
|
||||
border: 1px solid #e7ebf0;
|
||||
border-radius: 8px;
|
||||
background: rgba(255, 255, 255, 0.84);
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
border-radius: 8px;
|
||||
background: #fff2a6;
|
||||
color: #111111;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.label {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
color: #77808c;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.06em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.contactItem p {
|
||||
margin: 0;
|
||||
color: #202733;
|
||||
font-size: 18px;
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
.contactItem a {
|
||||
color: #151515;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.contactItem a:hover {
|
||||
color: var(--darkblue);
|
||||
}
|
||||
|
||||
.links {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.mapBlock {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 24px;
|
||||
margin-top: 42px;
|
||||
padding: 30px;
|
||||
border: 1px solid #e7ebf0;
|
||||
border-radius: 8px;
|
||||
background: #f8fafc;
|
||||
}
|
||||
|
||||
.mapPlaceholder {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 18px;
|
||||
min-width: 0;
|
||||
color: #202733;
|
||||
}
|
||||
|
||||
.mapPlaceholder svg {
|
||||
flex: 0 0 auto;
|
||||
color: var(--lightblue);
|
||||
font-size: 34px;
|
||||
}
|
||||
|
||||
.mapPlaceholder strong,
|
||||
.mapPlaceholder span {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mapPlaceholder strong {
|
||||
font-size: 20px;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.mapPlaceholder span {
|
||||
margin-top: 4px;
|
||||
color: #596474;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.mapLink {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 0 0 auto;
|
||||
min-height: 50px;
|
||||
padding: 0 24px;
|
||||
border-radius: 50px;
|
||||
background: #ffd400;
|
||||
color: #111111;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
transition: background 0.2s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
.mapLink:hover {
|
||||
background: #ffe667;
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
@media (max-width: 980px) {
|
||||
.page {
|
||||
padding-top: 104px;
|
||||
}
|
||||
|
||||
.hero {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 34px;
|
||||
}
|
||||
|
||||
.mapBlock {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 560px) {
|
||||
.page {
|
||||
padding: 92px 16px 72px;
|
||||
}
|
||||
|
||||
.hero h1 {
|
||||
font-size: 34px;
|
||||
}
|
||||
|
||||
.hero p {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.contactPanel {
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.contactItem {
|
||||
grid-template-columns: 1fr;
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.mapBlock {
|
||||
padding: 22px;
|
||||
}
|
||||
|
||||
.mapPlaceholder {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.mapLink {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
import {
|
||||
EnvironmentOutlined,
|
||||
MailOutlined,
|
||||
PhoneOutlined,
|
||||
} from "@ant-design/icons";
|
||||
import SEO from "../../shared/ui/SEO";
|
||||
import styles from "./Contacts.module.css";
|
||||
|
||||
const phones = [
|
||||
{
|
||||
label: "+7 910 121 09 62",
|
||||
href: "tel:+79101210962",
|
||||
},
|
||||
];
|
||||
|
||||
const Contacts = () => {
|
||||
return (
|
||||
<>
|
||||
<SEO
|
||||
title="Контакты"
|
||||
description="Контакты RK-Plastic Tech: адрес производства и склада в Дзержинске, телефоны и электронная почта для связи."
|
||||
/>
|
||||
|
||||
<main className={styles.page}>
|
||||
<section className={styles.hero}>
|
||||
<div className={styles.heroText}>
|
||||
<span className={styles.kicker}>Контакты</span>
|
||||
<h1>Свяжитесь с нами по вопросам продукции и поставок</h1>
|
||||
<p>
|
||||
Подскажем по ассортименту, наличию, срокам производства и условиям
|
||||
сотрудничества.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className={styles.contactPanel}>
|
||||
<article className={styles.contactItem}>
|
||||
<div className={styles.icon}>
|
||||
<EnvironmentOutlined />
|
||||
</div>
|
||||
<div>
|
||||
<span className={styles.label}>Адрес производства и склада</span>
|
||||
<p>
|
||||
Нижегородская область, г. Дзержинск, Автозаводское шоссе, 70А
|
||||
</p>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article className={styles.contactItem}>
|
||||
<div className={styles.icon}>
|
||||
<PhoneOutlined />
|
||||
</div>
|
||||
<div>
|
||||
<span className={styles.label}>Телефоны</span>
|
||||
<div className={styles.links}>
|
||||
{phones.map((phone) => (
|
||||
<a href={phone.href} key={phone.href}>
|
||||
{phone.label}
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article className={styles.contactItem}>
|
||||
<div className={styles.icon}>
|
||||
<MailOutlined />
|
||||
</div>
|
||||
<div>
|
||||
<span className={styles.label}>Почта</span>
|
||||
<a href="mailto:rkplastic@mail.ru">rkplastic@mail.ru</a>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className={styles.mapBlock} aria-label="Адрес на карте">
|
||||
<div className={styles.mapPlaceholder}>
|
||||
<EnvironmentOutlined />
|
||||
<div>
|
||||
<strong>Дзержинск, Автозаводское шоссе, 70А</strong>
|
||||
<span>Производство и склад RK-Plastic Tech</span>
|
||||
</div>
|
||||
</div>
|
||||
<a
|
||||
className={styles.mapLink}
|
||||
href="https://yandex.ru/maps/?text=%D0%9D%D0%B8%D0%B6%D0%B5%D0%B3%D0%BE%D1%80%D0%BE%D0%B4%D1%81%D0%BA%D0%B0%D1%8F%20%D0%BE%D0%B1%D0%BB%D0%B0%D1%81%D1%82%D1%8C%2C%20%D0%B3.%20%D0%94%D0%B7%D0%B5%D1%80%D0%B6%D0%B8%D0%BD%D1%81%D0%BA%2C%20%D0%90%D0%B2%D1%82%D0%BE%D0%B7%D0%B0%D0%B2%D0%BE%D0%B4%D1%81%D0%BA%D0%BE%D0%B5%20%D1%88%D0%BE%D1%81%D1%81%D0%B5%2C%2070%D0%90"
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
Открыть в Яндекс Картах
|
||||
</a>
|
||||
</section>
|
||||
</main>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Contacts;
|
||||
@@ -1,193 +1,247 @@
|
||||
.page {
|
||||
background: #f5f5f5;
|
||||
min-height: 100vh;
|
||||
padding: 126px 20px 96px;
|
||||
background: #ffffff;
|
||||
color: #151515;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.resetLink {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
color: #f5c400;
|
||||
|
||||
.loading {
|
||||
min-height: 60vh;
|
||||
padding-top: 140px;
|
||||
color: #596474;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.top,
|
||||
.hero,
|
||||
.details {
|
||||
width: 100%;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.top {
|
||||
background: #000;
|
||||
padding: 15px 40px;
|
||||
padding-top: 100px;
|
||||
}
|
||||
|
||||
.short{
|
||||
font-size: 14px;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 40px;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
|
||||
.back {
|
||||
color: white;
|
||||
background: none;
|
||||
border: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-height: 44px;
|
||||
padding: 0 18px;
|
||||
border: 1px solid #d7dce3;
|
||||
border-radius: 50px;
|
||||
background: #ffffff;
|
||||
color: #151515;
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
transition: border-color 0.2s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
.back:hover {
|
||||
border-color: #111111;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.hero {
|
||||
display: flex;
|
||||
min-height: 500px;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
|
||||
gap: 30px;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.left,
|
||||
.right,
|
||||
.details {
|
||||
border: 1px solid #e7ebf0;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.left {
|
||||
flex: 1;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 520px;
|
||||
padding: 46px;
|
||||
background: #f8fafc;
|
||||
}
|
||||
|
||||
.left img {
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.rightContent{
|
||||
padding-right: 100px;
|
||||
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 430px;
|
||||
max-height: 430px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.right {
|
||||
flex: 1;
|
||||
background: linear-gradient(
|
||||
rgba(44, 44, 44, 0.9),
|
||||
rgba(44, 44, 44, 0.9)
|
||||
),
|
||||
url("../../assets/images/otkrytie-novogo-proizvodstva-v-g.Krymsk.jpeg");
|
||||
color: white;
|
||||
padding: 90px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
padding: 48px;
|
||||
background: linear-gradient(135deg, #f7fbff 0%, #ffffff 58%, #fff7cf 100%);
|
||||
box-shadow: 0 18px 50px rgba(17, 31, 51, 0.06);
|
||||
}
|
||||
|
||||
.breadcrumbs {
|
||||
font-size: 16px;
|
||||
color: #f5c400;
|
||||
margin-bottom: 20px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
margin-bottom: 28px;
|
||||
color: #77808c;
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.download {
|
||||
margin-top: 30px;
|
||||
background: #f5c400;
|
||||
border: none;
|
||||
padding: 15px 40px;
|
||||
border-radius: 30px;
|
||||
font-weight: bold;
|
||||
.breadcrumbs a {
|
||||
color: #596474;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.breadcrumbs a:hover {
|
||||
color: #111111;
|
||||
}
|
||||
|
||||
.kicker {
|
||||
display: inline-block;
|
||||
margin-bottom: 14px;
|
||||
color: var(--lightblue);
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.title {
|
||||
max-width: 720px;
|
||||
margin: 0;
|
||||
color: #111111;
|
||||
font-size: clamp(32px, 4vw, 54px);
|
||||
line-height: 1.08;
|
||||
}
|
||||
|
||||
.short {
|
||||
max-width: 620px;
|
||||
margin: 24px 0 0;
|
||||
color: #3f4652;
|
||||
font-size: 17px;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.status {
|
||||
width: fit-content;
|
||||
margin: 28px 0 24px;
|
||||
padding: 8px 14px;
|
||||
border-radius: 50px;
|
||||
background: #fff7cf;
|
||||
color: #111111;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.details {
|
||||
overflow: hidden;
|
||||
margin-top: 30px;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
border-top: 1px solid #ddd;
|
||||
gap: 0;
|
||||
border-bottom: 1px solid #e7ebf0;
|
||||
background: #f8fafc;
|
||||
}
|
||||
|
||||
.tabs button {
|
||||
flex: 1;
|
||||
padding: 20px;
|
||||
min-height: 58px;
|
||||
padding: 0 30px;
|
||||
border: none;
|
||||
background: #eee;
|
||||
border-right: 1px solid #e7ebf0;
|
||||
background: transparent;
|
||||
color: #596474;
|
||||
cursor: pointer;
|
||||
font-size: 15px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
transition: background 0.2s ease, color 0.2s ease;
|
||||
}
|
||||
|
||||
.active {
|
||||
background: white;
|
||||
font-weight: bold;
|
||||
.tabs button:hover {
|
||||
color: #111111;
|
||||
}
|
||||
|
||||
.tabs .active {
|
||||
background: #ffffff;
|
||||
color: #111111;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 40px;
|
||||
background: white;
|
||||
padding: 36px;
|
||||
}
|
||||
|
||||
.attrRow {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
.content h2 {
|
||||
margin: 0 0 18px;
|
||||
color: #151515;
|
||||
font-size: clamp(26px, 3vw, 36px);
|
||||
line-height: 1.16;
|
||||
}
|
||||
|
||||
.title{
|
||||
font-size: 28px;
|
||||
.content p {
|
||||
max-width: 900px;
|
||||
margin: 0 0 14px;
|
||||
color: #3f4652;
|
||||
font-size: 17px;
|
||||
line-height: 1.75;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.hero {
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
.top {
|
||||
padding: 20px;
|
||||
padding-top: 100px;
|
||||
}
|
||||
|
||||
.right {
|
||||
padding: 50px;
|
||||
}
|
||||
|
||||
.rightContent {
|
||||
padding-right: 100px;
|
||||
}
|
||||
|
||||
.left img {
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
.left{
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ================= MOBILE ================= */
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.top {
|
||||
padding: 15px 20px;
|
||||
padding-top: 100px;
|
||||
|
||||
@media (max-width: 980px) {
|
||||
.page {
|
||||
padding-top: 104px;
|
||||
}
|
||||
|
||||
.hero {
|
||||
flex-direction: column-reverse;
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.left {
|
||||
padding: 20px;
|
||||
min-height: 360px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 560px) {
|
||||
.page {
|
||||
padding: 92px 16px 72px;
|
||||
}
|
||||
|
||||
.left,
|
||||
.right,
|
||||
.content {
|
||||
padding: 22px;
|
||||
}
|
||||
|
||||
.left {
|
||||
min-height: 280px;
|
||||
}
|
||||
|
||||
.left img {
|
||||
max-width: 250px;
|
||||
max-height: 260px;
|
||||
}
|
||||
|
||||
.right {
|
||||
padding: 30px 20px;
|
||||
.title {
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.breadcrumbs{
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.title{
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.short {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 25px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.download {
|
||||
width: 100%;
|
||||
padding: 14px;
|
||||
text-align: center;
|
||||
.short,
|
||||
.content p {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
@@ -195,88 +249,8 @@
|
||||
}
|
||||
|
||||
.tabs button {
|
||||
padding: 14px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.attrRow {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 4px;
|
||||
width: 100%;
|
||||
border-right: none;
|
||||
border-bottom: 1px solid #e7ebf0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 665){
|
||||
.download {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.tabs button {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.short{
|
||||
margin-top: 30px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.back {
|
||||
color: white;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.hero {
|
||||
display: flex;
|
||||
min-height: 500px;
|
||||
}
|
||||
|
||||
.left {
|
||||
flex: 1;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.left img {
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.rightContent{
|
||||
padding-right: 100px;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ================= SMALL MOBILE ================= */
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.top {
|
||||
padding-top: 100px;
|
||||
}
|
||||
|
||||
.left img {
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
.right {
|
||||
padding: 20px 15px;
|
||||
}
|
||||
|
||||
.download {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.tabs button {
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { useParams, useNavigate } from "react-router-dom";
|
||||
import { ArrowLeftOutlined } from "@ant-design/icons";
|
||||
import { useAppDispatch, useAppSelector } from "../../app/hooks";
|
||||
import { fetchProductById, setSelectedProducts } from "../../features/catalog/productsSlice";
|
||||
import { fetchProductById } from "../../features/catalog/productsSlice";
|
||||
import styles from "./ItemPage.module.css";
|
||||
import type { CategoryAtributes, CategoryAtrVals } from "../../types/categories";
|
||||
import Button from "../../components/Button/Button";
|
||||
import PriceLisForm from "../../components/PriceLisForm/PriceLisForm";
|
||||
import ProductAttributes from "../../components/Table/ProducTable";
|
||||
import { p, title } from "framer-motion/client";
|
||||
import Link from "antd/es/typography/Link";
|
||||
import { setSelectedCategory } from "../../features/catalog/categoriesSlice";
|
||||
|
||||
@@ -16,103 +15,108 @@ const ItemPage = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
const navigate = useNavigate();
|
||||
const { items, loading } = useAppSelector((state) => state.products);
|
||||
const { items: cats, selectedCategoryId } = useAppSelector(s => s.categories);
|
||||
const { items: cats, selectedCategoryId } = useAppSelector((s) => s.categories);
|
||||
|
||||
const [activeTab, setActiveTab] = useState<"desc" | "chars">("desc");
|
||||
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (id) dispatch(fetchProductById(id));
|
||||
}, [id]);
|
||||
}, [dispatch, id]);
|
||||
|
||||
const product = items.find((item) => item.id === Number(id));
|
||||
const category = cats.find((cat) => cat.id === Number(selectedCategoryId))
|
||||
const category = cats.find((cat) => cat.id === Number(selectedCategoryId));
|
||||
|
||||
if ((loading || !product)) return <div>Загрузка...</div>;
|
||||
if(!category) return <div>Загрузка...</div>;
|
||||
if (loading || !product) {
|
||||
return <div className={styles.loading}>Загрузка...</div>;
|
||||
}
|
||||
|
||||
if (!category) {
|
||||
return <div className={styles.loading}>Загрузка...</div>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.page}>
|
||||
<PriceLisForm open={open} onClose={() => setOpen(false)}/>
|
||||
<main className={styles.page}>
|
||||
<PriceLisForm open={open} onClose={() => setOpen(false)} />
|
||||
|
||||
<div className={styles.top}>
|
||||
<button className={styles.back} onClick={() => navigate(-1)}>
|
||||
← НАЗАД В КАТАЛОГ
|
||||
<ArrowLeftOutlined />
|
||||
Назад в каталог
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className={styles.hero}>
|
||||
<section className={styles.hero}>
|
||||
<div className={styles.left}>
|
||||
<img src={product.images[0]} alt={product.name} />
|
||||
</div>
|
||||
|
||||
<div className={styles.right}>
|
||||
<div className={styles.rightContent}>
|
||||
<div className={styles.breadcrumbs}>
|
||||
<Link onClick={() => {navigate('/products'); dispatch(setSelectedCategory(null))}} style={{ textDecoration: 'none', color: 'inherit', fontSize: "16px" }}>КАТЕГОРИИ</Link> / <Link onClick={() => navigate('/products')} style={{ textDecoration: 'none', color: 'inherit', fontSize: "16px" }}>{category?.name}</Link> / <Link onClick={() => navigate(`/product/${id}`)} style={{ textDecoration: 'none', color: 'inherit', fontSize: "16px" }}>{product.name}</Link>
|
||||
<Link
|
||||
onClick={() => {
|
||||
navigate("/products");
|
||||
dispatch(setSelectedCategory(null));
|
||||
}}
|
||||
>
|
||||
Категории
|
||||
</Link>
|
||||
<span>/</span>
|
||||
<Link onClick={() => navigate("/products")}>{category.name}</Link>
|
||||
<span>/</span>
|
||||
<span>{product.name}</span>
|
||||
</div>
|
||||
|
||||
<span className={styles.kicker}>Карточка товара</span>
|
||||
<h1 className={styles.title}>{product.name}</h1>
|
||||
|
||||
<p className={styles.short}>{product.description}</p>
|
||||
<Button
|
||||
label="СКАЧАТЬ ПРАЙС-ЛИСТ"
|
||||
onClick={() => setOpen(true)}
|
||||
/>
|
||||
|
||||
<div className={styles.status}>
|
||||
{product.inStock ? "В наличии" : "Под заказ"}
|
||||
</div>
|
||||
|
||||
<Button label="Скачать прайс-лист" onClick={() => setOpen(true)} />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div className={styles.tabs}>
|
||||
<button
|
||||
className={activeTab === "desc" ? styles.active : ""}
|
||||
onClick={() => setActiveTab("desc")}
|
||||
>
|
||||
ОПИСАНИЕ
|
||||
</button>
|
||||
<button
|
||||
className={activeTab === "chars" ? styles.active : ""}
|
||||
onClick={() => setActiveTab("chars")}
|
||||
>
|
||||
ХАРАКТЕРИСТИКИ
|
||||
</button>
|
||||
</div>
|
||||
<section className={styles.details}>
|
||||
<div className={styles.tabs}>
|
||||
<button
|
||||
className={activeTab === "desc" ? styles.active : ""}
|
||||
onClick={() => setActiveTab("desc")}
|
||||
>
|
||||
Описание
|
||||
</button>
|
||||
<button
|
||||
className={activeTab === "chars" ? styles.active : ""}
|
||||
onClick={() => setActiveTab("chars")}
|
||||
>
|
||||
Характеристики
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className={styles.content}>
|
||||
{activeTab === "desc" && (
|
||||
<div>
|
||||
<h2>ОПИСАНИЕ</h2>
|
||||
<p>{product.description}</p>
|
||||
<p>{product.full_name}</p>
|
||||
{!product.inStock?
|
||||
(
|
||||
<p>в наличии</p>
|
||||
) : (
|
||||
<p>нет в наличии</p>
|
||||
)
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div className={styles.content}>
|
||||
{activeTab === "desc" && (
|
||||
<div>
|
||||
<h2>Описание</h2>
|
||||
<p>{product.description}</p>
|
||||
<p>{product.full_name}</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{activeTab === "chars" && (
|
||||
<div>
|
||||
<h2>ХАРАКТЕРИСТИКИ</h2>
|
||||
{/*{product.attributes.map((attr) => (
|
||||
<div key={attr.id} className={styles.attrRow}>
|
||||
<span>{attr.name}</span>
|
||||
{attr.vals?.map((val: CategoryAtrVals) => (
|
||||
<div key={val.id}>
|
||||
<span>{val.val}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
))}*/}
|
||||
<ProductAttributes attributes={product.attributes}/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{activeTab === "chars" && (
|
||||
<div>
|
||||
<h2>Характеристики</h2>
|
||||
<ProductAttributes
|
||||
attributes={product.attributes}
|
||||
attrList={category.attributes}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default ItemPage;
|
||||
export default ItemPage;
|
||||
@@ -1,13 +1,19 @@
|
||||
.container{
|
||||
width: 80%;
|
||||
margin: 0;
|
||||
align-items: center;
|
||||
.main {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 0;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.main{
|
||||
margin: 0;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.container {
|
||||
width: 100%;
|
||||
max-width: 1200px;
|
||||
padding: 72px 20px 96px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (max-width: 560px) {
|
||||
.container {
|
||||
padding: 52px 16px 72px;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
import React from 'react';
|
||||
import { Button, Row, Col } from 'antd';
|
||||
import { RocketOutlined, ArrowRightOutlined } from '@ant-design/icons';
|
||||
import styles from './Main.module.css'
|
||||
import BannerSlider from '../../components/Banner/Banner';
|
||||
import CategoriesGrid from '../../components/Categories/Categories';
|
||||
@@ -14,7 +12,7 @@ const Main: React.FC = () =>{
|
||||
<main className={styles.main}>
|
||||
<div className={styles.container}>
|
||||
<CategoriesGrid/>
|
||||
{<ProductionBanner/>}
|
||||
<ProductionBanner/>
|
||||
<QuestionsBlock/>
|
||||
</div>
|
||||
</main>
|
||||
@@ -23,4 +21,4 @@ const Main: React.FC = () =>{
|
||||
);
|
||||
}
|
||||
|
||||
export default Main;
|
||||
export default Main;
|
||||
@@ -1,297 +1,218 @@
|
||||
/* ===== ОБЩИЙ ЛЭЙАУТ ===== */
|
||||
.wrapper {
|
||||
|
||||
}
|
||||
|
||||
.container{
|
||||
display: flex;
|
||||
background: #f3f3f3;
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
font-family: Arial, sans-serif;
|
||||
|
||||
padding: 126px 20px 96px;
|
||||
background: #ffffff;
|
||||
box-sizing: border-box;
|
||||
color: #151515;
|
||||
}
|
||||
|
||||
/* ===== САЙДБАР ===== */
|
||||
.sidebar {
|
||||
width: 280px;
|
||||
background: #fff;
|
||||
padding: 30px 20px;
|
||||
border-right: 1px solid #e0e0e0;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-top: 70px;
|
||||
.hero,
|
||||
.container {
|
||||
width: 100%;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* ===== ОСНОВНАЯ ЧАСТЬ ===== */
|
||||
.main {
|
||||
flex: 1;
|
||||
padding: 30px 40px;
|
||||
padding-top: 100px;
|
||||
}
|
||||
|
||||
/* ===== ЛЭЙАУТ КАТАЛОГА ===== */
|
||||
.catalogLayout {
|
||||
display: flex;
|
||||
gap: 30px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
/* ===== ФИЛЬТРЫ ===== */
|
||||
.filters {
|
||||
width: 100%; /* 🔥 важно */
|
||||
border: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
/* ===== БЛОК ТОВАРОВ ===== */
|
||||
.products {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 25px;
|
||||
}
|
||||
|
||||
/* ===== GRID ===== */
|
||||
.grid {
|
||||
.hero {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
border-top: 1px solid #ddd;
|
||||
border-left: 1px solid #ddd;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
|
||||
gap: 48px;
|
||||
align-items: end;
|
||||
margin-bottom: 42px;
|
||||
}
|
||||
|
||||
/* ===== КАРТОЧКА ===== */
|
||||
.card {
|
||||
background: #fff;
|
||||
border-right: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding: 25px 20px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
box-shadow: 0 8px 20px rgba(0,0,0,0.08);
|
||||
}
|
||||
|
||||
/* ===== КАРТИНКА ===== */
|
||||
.card img {
|
||||
max-height: 140px;
|
||||
object-fit: contain;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
/* ===== НАЗВАНИЕ ===== */
|
||||
.card h3 {
|
||||
.kicker {
|
||||
display: inline-block;
|
||||
margin-bottom: 16px;
|
||||
color: var(--lightblue);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #222;
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
/* ===== ПЛЮС КНОПКА ===== */
|
||||
.card::after {
|
||||
content: "+";
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
bottom: 15px;
|
||||
color: #f5c400;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* ===== ПАГИНАЦИЯ ===== */
|
||||
.pagination {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.pageBtn {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: 1px solid #ddd;
|
||||
background: #fff;
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.pageBtn:hover {
|
||||
background: #f5c400;
|
||||
}
|
||||
|
||||
.activePage {
|
||||
background: #f5c400;
|
||||
border-color: #f5c400;
|
||||
}
|
||||
|
||||
/* ===== ФИЛЬТРЫ СТИЛИ ===== */
|
||||
.filters h4 {
|
||||
font-size: 14px;
|
||||
margin-bottom: 10px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.filters label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 13px;
|
||||
margin-bottom: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.filters input {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* ===== КАТЕГОРИИ ===== */
|
||||
.sidebar h3 {
|
||||
font-size: 16px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.sidebar ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.sidebar li {
|
||||
font-size: 14px;
|
||||
margin-bottom: 12px;
|
||||
cursor: pointer;
|
||||
color: #666;
|
||||
transition: 0.2s;
|
||||
}
|
||||
|
||||
.sidebar li:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.activeCategory {
|
||||
font-weight: 700;
|
||||
color: #000;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.mobileFilterBtn {
|
||||
display: none;
|
||||
margin-bottom: 15px;
|
||||
padding: 12px;
|
||||
background: #000;
|
||||
color: white;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
.hero h1 {
|
||||
max-width: 820px;
|
||||
margin: 0;
|
||||
color: #111111;
|
||||
font-size: clamp(38px, 5vw, 64px);
|
||||
line-height: 1.06;
|
||||
}
|
||||
|
||||
/* overlay */
|
||||
.overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
z-index: 50;
|
||||
.hero p {
|
||||
max-width: 650px;
|
||||
margin: 26px 0 0;
|
||||
color: #3f4652;
|
||||
font-size: 19px;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
/* кнопка закрытия */
|
||||
.heroCard {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
padding: 28px;
|
||||
border: 1px solid #e7ebf0;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(135deg, #f7fbff 0%, #ffffff 58%, #fff7cf 100%);
|
||||
box-shadow: 0 18px 50px rgba(17, 31, 51, 0.07);
|
||||
}
|
||||
|
||||
.heroCard svg {
|
||||
color: #111111;
|
||||
font-size: 34px;
|
||||
}
|
||||
|
||||
.heroCard strong {
|
||||
color: #111111;
|
||||
font-size: 26px;
|
||||
line-height: 1.15;
|
||||
}
|
||||
|
||||
.heroCard span {
|
||||
color: #596474;
|
||||
font-size: 15px;
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: grid;
|
||||
grid-template-columns: 280px minmax(0, 1fr);
|
||||
gap: 28px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
position: sticky;
|
||||
top: 104px;
|
||||
padding: 24px;
|
||||
border: 1px solid #e7ebf0;
|
||||
border-radius: 8px;
|
||||
background: #f8fafc;
|
||||
}
|
||||
|
||||
.main {
|
||||
min-width: 0;
|
||||
padding: 30px;
|
||||
border: 1px solid #e7ebf0;
|
||||
border-radius: 8px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 18px 50px rgba(17, 31, 51, 0.05);
|
||||
}
|
||||
|
||||
.sectionHead {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.sectionHead span {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
color: #77808c;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.06em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.sectionHead h2 {
|
||||
margin: 0;
|
||||
color: #151515;
|
||||
font-size: clamp(28px, 4vw, 42px);
|
||||
line-height: 1.15;
|
||||
}
|
||||
|
||||
.products {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 26px;
|
||||
}
|
||||
|
||||
.mobileFilterBtn,
|
||||
.closeBtn {
|
||||
display: none;
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
margin-top: 70px;
|
||||
}
|
||||
|
||||
/* ================= MOBILE ================= */
|
||||
@media (max-width: 980px) {
|
||||
.wrapper {
|
||||
padding-top: 104px;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.mobileFilterBtn {
|
||||
display: block;
|
||||
.hero,
|
||||
.container {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.hero {
|
||||
align-items: start;
|
||||
gap: 28px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
width: 80%;
|
||||
height: 100%;
|
||||
background: white;
|
||||
z-index: 100;
|
||||
padding: 20px;
|
||||
inset: 0 auto 0 -100%;
|
||||
z-index: 1200;
|
||||
width: min(360px, 86vw);
|
||||
overflow-y: auto;
|
||||
transition: 0.3s;
|
||||
border-radius: 0;
|
||||
transition: left 0.28s ease;
|
||||
}
|
||||
|
||||
.sidebarOpen {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.mobileFilterBtn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
min-height: 48px;
|
||||
margin-bottom: 22px;
|
||||
padding: 0 22px;
|
||||
border: none;
|
||||
border-radius: 50px;
|
||||
background: #ffd400;
|
||||
color: #111111;
|
||||
cursor: pointer;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.closeBtn {
|
||||
display: block;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 42px;
|
||||
margin-bottom: 18px;
|
||||
padding: 0 18px;
|
||||
border: 1px solid #d7dce3;
|
||||
border-radius: 50px;
|
||||
background: #ffffff;
|
||||
color: #111111;
|
||||
cursor: pointer;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* ===== АДАПТИВ ===== */
|
||||
|
||||
|
||||
@media (max-width: 1254px){
|
||||
.sidebar {
|
||||
width: 220px;
|
||||
@media (max-width: 560px) {
|
||||
.wrapper {
|
||||
padding: 92px 16px 72px;
|
||||
}
|
||||
|
||||
.hero h1 {
|
||||
font-size: 34px;
|
||||
}
|
||||
|
||||
.hero p {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.heroCard,
|
||||
.main {
|
||||
padding: 0;
|
||||
padding-top: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.grid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1045px){
|
||||
.sidebar {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (max-width: 827px){
|
||||
.container{
|
||||
background: white;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
|
||||
|
||||
|
||||
|
||||
.catalogLayout {
|
||||
flex-direction: column;
|
||||
padding: 22px;
|
||||
}
|
||||
|
||||
.filters {
|
||||
.mobileFilterBtn {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 600px){
|
||||
.products {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.main{
|
||||
justify-content: center;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import React from "react";
|
||||
import React, { useState } from "react";
|
||||
import { AppstoreOutlined, FilterOutlined } from "@ant-design/icons";
|
||||
import styles from "./Products.module.css";
|
||||
import SidebarCategories from "../../features/catalog/SidebarCategories";
|
||||
import CategoryCards from "../../features/catalog/CategoryCards";
|
||||
@@ -7,12 +8,10 @@ import ProductGrid from "../../features/catalog/ProductGrid";
|
||||
import Pagination from "../../features/catalog/Pagination";
|
||||
import { useAppSelector } from "../../app/hooks";
|
||||
import SEO from "../../shared/ui/SEO";
|
||||
import { useState } from "react";
|
||||
|
||||
const ProductsPage: React.FC = () => {
|
||||
const { selectedCategoryId, items } = useAppSelector((s) => s.categories);
|
||||
const category = items.find((c) => c.id === selectedCategoryId);
|
||||
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
|
||||
return (
|
||||
@@ -25,26 +24,48 @@ const ProductsPage: React.FC = () => {
|
||||
: "Каталог продукции: трубы ПВХ, аксессуары и комплектующие"
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<div className={styles.wrapper}>
|
||||
<main className={styles.wrapper}>
|
||||
<section className={styles.hero}>
|
||||
<div>
|
||||
<span className={styles.kicker}>Каталог продукции</span>
|
||||
<h1>Подберите продукцию для инженерных и строительных задач</h1>
|
||||
<p>
|
||||
Выберите категорию, уточните параметры и перейдите к карточке
|
||||
товара, чтобы посмотреть характеристики.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className={styles.heroCard}>
|
||||
<AppstoreOutlined />
|
||||
<strong>{items.length || "Все"} категорий</strong>
|
||||
<span>Продукция, комплектующие и позиции для поставок</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div className={styles.container}>
|
||||
<aside className={`${styles.sidebar} ${isOpen ? styles.sidebarOpen : ""}`}>
|
||||
<button className={styles.closeBtn} onClick={() => setIsOpen(false)}>
|
||||
✕
|
||||
Закрыть
|
||||
</button>
|
||||
<SidebarCategories />
|
||||
{selectedCategoryId && <Filters />}
|
||||
</aside>
|
||||
|
||||
<main className={styles.main}>
|
||||
<section className={styles.main}>
|
||||
<button
|
||||
className={styles.mobileFilterBtn}
|
||||
onClick={() => setIsOpen(true)}
|
||||
>
|
||||
<FilterOutlined />
|
||||
Фильтры и категории
|
||||
</button>
|
||||
|
||||
<div className={styles.sectionHead}>
|
||||
<span>{selectedCategoryId ? "Выбранная категория" : "Категории"}</span>
|
||||
<h2>{category?.name || "Вся продукция"}</h2>
|
||||
</div>
|
||||
|
||||
{!selectedCategoryId ? (
|
||||
<CategoryCards />
|
||||
) : (
|
||||
@@ -53,9 +74,9 @@ const ProductsPage: React.FC = () => {
|
||||
<Pagination categoryId={selectedCategoryId} />
|
||||
</div>
|
||||
)}
|
||||
</main>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user