feat: add dark theme and project attribution
This commit is contained in:
+24
-3
@@ -4,6 +4,18 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}Phone Store{% endblock %} — Интернет-магазин смартфонов</title>
|
||||
<script>
|
||||
(function () {
|
||||
try {
|
||||
const savedTheme = localStorage.getItem('phone-store-theme');
|
||||
const systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
document.documentElement.dataset.theme =
|
||||
savedTheme || (systemDark ? 'dark' : 'light');
|
||||
} catch (error) {
|
||||
document.documentElement.dataset.theme = 'light';
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
@@ -26,6 +38,15 @@
|
||||
<span class="cart-badge" id="cart-badge">{{ cart_count }}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
<button
|
||||
class="theme-toggle"
|
||||
id="theme-toggle"
|
||||
type="button"
|
||||
aria-label="Переключить тему"
|
||||
title="Переключить тему"
|
||||
>
|
||||
<span class="theme-icon" aria-hidden="true">☾</span>
|
||||
</button>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
@@ -55,11 +76,11 @@
|
||||
<div class="footer-content">
|
||||
<div class="footer-brand">
|
||||
<span class="logo-text">Phone<span class="logo-accent">Store</span></span>
|
||||
<p>Ваш надёжный магазин смартфонов</p>
|
||||
<p>Демонстрационный проект интернет-магазина</p>
|
||||
</div>
|
||||
<div class="footer-info">
|
||||
<p>© 2024 Phone Store. Учебный проект.</p>
|
||||
<p>Все цены указаны в рублях.</p>
|
||||
<p>© 2026 Ксения Судакова. Лицензия MIT.</p>
|
||||
<p>Товары и цены приведены только для демонстрации.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user