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">
<link rel="stylesheet" href="css/anleitung.css">
<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>
<body>
<!-- Logo separat einfügen -->
@ -15,7 +15,7 @@
</a>
</div>
<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">
<div class="navbar-container">
<a href="index.html" class="navbar-link">Home</a>
@ -83,38 +83,9 @@
</div>
<footer class="footer">
<p>&copy; 2024 Viper-Plex. Alle Rechte vorbehalten.</p>
<p>&copy; 2024 M_Viper. Alle Rechte vorbehalten.</p>
</footer>
<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>
<script src="js/script.js"></script>
</body>
</html>