public/kontakt.html aktualisiert
This commit is contained in:
parent
4f057c0129
commit
65cf86fa9b
|
@ -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/styles.css">
|
<link rel="stylesheet" href="css/styles.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>Kontakt - 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>Kontakt</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>
|
||||||
|
@ -46,36 +46,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<p>© 2024 Viper-Plex. Alle Rechte vorbehalten.</p>
|
<p>© 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);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Kontaktinformationen aus .env abrufen
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
|
||||||
fetch('/api/contact-info') // API-Endpunkt zum Abrufen der Kontaktinformationen
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => {
|
|
||||||
document.getElementById('contact-email').href = `mailto:${data.email}`;
|
|
||||||
document.getElementById('contact-email').textContent = data.email;
|
|
||||||
document.getElementById('contact-telegram').href = data.telegram;
|
|
||||||
document.getElementById('contact-telegram').textContent = data.telegram.split('/').pop(); // Extrahiere den Benutzernamen aus der URL
|
|
||||||
})
|
|
||||||
.catch(error => console.error('Fehler beim Abrufen der Kontaktinformationen:', error));
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue