237 lines
9.6 KiB
Plaintext
237 lines
9.6 KiB
Plaintext
|
||
@{
|
||
var currentController = ViewContext.RouteData.Values["controller"]?.ToString();
|
||
var currentAction = ViewContext.RouteData.Values["action"]?.ToString();
|
||
}
|
||
|
||
@{
|
||
string ActiveClass(string controller, string action)
|
||
{
|
||
return (currentController == controller && currentAction == action) ? "nav-link--active" : "";
|
||
}
|
||
}
|
||
|
||
@inject TechnoWorld.Services.CartService CartService
|
||
|
||
<!DOCTYPE html>
|
||
<html lang="ru">
|
||
<head>
|
||
|
||
<meta charset="utf-8" />
|
||
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
|
||
|
||
<meta property="og:title" content="ТехноМир — Интернет-магазин техники" />
|
||
<meta property="og:description" content="Ноутбуки, смартфоны, планшеты и наушники по честным ценам" />
|
||
<meta property="og:type" content="website" />
|
||
<meta property="og:locale" content="ru_RU" />
|
||
|
||
|
||
<title>@(ViewData["Title"] ?? "ТехноМир") — ТехноМир</title>
|
||
|
||
|
||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
|
||
rel="stylesheet"
|
||
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YcnS/1p0KQLI8apkWKaIl2pCeM0oG6mDcK0h"
|
||
crossorigin="anonymous" />
|
||
|
||
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" />
|
||
|
||
|
||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
||
|
||
|
||
<link rel="icon" type="image/x-icon" href="~/favicon.ico" />
|
||
|
||
|
||
<script>
|
||
(function () {
|
||
var saved = localStorage.getItem('theme');
|
||
if (saved === 'dark') document.documentElement.setAttribute('data-theme', 'dark');
|
||
})();
|
||
</script>
|
||
</head>
|
||
|
||
<body>
|
||
|
||
|
||
|
||
<div class="topbar">
|
||
<div class="container topbar__inner">
|
||
|
||
<span class="topbar__item">
|
||
<i class="bi bi-telephone"></i> +7 (999) 123-45-67
|
||
</span>
|
||
<span class="topbar__item topbar__item--hide-mobile">
|
||
<i class="bi bi-clock"></i> Пн–Вс: 10:00–20:00
|
||
</span>
|
||
|
||
|
||
<div class="topbar__nav">
|
||
|
||
<a asp-controller="Home" asp-action="About">О системе</a>
|
||
<a asp-controller="Home" asp-action="Contacts">Контакты</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<header class="site-header">
|
||
<div class="container header-main">
|
||
|
||
<a class="navbar-brand" asp-controller="Home" asp-action="Index">
|
||
|
||
<span class="brand-badge"><i class="bi bi-lightning-charge-fill"></i></span>
|
||
<span>ТехноМир</span>
|
||
</a>
|
||
|
||
|
||
<form class="header-search" asp-controller="Catalog" asp-action="Index" method="get">
|
||
<input class="header-search__input" type="search" name="q"
|
||
placeholder="Найти: ноутбук, смартфон..." aria-label="Поиск" />
|
||
<button class="header-search__btn" type="submit" aria-label="Искать">
|
||
<i class="bi bi-search"></i>
|
||
</button>
|
||
</form>
|
||
|
||
|
||
<div class="header-actions">
|
||
|
||
<button id="themeToggle" class="theme-toggle"
|
||
type="button" title="Переключить тему" aria-label="Переключить тему">
|
||
<span id="themeIcon">☾</span>
|
||
</button>
|
||
|
||
@if (User.Identity?.IsAuthenticated == true)
|
||
{
|
||
<a asp-controller="Account" asp-action="Profile" class="header-action">
|
||
<i class="bi bi-person header-action__icon"></i>
|
||
<span class="header-action__label">@User.Identity.Name</span>
|
||
</a>
|
||
<form asp-controller="Account" asp-action="Logout" method="post" class="header-logout">
|
||
<button type="submit" class="header-action" title="Выйти" aria-label="Выйти">
|
||
<i class="bi bi-box-arrow-right header-action__icon"></i>
|
||
<span class="header-action__label">Выйти</span>
|
||
</button>
|
||
</form>
|
||
}
|
||
else
|
||
{
|
||
<a asp-controller="Account" asp-action="Login" class="header-action">
|
||
<i class="bi bi-person header-action__icon"></i>
|
||
<span class="header-action__label">Войти</span>
|
||
</a>
|
||
}
|
||
|
||
<a asp-controller="Cart" asp-action="Index" class="header-action">
|
||
<span class="header-action__badge-wrap">
|
||
<i class="bi bi-cart3 header-action__icon"></i>
|
||
<span class="header-action__count">@CartService.GetCount()</span>
|
||
</span>
|
||
<span class="header-action__label">Корзина</span>
|
||
</a>
|
||
</div>
|
||
</div>
|
||
</header>
|
||
|
||
|
||
|
||
<nav class="category-nav" aria-label="Категории товаров">
|
||
<div class="container category-nav__inner">
|
||
|
||
<a class="category-nav__all @ActiveClass("Catalog", "Index")"
|
||
asp-controller="Catalog" asp-action="Index">
|
||
<i class="bi bi-list"></i> Все товары
|
||
</a>
|
||
|
||
<a class="category-nav__link" asp-controller="Catalog" asp-action="Index" asp-route-category="Ноутбуки">Ноутбуки</a>
|
||
<a class="category-nav__link" asp-controller="Catalog" asp-action="Index" asp-route-category="Смартфоны">Смартфоны</a>
|
||
<a class="category-nav__link" asp-controller="Catalog" asp-action="Index" asp-route-category="Планшеты">Планшеты</a>
|
||
<a class="category-nav__link" asp-controller="Catalog" asp-action="Index" asp-route-category="Наушники">Наушники</a>
|
||
<a class="category-nav__link" asp-controller="Catalog" asp-action="Index" asp-route-category="Аксессуары">Аксессуары</a>
|
||
</div>
|
||
</nav>
|
||
|
||
|
||
<main class="site-main">
|
||
<div class="container">
|
||
@RenderBody()
|
||
</div>
|
||
</main>
|
||
|
||
|
||
|
||
<footer class="site-footer">
|
||
<div class="container">
|
||
<div class="row g-4">
|
||
|
||
<div class="col-lg-4 col-md-6">
|
||
<span class="footer-logo">
|
||
<span class="brand-badge"><i class="bi bi-lightning-charge-fill"></i></span>
|
||
<span>ТехноМир</span>
|
||
</span>
|
||
<p class="footer-desc">
|
||
Интернет-магазин техники: ноутбуки, смартфоны,
|
||
планшеты и наушники по честным ценам.
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="col-6 col-lg-2">
|
||
<h6 class="footer-heading">Разделы</h6>
|
||
<ul class="footer-links">
|
||
<li><a asp-controller="Home" asp-action="Index">Главная</a></li>
|
||
<li><a asp-controller="Catalog" asp-action="Index">Каталог</a></li>
|
||
<li><a asp-controller="Home" asp-action="About">О системе</a></li>
|
||
<li><a asp-controller="Home" asp-action="Contacts">Контакты</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="col-6 col-lg-3">
|
||
<h6 class="footer-heading">Каталог</h6>
|
||
<ul class="footer-links">
|
||
<li><a asp-controller="Catalog" asp-action="Index" asp-route-category="Ноутбуки">Ноутбуки</a></li>
|
||
<li><a asp-controller="Catalog" asp-action="Index" asp-route-category="Смартфоны">Смартфоны</a></li>
|
||
<li><a asp-controller="Catalog" asp-action="Index" asp-route-category="Планшеты">Планшеты</a></li>
|
||
<li><a asp-controller="Catalog" asp-action="Index" asp-route-category="Наушники">Наушники</a></li>
|
||
<li><a asp-controller="Catalog" asp-action="Index" asp-route-category="Аксессуары">Аксессуары</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="col-md-6 col-lg-3">
|
||
<h6 class="footer-heading">Контакты</h6>
|
||
<ul class="footer-links">
|
||
<li>+7 (999) 123-45-67</li>
|
||
<li>info@technomir.ru</li>
|
||
<li>г. Москва, ул. Примерная, д. 42</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="footer-bottom">
|
||
<span>© 2026 ТехноМир</span>
|
||
<span>Борисов Иван Сергеевич · РПО 23/1</span>
|
||
</div>
|
||
</div>
|
||
</footer>
|
||
|
||
|
||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
|
||
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
|
||
crossorigin="anonymous"></script>
|
||
|
||
|
||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||
|
||
|
||
@await RenderSectionAsync("Scripts", required: false)
|
||
</body>
|
||
</html>
|