redactor
This commit is contained in:
@@ -5,46 +5,7 @@
|
||||
{% endblock %}
|
||||
{% block breadcrumb %}<nav aria-label="breadcrumb" class="mb-3"><ol class="breadcrumb mb-0"><li class="breadcrumb-item"><a href="{{ url_for('main.index') }}"><i class="bi bi-house"></i></a></li><li class="breadcrumb-item active" aria-current="page">Edytor</li></ol></nav>{% endblock %}
|
||||
{% block content %}
|
||||
<header class="header1" id="header1">
|
||||
<a href="/home" style="text-decoration: none;">
|
||||
<h3 style="font-size: 22px;" class="logo">
|
||||
<i style="margin: 8px;" class="fas fa-globe"></i>Haproxy Configurator
|
||||
</h3>
|
||||
</a>
|
||||
<a href="/home" class="menu-link">Home</a>
|
||||
<a href="/" class="menu-link">Add Frontend & Backend</a>
|
||||
<a href="/edit" class="menu-link">Edit HAProxy Config</a>
|
||||
<a href="/logs" class="menu-link">Security Events</a>
|
||||
<a href="/statistics" class="menu-link">Statictics</a>
|
||||
<a href="http://{{ request.host.split(':')[0] }}:8404/stats" class="menu-link" target="_blank">HAProxy Stats</a>
|
||||
|
||||
<div class="custom-control custom-switch ml-auto">
|
||||
<input type="checkbox" class="custom-control-input" id="darkModeSwitch">
|
||||
<label class="custom-control-label" for="darkModeSwitch">Dark Mode</label>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
// Function to toggle dark mode
|
||||
function toggleDarkMode() {
|
||||
const body = document.body;
|
||||
body.classList.toggle('dark-mode');
|
||||
|
||||
// Save user's preference to localStorage
|
||||
const isDarkMode = body.classList.contains('dark-mode');
|
||||
localStorage.setItem('darkMode', isDarkMode); // Store the actual value
|
||||
}
|
||||
|
||||
// Check if dark mode preference is saved in localStorage
|
||||
const savedDarkMode = localStorage.getItem('darkMode');
|
||||
if (savedDarkMode === 'true') {
|
||||
document.body.classList.add('dark-mode');
|
||||
}
|
||||
|
||||
// Add event listener to the switch
|
||||
const darkModeSwitch = document.getElementById('darkModeSwitch');
|
||||
darkModeSwitch.addEventListener('change', toggleDarkMode);
|
||||
</script>
|
||||
</header>
|
||||
<div style=" border-radius: 5px;" id="editor_container" class="container mt-5">
|
||||
<h3 style="color: grey; padding: 15px;" id="edit_conf" class="edit_conf">Edit HAProxy Config</h3>
|
||||
@@ -82,9 +43,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Add Bootstrap JS and jQuery scripts here (if needed) -->
|
||||
<!-- You can get them from the official Bootstrap website or use CDN links -->
|
||||
<!-- Footer -->
|
||||
<footer>
|
||||
<p>© 2025 HAProxy Configurator. All rights reserved.</p>
|
||||
</footer>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user