1
0
Fork 0
mirror of https://github.com/EDeev/tablo.git synced 2026-10-07 20:49:31 +03:00
tablo/app/templates/base.html
2026-05-19 13:49:09 +03:00

103 lines
5.6 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
<link rel="icon" href="{{ url_for('static', filename='favicon.svg') }}" type="image/svg+xml">
<title>{% block title %}Расписание{% endblock %}</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="{{ url_for('static', filename='css/base.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/nav.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/components.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/schedule.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/subjects.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/metrics/_base.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/metrics/_checkpoints.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/metrics/_progress_bar.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/metrics/_counter.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/metrics/_stages.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/metrics/_checklist.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/metrics/_attendance.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/metrics/_grades.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/metrics/_deadlines.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/metrics/_streak.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/metrics/_effort_hours.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/metrics/_rating_history.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/forms.css') }}">
<script>document.documentElement.dataset.theme=localStorage.getItem('tablo-theme')||'dark';</script>
</head>
<body>
<nav class="t-nav">
<a class="t-brand" href="{{ url_for('schedules.profile') }}">
<span class="t-brand-tab">tab</span><span class="t-brand-lo">lo</span>
</a>
{% if current_user.is_authenticated %}
<span class="t-nav-user">{{ current_user.login }}</span>
{% endif %}
<div class="t-nav-r">
{% block nav_extra %}{% endblock %}
<button type="button" class="t-btn-icon t-theme-toggle" id="theme-toggle" title="Переключить тему" aria-label="Переключить тему">
<svg class="t-icon-sun" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg>
<svg class="t-icon-moon" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>
</button>
{% if current_user.is_authenticated %}
<a class="t-btn t-btn-outline" href="{{ url_for('schedules.upload') }}">
<svg width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
Новое
</a>
<a class="t-btn t-btn-ghost" href="{{ url_for('auth.logout') }}">Выйти</a>
{% else %}
<a class="t-btn t-btn-outline" href="{{ url_for('auth.login') }}">Войти</a>
<a class="t-btn t-btn-primary" href="{{ url_for('auth.register') }}">Регистрация</a>
{% endif %}
</div>
</nav>
<div class="t-page">
{% with messages = get_flashed_messages(with_categories=true) %}
{% for category, message in messages %}
<div class="t-alert t-alert-{{ category }}">
{{ message }}
<button type="button" class="t-alert-close" onclick="this.parentElement.remove()">×</button>
</div>
{% endfor %}
{% endwith %}
{% block content %}{% endblock %}
</div>
<footer class="t-footer">
<a href="https://tablo.deev.su" class="t-footer-brand">
<span class="t-brand-tab">tab</span><span class="t-brand-lo">lo</span>
</a>
<span class="t-footer-sep">·</span>
<a href="https://tablo.deev.su" class="t-footer-link">tablo.deev.su</a>
<span class="t-footer-sep">·</span>
<span>Project by Deev Egor © 2026</span>
</footer>
<meta name="csrf-token" content="{{ csrf_token() }}">
<script src="{{ url_for('static', filename='js/core.js') }}"></script>
<script>
(function () {
const saved = localStorage.getItem('tablo-theme') || 'dark';
document.documentElement.dataset.theme = saved;
document.addEventListener('DOMContentLoaded', () => {
const btn = document.getElementById('theme-toggle');
if (!btn) return;
function applyTheme(t) {
document.documentElement.dataset.theme = t;
localStorage.setItem('tablo-theme', t);
}
btn.addEventListener('click', () => {
applyTheme(document.documentElement.dataset.theme === 'dark' ? 'light' : 'dark');
});
});
})();
</script>
{% block scripts %}{% endblock %}
</body>
</html>