2025-02-26 14:29:36 +01:00

295 lines
10 KiB
HTML
Raw 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="pl">
<head>
<meta charset="utf-8">
<title>{% block title %}RouterOS Update{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body.dark-mode {
background-color: #2b2b2b;
color: #cccccc;
}
body.dark-mode .navbar {
background-color: #201f1f !important;
color: #ffffff;
}
/* Nazwa aplikacji */
body.dark-mode .navbar .navbar-brand {
color: #ffffff !important;
}
body.dark-mode .navbar .nav-link {
color: #ffffff !important;
}
/* Dropdown */
body.dark-mode .dropdown-menu {
background-color: #262626;
color: #cccccc;
border: 1px solid #555;
}
body.dark-mode .dropdown-menu a {
color: #cccccc !important;
}
body.dark-mode .dropdown-menu a:hover {
background-color: #333333;
}
/* Przycisk zmiany hasła */
body.dark-mode .btn-outline-light {
color: #ffffff;
border-color: #ffffff;
}
body.dark-mode .btn-outline-light:hover {
color: #ffffff;
background-color: #333333;
border-color: #333333;
}
/* Stopka - poprawa czytelności tekstu */
body.dark-mode .footer {
background-color: #262626;
}
body.dark-mode .footer .text-muted {
color: #ffffff !important;
}
body.light-mode .navbar {
background-color: #f8f9fa !important;
color: #000;
}
body.light-mode .navbar .nav-link {
color: #000 !important;
}
body.light-mode .footer {
background-color: #f8f9fa;
color: #000;
}
/* Tabele w trybie ciemnym */
body.dark-mode table {
background-color: #1a1a1a;
color: #cccccc;
}
body.dark-mode table thead {
background-color: #333333;
}
/* Pola formularzy (globalnie oraz w tabelach) */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select,
body.dark-mode table input,
body.dark-mode table textarea,
body.dark-mode table select {
background-color: #1a1a1a;
color: #cccccc;
border: 1px solid #555;
}
body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus,
body.dark-mode table input:focus,
body.dark-mode table textarea:focus,
body.dark-mode table select:focus {
background-color: #1a1a1a;
color: #cccccc;
border-color: #777;
}
/* VanillaDataTables (logi) w trybie ciemnym */
body.dark-mode .dataTable-wrapper input,
body.dark-mode .dataTable-wrapper select,
body.dark-mode .dataTable-wrapper .dataTable-info,
body.dark-mode .dataTable-wrapper .dataTable-pagination {
background-color: #1a1a1a;
color: #cccccc;
border-color: #555;
}
body.dark-mode .dataTable-wrapper .dataTable-pagination a {
color: #cccccc !important;
background-color: #1a1a1a;
border-color: #555;
}
body.dark-mode .dataTable-wrapper .dataTable-pagination a.active {
background-color: #333333;
border-color: #333333;
}
/* Stylizacja komórek tabeli */
body.dark-mode table td {
background-color: #1a1a1a !important;
color: #cccccc !important;
}
/* Pola formularzy upewniamy się, że tekst wpisywany ma jasny kolor */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select,
body.dark-mode table input,
body.dark-mode table textarea,
body.dark-mode table select {
background-color: #1a1a1a !important;
color: #cccccc !important;
border: 1px solid #555 !important;
}
body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus,
body.dark-mode table input:focus,
body.dark-mode table textarea:focus,
body.dark-mode table select:focus {
background-color: #1a1a1a !important;
color: #cccccc !important;
border-color: #777 !important;
}
/* Placeholder w trybie ciemnym */
body.dark-mode ::placeholder {
color: #cccccc !important;
opacity: 1;
}
/* Breadcrumb active - elementy aktywne nawigacji */
body.dark-mode .breadcrumb-item.active {
color: #cccccc !important;
}
/* Klasa .text-muted w trybie ciemnym */
body.dark-mode .text-muted {
color: #cccccc !important;
}
/* Dostosowanie nagłówka kart typu bg-light (np. "Ostatnie zdarzenia") */
body.dark-mode .card-header.bg-light {
background-color: #333333 !important;
color: #cccccc !important;
}
body.dark-mode .list-group.list-group-flush .list-group-item {
background-color: #141414 !important;
color: #cccccc;
border-bottom: 1px solid #333333;
}
</style>
{% block extra_head %}{% endblock %}
</head>
<body class="d-flex flex-column min-vh-100">
<nav class="navbar navbar-expand-lg">
<div class="container-fluid">
<a href="{{ url_for('index') }}" class="navbar-brand">RouterOS Update</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent" aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarContent">
{% if current_user.is_authenticated %}
<ul class="navbar-nav me-auto">
<li class="nav-item">
<a class="nav-link" href="{{ url_for('dashboard') }}">Dashboard</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="devicesDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Urządzenia
</a>
<ul class="dropdown-menu" aria-labelledby="devicesDropdown">
<li><a class="dropdown-item" href="{{ url_for('devices') }}">Lista</a></li>
<li><a class="dropdown-item" href="{{ url_for('add_device') }}">Dodaj nowe</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('logs') }}">Logi</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('update_history') }}">Historia aktualizacji</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('anomalies') }}">Anomalie</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('settings') }}">Ustawienia</a>
</li>
</ul>
<ul class="navbar-nav ms-auto align-items-center">
<li class="nav-item me-2">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="darkModeToggle">
<label class="form-check-label" for="darkModeToggle">Tryb ciemny</label>
</div>
</li>
<li class="nav-item">
<a class="nav-link btn btn-outline-light ms-2" href="{{ url_for('change_password') }}">Zmień hasło</a>
</li>
<li class="nav-item">
<a class="nav-link btn btn-danger ms-2" href="{{ url_for('logout') }}">Wyloguj</a>
</li>
</ul>
{% endif %}
</div>
</div>
</nav>
<main class="container my-4 flex-fill">
{% block content %}{% endblock %}
</main>
<footer class="footer py-3 mt-auto">
<div class="container text-center">
<span class="text-muted">&copy; 2025 Mateusz Gruszczyński, linuxiarz.pl</span>
</div>
</footer>
<!-- Bootstrap JS (bundle z Popper) -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
const darkModeToggle = document.getElementById('darkModeToggle');
function updateTheme() {
if (localStorage.getItem("darkMode") === "enabled") {
document.body.classList.add("dark-mode");
document.body.classList.remove("light-mode");
darkModeToggle.checked = true;
} else {
document.body.classList.add("light-mode");
document.body.classList.remove("dark-mode");
darkModeToggle.checked = false;
}
}
darkModeToggle.addEventListener('change', function() {
if (this.checked) {
localStorage.setItem("darkMode", "enabled");
} else {
localStorage.setItem("darkMode", "disabled");
}
updateTheme();
});
updateTheme();
});
</script>
<script>
document.addEventListener('DOMContentLoaded', function() {
const darkModeToggle = document.getElementById('darkModeToggle');
function updateTheme() {
if (localStorage.getItem("darkMode") === "enabled") {
document.body.classList.add("dark-mode");
document.body.classList.remove("light-mode");
darkModeToggle.checked = true;
} else {
document.body.classList.add("light-mode");
document.body.classList.remove("dark-mode");
darkModeToggle.checked = false;
}
updatePrismTheme();
}
function updatePrismTheme() {
const prismLink = document.getElementById('prism-style');
if (prismLink) {
if (localStorage.getItem("darkMode") === "enabled") {
prismLink.setAttribute('href', 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-okaidia.min.css');
} else {
prismLink.setAttribute('href', 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-coy.min.css');
}
}
}
darkModeToggle.addEventListener('change', function() {
if (this.checked) {
localStorage.setItem("darkMode", "enabled");
} else {
localStorage.setItem("darkMode", "disabled");
}
updateTheme();
});
updateTheme();
});
</script>
{% block extra_scripts %}{% endblock %}
</body>
</html>