Files
homm/backend/templates/storefront/base.html
T
apuc a64d567cff Switch the demo catalog and copy to an electronics store
The shop sells tech, not clothing, so the demo data and page copy now
match that:

- seven categories: smartphones, laptops, tablets, audio, TVs, home
  appliances, accessories
- fifteen products with real-looking specs (screen, CPU, RAM, storage,
  energy class, warranty) instead of apparel attributes
- hero copy and meta description talk about tech and appliances
- banner updated in place by position/sort_order, so re-seeding does not
  leave a stale duplicate

Catalog polish:
- brand list and price range now follow the selected category instead of
  the whole catalog

Tests: storefront fixtures renamed to the tech domain; suite is 61
passing.
2026-11-22 22:46:56 +03:00

87 lines
3.5 KiB
HTML

{% load static storefront %}<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{{ site.site_name }}{% endblock %}</title>
<meta name="description" content="{% block description %}{{ site.site_name }} — магазин техники и электроники{% endblock %}">
{% block meta %}{% endblock %}
<link rel="stylesheet" href="{% static 'storefront/css/storefront.css' %}">
<meta name="csrf-token" content="{{ csrf_token }}">
</head>
<body>
<header class="site-header">
<div class="container">
<div class="header-top">
<a class="logo" href="{% url 'home' %}">HOMM<span>.</span></a>
<nav class="header-nav">
<a href="{% url 'catalog' %}">Каталог</a>
{% for category in menu_categories|slice:":5" %}
<a href="{% url 'catalog' %}?category={{ category.slug }}">{{ category.name }}</a>
{% endfor %}
</nav>
<div class="header-actions">
<a href="{% url 'account' %}" data-account-link>Кабинет</a>
<a href="{% url 'cart' %}">Корзина
<span class="cart-badge" data-cart-count hidden>0</span>
</a>
</div>
</div>
<div class="header-search">
<form action="{% url 'catalog' %}" method="get" role="search">
<input type="search" name="search" placeholder="Поиск по каталогу: название, артикул, бренд"
value="{{ filters.search|default:'' }}" aria-label="Поиск по каталогу">
<button class="btn" type="submit">Найти</button>
</form>
</div>
</div>
</header>
<main>
<div class="container">
{% block content %}{% endblock %}
</div>
</main>
<footer class="site-footer">
<div class="container">
<div class="footer-grid">
<div>
<h4>{{ site.site_name }}</h4>
{% if site.address %}<p>{{ site.address }}</p>{% endif %}
{% if site.phone %}<p><a href="tel:{{ site.phone }}">{{ site.phone }}</a></p>{% endif %}
{% if site.email %}<p><a href="mailto:{{ site.email }}">{{ site.email }}</a></p>{% endif %}
{% if site.working_hours %}<p>{{ site.working_hours }}</p>{% endif %}
</div>
<div>
<h4>Покупателям</h4>
<a href="{% url 'catalog' %}">Каталог</a>
<a href="{% url 'cart' %}">Корзина</a>
<a href="{% url 'account' %}">Личный кабинет</a>
{% for page in footer_pages %}
<a href="{% url 'page' page.slug %}">{{ page.title }}</a>
{% endfor %}
</div>
<div>
<h4>Связь</h4>
{% if site.telegram_url %}<a href="{{ site.telegram_url }}" rel="noopener">Telegram</a>{% endif %}
{% if site.vk_url %}<a href="{{ site.vk_url }}" rel="noopener">ВКонтакте</a>{% endif %}
{% if site.whatsapp_url %}<a href="{{ site.whatsapp_url }}" rel="noopener">WhatsApp</a>{% endif %}
{% if site.free_delivery_threshold %}
<p>Бесплатная доставка от {{ site.free_delivery_threshold|money }} ₽</p>
{% endif %}
</div>
</div>
<div class="footer-bottom">
<span>© {% now "Y" %} {{ site.site_name }}</span>
<span>Цены и наличие обновляются из 1С</span>
</div>
</div>
</footer>
<div class="toast-stack" data-toasts></div>
<script src="{% static 'storefront/js/site.js' %}" defer></script>
{% block scripts %}{% endblock %}
</body>
</html>