103 lines
5.0 KiB
Plaintext
103 lines
5.0 KiB
Plaintext
@{
|
||
var currentAction = ViewContext.RouteData.Values["action"]?.ToString();
|
||
var currentController = ViewContext.RouteData.Values["controller"]?.ToString();
|
||
}
|
||
<!DOCTYPE html>
|
||
<html lang="ru">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
|
||
<title>@ViewData["Title"] - ТехноМаркет</title>
|
||
|
||
<link rel="icon" type="image/svg+xml" href="~/favicon.svg" />
|
||
|
||
<meta property="og:title" content="ТехноМаркет — интернет-магазин электроники" />
|
||
<meta property="og:description" content="Покупайте технику и электронику с гарантией и быстрой доставкой по всей стране." />
|
||
<meta property="og:type" content="website" />
|
||
|
||
<script>
|
||
(function () {
|
||
var theme = localStorage.getItem('techmarket-theme');
|
||
if (!theme) {
|
||
theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
||
}
|
||
document.documentElement.setAttribute('data-theme', theme);
|
||
})();
|
||
</script>
|
||
|
||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
||
</head>
|
||
<body>
|
||
<header>
|
||
<nav class="navbar navbar-expand-lg navbar-dark site-navbar">
|
||
<div class="container">
|
||
<a class="navbar-brand brand" asp-controller="Home" asp-action="Index">
|
||
<span class="brand-mark">Т</span> ТехноМаркет
|
||
</a>
|
||
|
||
<button class="navbar-toggler" type="button"
|
||
data-bs-toggle="collapse" data-bs-target="#mainMenu"
|
||
aria-controls="mainMenu" aria-expanded="false"
|
||
aria-label="Переключить меню">
|
||
<span class="navbar-toggler-icon"></span>
|
||
</button>
|
||
|
||
<div class="collapse navbar-collapse" id="mainMenu">
|
||
<ul class="navbar-nav ms-auto align-items-lg-center">
|
||
<li class="nav-item">
|
||
<a class="nav-link @(currentAction == "Index" && currentController == "Home" ? "active" : "")"
|
||
asp-controller="Home" asp-action="Index">Главная</a>
|
||
</li>
|
||
<li class="nav-item">
|
||
<a class="nav-link @(currentAction == "Catalog" ? "active" : "")"
|
||
asp-controller="Home" asp-action="Catalog">Каталог</a>
|
||
</li>
|
||
<li class="nav-item">
|
||
<a class="nav-link @(currentAction == "About" ? "active" : "")"
|
||
asp-controller="Home" asp-action="About">О системе</a>
|
||
</li>
|
||
<li class="nav-item">
|
||
<a class="nav-link @(currentAction == "Contacts" ? "active" : "")"
|
||
asp-controller="Home" asp-action="Contacts">Контакты</a>
|
||
</li>
|
||
|
||
<li class="nav-item">
|
||
<button type="button" class="btn theme-toggle" id="themeToggle"
|
||
aria-label="Переключить светлую и тёмную тему">
|
||
<svg class="icon-moon" width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
|
||
<path d="M12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.39 5.39 0 0 1-4.4 2.26 5.4 5.4 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z" />
|
||
</svg>
|
||
<svg class="icon-sun" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
||
<circle cx="12" cy="12" r="4" />
|
||
<path d="M12 2v2m0 16v2M4.9 4.9l1.4 1.4m11.4 11.4 1.4 1.4M2 12h2m16 0h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4" />
|
||
</svg>
|
||
</button>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
</header>
|
||
|
||
<main class="page-main">
|
||
<div class="container">
|
||
@RenderBody()
|
||
</div>
|
||
</main>
|
||
|
||
<footer class="site-footer">
|
||
<div class="container">
|
||
<span class="site-footer__project">ТехноМаркет — учебный проект</span>
|
||
<span class="site-footer__author">Группа РПО 23/1 · Рыбалов Кирилл Андреевич · 2026</span>
|
||
</div>
|
||
</footer>
|
||
|
||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||
|
||
@await RenderSectionAsync("Scripts", required: false)
|
||
</body>
|
||
</html> |