public/anleitung.html aktualisiert

This commit is contained in:
M_Viper 2024-10-18 23:52:42 +00:00
parent 9ddafba151
commit 909f95b0ab
1 changed files with 91 additions and 120 deletions

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/anleitung.css"> <link rel="stylesheet" href="css/anleitung.css">
<link rel="icon" type="image/png" href="img/Viper-plex-logo.png"> <link rel="icon" type="image/png" href="img/Viper-plex-logo.png">
<title>Anleitung - Viper-Plex</title> <title id="web-title">${WEB_NAME}</title> <!-- Platzhalter für den Titel -->
</head> </head>
<body> <body>
<!-- Logo separat einfügen --> <!-- Logo separat einfügen -->
@ -15,7 +15,7 @@
</a> </a>
</div> </div>
<div class="welcome-box"> <div class="welcome-box">
<h1>Anleitung zum Plex Telegram-Bot</h1> <h1 id="welcome-title">${WEB_NAME}</h1> <!-- ID für das h1-Tag -->
<nav class="navbar"> <nav class="navbar">
<div class="navbar-container"> <div class="navbar-container">
<a href="index.html" class="navbar-link">Home</a> <a href="index.html" class="navbar-link">Home</a>
@ -83,38 +83,9 @@
</div> </div>
<footer class="footer"> <footer class="footer">
<p>&copy; 2024 Viper-Plex. Alle Rechte vorbehalten.</p> <p>&copy; 2024 M_Viper. Alle Rechte vorbehalten.</p>
</footer> </footer>
<script> <script src="js/script.js"></script>
// Darkmode umschalten
const toggle = document.getElementById('dark-mode-toggle');
const darkModeEnabled = localStorage.getItem('darkMode') === 'true';
toggle.checked = darkModeEnabled;
if (darkModeEnabled) {
document.body.classList.add('dark-mode');
}
toggle.addEventListener('change', () => {
const isChecked = toggle.checked;
document.body.classList.toggle('dark-mode', isChecked);
localStorage.setItem('darkMode', isChecked);
});
// Funktion, um die Umgebungsvariablen abzurufen
const fetchEnvVariables = async () => {
const response = await fetch('/api/env');
const data = await response.json();
document.getElementById('bot-alias').textContent = data.botAlias;
document.getElementById('telegram-link').href = data.telegramLink;
};
// Umgebungsvariablen beim Laden der Seite abrufen
window.onload = () => {
fetchEnvVariables();
fetchMovies(); // Hier kannst du auch die Filme abrufen, falls nötig
};
</script>
</body> </body>
</html> </html>