151 lines
7.1 KiB
HTML
151 lines
7.1 KiB
HTML
{{define "home.html"}}
|
||
<!DOCTYPE html>
|
||
<html lang="ru">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>{{.Title}}</title>
|
||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||
<link rel="stylesheet" href="/static/css/style.css">
|
||
</head>
|
||
<body>
|
||
<header class="header">
|
||
<div class="container header__inner">
|
||
<a href="/" class="logo">
|
||
<span class="logo__icon">◆</span>
|
||
<span class="logo__text">Shop</span>
|
||
</a>
|
||
<nav class="nav">
|
||
<a href="#catalog" class="nav__link">Каталог</a>
|
||
<a href="#categories" class="nav__link">Категории</a>
|
||
<a href="#delivery" class="nav__link">Доставка</a>
|
||
</nav>
|
||
<div class="header__actions">
|
||
<button class="btn btn--ghost" aria-label="Поиск">
|
||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>
|
||
</button>
|
||
<button class="btn btn--primary">
|
||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"/><line x1="3" y1="6" x2="21" y2="6"/><path d="M16 10a4 4 0 0 1-8 0"/></svg>
|
||
Корзина
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</header>
|
||
|
||
<section class="hero">
|
||
<div class="container hero__inner">
|
||
<div class="hero__content">
|
||
<span class="badge">Новая коллекция 2026</span>
|
||
<h1 class="hero__title">Всё лучшее —<br>в одном магазине</h1>
|
||
<p class="hero__text">Электроника, одежда, дом и сад. Быстрая доставка по всей стране, гарантия качества и удобная оплата.</p>
|
||
<div class="hero__cta">
|
||
<a href="#catalog" class="btn btn--primary btn--lg">Смотреть каталог</a>
|
||
<a href="#delivery" class="btn btn--outline btn--lg">Условия доставки</a>
|
||
</div>
|
||
</div>
|
||
<div class="hero__visual">
|
||
<div class="hero__card hero__card--1">
|
||
<span class="hero__card-label">Бесплатная доставка</span>
|
||
<span class="hero__card-value">от 3 000 ₽</span>
|
||
</div>
|
||
<div class="hero__card hero__card--2">
|
||
<span class="hero__card-label">Товаров в каталоге</span>
|
||
<span class="hero__card-value">10 000+</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
{{if .Categories}}
|
||
<section id="categories" class="section">
|
||
<div class="container">
|
||
<h2 class="section__title">Популярные категории</h2>
|
||
<div class="categories">
|
||
{{range .Categories}}
|
||
<a href="#catalog" class="category-card">
|
||
<span class="category-card__name">{{.Name}}</span>
|
||
<span class="category-card__count">{{.Count}} товаров</span>
|
||
</a>
|
||
{{end}}
|
||
</div>
|
||
</div>
|
||
</section>
|
||
{{end}}
|
||
|
||
<section id="catalog" class="section section--alt">
|
||
<div class="container">
|
||
<div class="section__header">
|
||
<h2 class="section__title">Популярные товары</h2>
|
||
<a href="#" class="link">Весь каталог →</a>
|
||
</div>
|
||
<div class="products">
|
||
{{range .Products}}
|
||
<article class="product-card">
|
||
<div class="product-card__image">
|
||
<img src="{{.ImageURL}}" alt="{{.Name}}" loading="lazy">
|
||
<span class="product-card__badge">{{.Category}}</span>
|
||
</div>
|
||
<div class="product-card__body">
|
||
<h3 class="product-card__title">{{.Name}}</h3>
|
||
<p class="product-card__desc">{{.Description}}</p>
|
||
<div class="product-card__footer">
|
||
<span class="product-card__price">{{printf "%.0f" .Price}} ₽</span>
|
||
<button class="btn btn--primary btn--sm">В корзину</button>
|
||
</div>
|
||
</div>
|
||
</article>
|
||
{{else}}
|
||
<p class="empty">Товары скоро появятся в каталоге.</p>
|
||
{{end}}
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<section id="delivery" class="section">
|
||
<div class="container">
|
||
<h2 class="section__title">Почему выбирают нас</h2>
|
||
<div class="features">
|
||
<div class="feature">
|
||
<div class="feature__icon">🚚</div>
|
||
<h3 class="feature__title">Быстрая доставка</h3>
|
||
<p class="feature__text">Доставим заказ за 1–3 дня в любой город России</p>
|
||
</div>
|
||
<div class="feature">
|
||
<div class="feature__icon">🔒</div>
|
||
<h3 class="feature__title">Безопасная оплата</h3>
|
||
<p class="feature__text">Карты, СБП и оплата при получении</p>
|
||
</div>
|
||
<div class="feature">
|
||
<div class="feature__icon">↩️</div>
|
||
<h3 class="feature__title">Лёгкий возврат</h3>
|
||
<p class="feature__text">14 дней на возврат без лишних вопросов</p>
|
||
</div>
|
||
<div class="feature">
|
||
<div class="feature__icon">💬</div>
|
||
<h3 class="feature__title">Поддержка 24/7</h3>
|
||
<p class="feature__text">Ответим на любой вопрос в чате или по телефону</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<footer class="footer">
|
||
<div class="container footer__inner">
|
||
<div class="footer__brand">
|
||
<span class="logo__icon">◆</span>
|
||
<span class="logo__text">Shop</span>
|
||
<p class="footer__copy">© 2026 Shop. Все права защищены.</p>
|
||
</div>
|
||
<div class="footer__links">
|
||
<a href="#">О компании</a>
|
||
<a href="#">Контакты</a>
|
||
<a href="#">Политика конфиденциальности</a>
|
||
</div>
|
||
</div>
|
||
</footer>
|
||
</body>
|
||
</html>
|
||
{{end}}
|