public/report.html aktualisiert
This commit is contained in:
parent
d061668ab6
commit
165039824b
|
@ -5,7 +5,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="css/styles.css">
|
||||
<link rel="icon" type="image/png" href="img/Viper-plex-logo.png">
|
||||
<title>Viper-Plex - Meldung von Bugs und Funktionswünschen</title>
|
||||
<title id="web-title">${WEB_NAME}</title> <!-- Platzhalter für den Titel -->
|
||||
</head>
|
||||
<body>
|
||||
<div class="logo-container">
|
||||
|
@ -14,7 +14,7 @@
|
|||
</a>
|
||||
</div>
|
||||
<div class="welcome-box">
|
||||
<h1>Willkommen bei Viper-Plex</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>
|
||||
|
@ -66,6 +66,19 @@
|
|||
</footer>
|
||||
|
||||
<script>
|
||||
// Funktion, um die WEB_NAME-Variable abzurufen und einzufügen
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
fetch('/api/web-name')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
const webName = data.name;
|
||||
// Ersetze den Text im h1- und title-Tag
|
||||
document.getElementById('welcome-title').textContent = `Willkommen bei ${webName}`;
|
||||
document.getElementById('web-title').textContent = webName;
|
||||
})
|
||||
.catch(error => console.error('Fehler beim Abrufen des Web-Namens:', error));
|
||||
});
|
||||
|
||||
document.getElementById('report-form').addEventListener('submit', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
|
|
Loading…
Reference in New Issue