modified: templates/quiz.html
This commit is contained in:
@@ -277,17 +277,17 @@
|
||||
.then(data => {
|
||||
const resultContainer = document.getElementById('resultContainer');
|
||||
resultContainer.style.display = 'block';
|
||||
|
||||
|
||||
if (data.correct) {
|
||||
resultContainer.className = 'result-container correct';
|
||||
resultContainer.innerHTML = `<h3>Richtig! 🎉</h3>`;
|
||||
resultContainer.innerHTML = `<h3>${i18n.correct}</h3>`;
|
||||
} else {
|
||||
resultContainer.className = 'result-container incorrect';
|
||||
resultContainer.innerHTML = `<h3>Falsch 😢</h3>
|
||||
<p>Die richtige Antwort ist: <strong>${data.correct_answer}</strong></p>`;
|
||||
resultContainer.innerHTML = `<h3>${i18n.wrong}</h3>
|
||||
<p>${i18n.right_answer} <strong>${data.correct_answer}</strong></p>`;
|
||||
}
|
||||
|
||||
// Song-Infos ergänzen (du müsstest sie ggf. aus dem Backend mitgeben)
|
||||
|
||||
// Song-Infos ergänzen
|
||||
resultContainer.innerHTML += `
|
||||
<div style="margin-top:10px;">
|
||||
<img src="{{ track.album.images[0].url }}" alt="Cover" style="width:80px;border-radius:8px;"><br>
|
||||
@@ -298,7 +298,7 @@
|
||||
<a href="{{ track.external_urls.spotify }}" target="_blank" style="color:#1DB954;">${i18n.open_on_spotify}</a>
|
||||
</div>
|
||||
`;
|
||||
|
||||
|
||||
// Zeige den "Nächste Frage" Button
|
||||
document.getElementById('nextQuestionBtn').style.display = 'inline-block';
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user