97 lines
5.4 KiB
HTML
97 lines
5.4 KiB
HTML
<?php
|
|
/**
|
|
* @package Bicycle
|
|
* @description layout.html — главный шаблон сайта. Навигация — прямая разметка здесь,
|
|
* не строится из PHP-массива в контроллере (см. CLAUDE.md → Controller hierarchy).
|
|
*
|
|
* @var string $content Содержимое страницы
|
|
*/
|
|
|
|
use Services\Auth;
|
|
use System\Classes\ProfilerToolbar;
|
|
|
|
$auth_user = Auth::instance()->getUser();
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Бюджет</title>
|
|
<link rel="stylesheet" href="/vendor/twbs/bootstrap/dist/css/bootstrap.min.css">
|
|
<link rel="stylesheet" href="/vendor/twbs/bootstrap-icons/font/bootstrap-icons.css">
|
|
<link rel="stylesheet" href="/App/media/css/fonts.css">
|
|
<link rel="stylesheet" href="/App/media/css/dashboard.css">
|
|
<?php $this->getStyles(); ?>
|
|
</head>
|
|
<body>
|
|
<svg width="0" height="0" style="position:absolute">
|
|
<defs>
|
|
<symbol id="ic-home" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M3 10.5 12 3l9 7.5"/>
|
|
<path d="M5 9.5V20a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1V9.5"/>
|
|
</symbol>
|
|
<symbol id="ic-card" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<rect x="2" y="5" width="20" height="14" rx="2"/>
|
|
<line x1="2" y1="10" x2="22" y2="10"/>
|
|
</symbol>
|
|
<symbol id="ic-tag" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M12 2 2 12l9 9 11-11V2Z"/>
|
|
<circle cx="7.5" cy="7.5" r="1.5"/>
|
|
</symbol>
|
|
<symbol id="ic-swap" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M7 7h11l-3-3"/>
|
|
<path d="M17 17H6l3 3"/>
|
|
</symbol>
|
|
<symbol id="ic-target" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<circle cx="12" cy="12" r="9"/>
|
|
<circle cx="12" cy="12" r="5"/>
|
|
<circle cx="12" cy="12" r="1.5"/>
|
|
</symbol>
|
|
<symbol id="ic-chart" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<line x1="4" y1="20" x2="20" y2="20"/>
|
|
<rect x="6" y="12" width="3" height="8"/>
|
|
<rect x="13" y="7" width="3" height="13"/>
|
|
</symbol>
|
|
<symbol id="ic-analytics" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<polyline points="3 17 9 11 13 15 21 7"/>
|
|
<polyline points="14 7 21 7 21 14"/>
|
|
</symbol>
|
|
<symbol id="ic-gear" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<circle cx="12" cy="12" r="3"/>
|
|
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06A2 2 0 1 1 7.04 4.29l.06.06A1.65 1.65 0 0 0 8.92 4.68 1.65 1.65 0 0 0 9.93 3.17V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.32 9c.14.36.4.66.74.85.34.19.72.27 1.09.24H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/>
|
|
</symbol>
|
|
<symbol id="ic-logout" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/>
|
|
<polyline points="16 17 21 12 16 7"/>
|
|
<line x1="21" y1="12" x2="9" y2="12"/>
|
|
</symbol>
|
|
</defs>
|
|
</svg>
|
|
<?php if ($auth_user !== null): ?>
|
|
<a href="/login/logout" title="Выйти (<?= htmlspecialchars($auth_user['login'], ENT_QUOTES, 'UTF-8') ?>)"
|
|
style="position:fixed;top:1rem;right:1rem;z-index:30;color:#85858f;">
|
|
<svg style="width:1.3rem;height:1.3rem;"><use href="#ic-logout"/></svg>
|
|
</a>
|
|
<?php endif; ?>
|
|
<main>
|
|
<?= $content ?>
|
|
</main>
|
|
<?php if ($auth_user !== null): ?>
|
|
<nav class="dock">
|
|
<a href="/" class="dock-item active" title="Дашборд"><svg class="ico"><use href="#ic-home"/></svg></a>
|
|
<a href="/budgets" class="dock-item" title="Бюджет"><svg class="ico"><use href="#ic-chart"/></svg></a>
|
|
<div class="dock-item" title="Транзакции"><svg class="ico"><use href="#ic-swap"/></svg></div>
|
|
<div class="dock-item" title="Аналитика"><svg class="ico"><use href="#ic-analytics"/></svg></div>
|
|
<div class="dock-item" title="Настройки"><svg class="ico"><use href="#ic-gear"/></svg></div>
|
|
</nav>
|
|
<?php endif; ?>
|
|
<script src="/vendor/components/jquery/jquery.min.js"></script>
|
|
<script src="/vendor/twbs/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
|
<?php $this->getScripts(); ?>
|
|
<?php if($auth_user['login'] === 'mikrit1'){ ?>
|
|
<?= ProfilerToolbar::render() ?>
|
|
<?php } ?>
|
|
</body>
|
|
</html>
|