feat: добавить home app и базовую структуру шаблонов

- Создано Django app 'home' с view, urls, models
- Добавлены шаблоны: base layout, header/footer fragments, index page
- Настроены STATICFILES_DIRS и TEMPLATES в settings.py
- Подключены URLS всех apps (home, items, orders, users)
- Добавлены статические файлы (CSS, изображения)
This commit is contained in:
2026-03-23 19:00:17 +01:00
parent 7c7060b56d
commit 1eff7c6227
31 changed files with 1188 additions and 3 deletions

718
static/css/style.css Normal file
View File

@@ -0,0 +1,718 @@
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--dark: #36213e;
--mid: #554971;
--blue-gray: #63768d;
--light-blue: #b8f3ff;
--white: #ffffff;
--bg: #f9f8fa;
}
body {
font-family: 'Inter', sans-serif;
color: var(--dark);
background: var(--white);
overflow-x: hidden;
}
/* Container to maintain consistent width */
.container {
max-width: 1400px;
margin: 0 auto;
width: 100%;
}
a { text-decoration: none; color: inherit; }
/* ── HEADER ── */
header {
position: sticky;
top: 0;
z-index: 100;
background: var(--white);
border-bottom: 1px solid rgba(54,33,62,.08);
box-shadow: 0 2px 20px rgba(54,33,62,.06);
}
.header-top {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 80px;
gap: 20px;
}
.logo {
font-family: 'Playfair Display', serif;
font-size: 32px;
color: var(--dark);
white-space: nowrap;
letter-spacing: .5px;
}
.search-wrap {
display: flex;
align-items: center;
border: 1px solid var(--dark);
flex: 1;
max-width: 420px;
margin: 0 24px;
}
.search-wrap select {
border: none;
border-right: 1px solid var(--dark);
padding: 10px 14px;
font-family: 'Inter', sans-serif;
font-size: 13px;
color: var(--mid);
background: transparent;
outline: none;
cursor: pointer;
}
.search-wrap input {
flex: 1;
border: none;
padding: 10px 14px;
font-size: 12px;
color: var(--mid);
outline: none;
background: transparent;
font-family: 'Inter', sans-serif;
}
.search-wrap input::placeholder { color: var(--mid); opacity: .6; }
.search-wrap button {
border: none;
background: transparent;
padding: 10px 14px;
cursor: pointer;
display: flex;
align-items: center;
}
.search-wrap button svg { width: 20px; height: 20px; }
.header-icons {
display: flex;
align-items: center;
gap: 18px;
}
.header-icons a {
display: flex;
align-items: center;
cursor: pointer;
color: var(--dark);
transition: opacity .2s;
}
.header-icons a:hover { opacity: .6; }
.header-icons svg { width: 28px; height: 28px; }
.nav-bar {
display: flex;
align-items: center;
padding: 10px 80px;
gap: 0;
border-top: 1px solid rgba(54,33,62,.07);
}
.nav-bar .catalog-btn {
display: flex;
align-items: center;
gap: 8px;
font-size: 14px;
color: var(--mid);
margin-right: 32px;
cursor: pointer;
font-weight: 400;
transition: color .2s;
}
.nav-bar .catalog-btn:hover { color: var(--dark); }
.nav-links {
display: flex;
align-items: center;
gap: 28px;
flex: 1;
}
.nav-links a {
font-size: 14px;
color: var(--mid);
transition: color .2s;
white-space: nowrap;
}
.nav-links a:hover { color: var(--dark); }
.phone-link {
display: flex;
align-items: center;
gap: 8px;
font-size: 14px;
color: var(--mid);
text-decoration: underline;
white-space: nowrap;
}
/* ── HERO ── */
.hero {
position: relative;
min-height: 520px;
overflow: hidden;
display: flex;
align-items: center;
}
.hero-bg-circle {
position: absolute;
left: -40px;
top: 60px;
width: 480px;
height: 480px;
border-radius: 50%;
background: radial-gradient(circle at 40% 50%, #8a7a95 0%, #5c4d6e 50%, #36213e 100%);
opacity: .85;
z-index: 0;
}
.hero-img {
position: absolute;
left: 140px;
top: 60px;
width: 340px;
height: 320px;
object-fit: cover;
z-index: 1;
border-radius: 2px;
}
.hero-content {
position: relative;
z-index: 2;
margin-left: 54%;
padding: 80px 80px 80px 0;
max-width: 580px;
}
.hero-content h1 {
font-family: 'Inter', sans-serif;
font-size: 44px;
font-weight: 500;
letter-spacing: 2.5px;
line-height: 1.2;
color: var(--dark);
margin-bottom: 18px;
}
.hero-check {
display: flex;
align-items: flex-start;
gap: 10px;
margin-bottom: 22px;
}
.hero-check svg { width: 28px; height: 28px; flex-shrink: 0; margin-top: 2px; }
.hero-check p {
font-size: 15px;
color: var(--dark);
line-height: 1.6;
font-weight: 500;
}
.btn-primary {
display: inline-flex;
align-items: center;
justify-content: center;
background: var(--blue-gray);
color: var(--white);
font-size: 18px;
font-weight: 500;
padding: 22px 40px;
border: none;
cursor: pointer;
transition: background .25s, transform .15s;
letter-spacing: .5px;
text-transform: uppercase;
}
.btn-primary:hover { background: #516070; transform: translateY(-2px); }
/* ── WHY US ── */
.why-us {
padding: 70px 80px 60px;
display: grid;
grid-template-columns: 340px repeat(3, 1fr);
gap: 32px;
align-items: start;
background: var(--white);
}
.why-us-title {
font-size: 38px;
font-weight: 400;
line-height: 1.15;
color: var(--dark);
}
.why-item {
display: flex;
flex-direction: column;
gap: 10px;
}
.why-num {
width: 42px;
height: 42px;
border-radius: 50%;
background: var(--blue-gray);
color: var(--white);
font-size: 22px;
display: flex;
align-items: center;
justify-content: center;
font-weight: 400;
flex-shrink: 0;
}
.why-num.alt { background: var(--mid); }
.why-item h3 {
font-size: 15px;
font-weight: 600;
color: var(--dark);
text-transform: uppercase;
letter-spacing: .5px;
margin-top: 6px;
}
.why-item p { font-size: 13px; color: var(--dark); line-height: 1.55; }
/* ── PROMO BANNERS ── */
.promo-section {
padding: 20px 80px 60px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
.promo-card {
position: relative;
height: 300px;
background: var(--blue-gray);
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: 32px 36px;
}
.promo-card img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
opacity: .35;
}
.promo-card-content { position: relative; z-index: 1; }
.promo-tag {
font-size: 15px;
color: var(--light-blue);
font-weight: 500;
margin-bottom: 8px;
text-transform: uppercase;
letter-spacing: .5px;
}
.promo-card h2 {
font-size: 28px;
font-weight: 500;
color: var(--light-blue);
line-height: 1.2;
margin-bottom: 20px;
}
.promo-link {
font-size: 16px;
font-weight: 500;
color: var(--light-blue);
border-bottom: 1px solid var(--light-blue);
display: inline-block;
transition: opacity .2s;
}
.promo-link:hover { opacity: .7; }
/* ── ABOUT ── */
.about-section {
padding: 60px 80px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 60px;
align-items: start;
}
.about-left h2 {
font-size: 38px;
font-weight: 400;
color: var(--dark);
margin-bottom: 24px;
}
.about-left p {
font-size: 16px;
line-height: 1.7;
color: var(--dark);
margin-bottom: 28px;
}
.about-left h3 {
font-size: 20px;
font-weight: 600;
color: var(--dark);
margin-bottom: 18px;
}
.about-list { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.about-list li {
display: flex;
align-items: flex-start;
gap: 16px;
}
.about-list .num {
width: 52px;
height: 52px;
border-radius: 50%;
background: var(--blue-gray);
color: var(--white);
font-size: 26px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.about-list .li-content { display: flex; flex-direction: column; gap: 4px; }
.about-list .li-title {
font-size: 17px;
font-weight: 500;
color: var(--dark);
}
.about-list .li-desc { font-size: 13px; color: var(--dark); line-height: 1.5; }
.about-right {
display: flex;
flex-direction: column;
gap: 28px;
}
.about-right img {
width: 100%;
height: 310px;
object-fit: cover;
}
.about-right p {
font-size: 15px;
color: var(--dark);
line-height: 1.7;
}
.stats-row {
display: flex;
gap: 32px;
flex-wrap: wrap;
margin-top: 8px;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-size: 30px; font-weight: 400; color: var(--dark); letter-spacing: -1px; }
.stat-label { font-size: 13px; color: var(--dark); }
.about-right-bottom img {
width: 100%;
height: 220px;
object-fit: cover;
margin-top: 12px;
}
/* ── KITCHEN BANNER ── */
.kitchen-banner {
background: var(--blue-gray);
margin: 0 80px;
padding: 60px 80px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 40px;
align-items: center;
position: relative;
overflow: hidden;
}
.kitchen-banner img {
position: absolute;
right: 0;
top: 0;
width: 50%;
height: 100%;
object-fit: cover;
opacity: .55;
}
.kitchen-content { position: relative; z-index: 1; }
.kitchen-content p {
font-size: 18px;
color: rgba(255,255,255,.85);
margin-bottom: 16px;
line-height: 1.5;
}
.kitchen-content h2 {
font-size: 42px;
font-weight: 400;
color: var(--white);
line-height: 1.15;
margin-bottom: 28px;
}
.btn-outline-light {
font-size: 18px;
color: var(--white);
border-bottom: 1px solid var(--white);
padding-bottom: 2px;
display: inline-block;
transition: opacity .2s;
}
.btn-outline-light:hover { opacity: .7; }
/* ── PRODUCTS ── */
.products-section { padding: 70px 80px 60px; }
.section-title {
font-size: 38px;
font-weight: 400;
color: var(--dark);
margin-bottom: 40px;
letter-spacing: .5px;
}
.products-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: auto auto;
gap: 16px;
}
.product-card {
background: #d9d9d9;
position: relative;
display: flex;
flex-direction: column;
overflow: hidden;
transition: box-shadow .2s;
}
.product-card:hover { box-shadow: 0 8px 32px rgba(54,33,62,.13); }
.product-card.tall { grid-row: span 2; }
.product-card-img {
width: 100%;
aspect-ratio: 1 / 1;
object-fit: cover;
display: block;
background: #d9d9d9;
}
.product-card.tall .product-card-img { aspect-ratio: 3/4; }
.product-info {
padding: 18px 20px 20px;
background: var(--white);
display: flex;
flex-direction: column;
gap: 4px;
flex: 1;
}
.product-info .p-name {
font-size: 20px;
font-weight: 500;
color: var(--dark);
}
.product-info .p-sub {
font-size: 14px;
color: var(--mid);
margin-bottom: 6px;
}
.product-info .p-price {
font-size: 20px;
font-weight: 500;
color: var(--dark);
margin-top: auto;
}
.product-actions {
position: absolute;
top: 14px;
right: 14px;
display: flex;
gap: 8px;
}
.product-actions button {
width: 36px;
height: 36px;
background: rgba(255,255,255,.9);
border: none;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background .2s;
backdrop-filter: blur(4px);
}
.product-actions button:hover { background: var(--white); }
.product-actions button svg { width: 18px; height: 18px; color: var(--dark); }
.products-footer {
display: flex;
justify-content: flex-end;
margin-top: 28px;
}
/* ── FAQ ── */
.faq-section { padding: 70px 80px 60px; }
.faq-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 40px 60px;
margin-top: 40px;
}
.faq-item { display: flex; gap: 16px; align-items: flex-start; }
.faq-icon {
width: 42px;
height: 42px;
border-radius: 50%;
background: var(--blue-gray);
display: flex;
align-items: center;
justify-content: center;
color: var(--light-blue);
font-size: 18px;
font-weight: 400;
flex-shrink: 0;
margin-top: 2px;
}
.faq-body h4 {
font-size: 18px;
font-weight: 700;
color: var(--dark);
margin-bottom: 10px;
line-height: 1.3;
}
.faq-body p {
font-size: 15px;
color: #333;
line-height: 1.65;
}
.faq-cta {
margin-top: 48px;
display: flex;
justify-content: center;
}
/* ── FOOTER ── */
footer {
background: var(--blue-gray);
padding: 50px 80px 40px;
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
gap: 40px;
margin-top: 60px;
}
.footer-logo {
font-family: 'Playfair Display', serif;
font-size: 30px;
color: rgba(184,243,255,.85);
margin-bottom: 8px;
}
.footer-col h4 {
font-size: 16px;
font-weight: 600;
color: rgba(184,243,255,.85);
text-transform: uppercase;
letter-spacing: .5px;
margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a, .footer-col ul li {
font-size: 16px;
color: rgba(184,243,255,.8);
transition: opacity .2s;
}
.footer-col ul li a:hover { opacity: .65; }
/* ── ANIMATIONS ── */
@keyframes fadeUp {
from { opacity: 0; transform: translateY(24px); }
to { opacity: 1; transform: translateY(0); }
}
.hero-content, .hero-bg-circle {
animation: fadeUp .7s ease both;
}
.hero-img {
animation: fadeUp .8s .15s ease both;
}
/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
.hero-img { left: 60px; }
.hero-content { margin-left: 48%; }
}
@media (max-width: 900px) {
header, .header-top, .nav-bar { padding-left: 24px; padding-right: 24px; }
.hero { flex-direction: column; min-height: auto; padding-top: 320px; }
.hero-img { left: 50%; transform: translateX(-50%); top: 20px; }
.hero-content { margin-left: 0; padding: 40px 24px; max-width: 100%; }
.why-us, .about-section { grid-template-columns: 1fr; padding: 40px 24px; }
.promo-section, .faq-grid, .products-grid { grid-template-columns: 1fr; padding-left: 24px; padding-right: 24px; }
.kitchen-banner { margin: 0 24px; padding: 40px 24px; grid-template-columns: 1fr; }
footer { grid-template-columns: 1fr 1fr; padding: 40px 24px; }
.products-section, .faq-section { padding: 40px 24px; }
.product-card.tall { grid-row: auto; }
}