modified: app.py
modified: locales/de-DE.json modified: locales/en-EN.json new file: templates/gamemodes.html modified: templates/playlists.html
This commit is contained in:
4
app.py
4
app.py
@@ -294,5 +294,9 @@ def reset_quiz(playlist_id):
|
|||||||
return redirect(url_for('quiz', playlist_id=playlist_id, mode=next_mode))
|
return redirect(url_for('quiz', playlist_id=playlist_id, mode=next_mode))
|
||||||
return redirect(url_for('playlists'))
|
return redirect(url_for('playlists'))
|
||||||
|
|
||||||
|
@app.route("/gamemodes/<playlist_id>")
|
||||||
|
def gamemodes(playlist_id):
|
||||||
|
return render_template("gamemodes.html", playlist_id=playlist_id, translations=get_translations())
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app.run(host="0.0.0.0", port=5000, debug=True)
|
app.run(host="0.0.0.0", port=5000, debug=True)
|
||||||
|
|||||||
@@ -38,5 +38,7 @@
|
|||||||
"year": "Jahr",
|
"year": "Jahr",
|
||||||
"open_on_spotify": "Auf Spotify öffnen",
|
"open_on_spotify": "Auf Spotify öffnen",
|
||||||
"logout": "Abmelden",
|
"logout": "Abmelden",
|
||||||
"custom": "Anpassbar"
|
"custom": "Anpassbar",
|
||||||
|
"quiz_mode": "Quiz-Modus",
|
||||||
|
"quiz_mode_desc": "Errate Künstler, Titel oder Jahr. Klassisches Musik-Quiz."
|
||||||
}
|
}
|
||||||
@@ -38,5 +38,7 @@
|
|||||||
"year": "Year",
|
"year": "Year",
|
||||||
"open_on_spotify": "Open on Spotify",
|
"open_on_spotify": "Open on Spotify",
|
||||||
"logout": "Logout",
|
"logout": "Logout",
|
||||||
"custom": "custom"
|
"custom": "custom",
|
||||||
|
"quiz_mode": "Quiz Mode",
|
||||||
|
"quiz_mode_desc": "Guess artist, title or year. Classic music quiz."
|
||||||
}
|
}
|
||||||
76
templates/gamemodes.html
Normal file
76
templates/gamemodes.html
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>{{ translations['quiz_title'] }} – Game Modes</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background: linear-gradient(135deg, #191414 0%, #1DB954 100%);
|
||||||
|
color: #fff;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
min-height: 100vh;
|
||||||
|
margin: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.gamemode-container {
|
||||||
|
background: rgba(25, 20, 20, 0.92);
|
||||||
|
padding: 40px 50px;
|
||||||
|
border-radius: 22px;
|
||||||
|
box-shadow: 0 8px 32px 0 rgba(0,0,0,0.37);
|
||||||
|
min-width: 350px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.gamemode-btn {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
padding: 18px 0;
|
||||||
|
margin: 18px 0;
|
||||||
|
font-size: 1.2em;
|
||||||
|
font-weight: bold;
|
||||||
|
border-radius: 30px;
|
||||||
|
border: none;
|
||||||
|
background: #1DB954;
|
||||||
|
color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.2s, transform 0.2s;
|
||||||
|
text-align: center;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
.gamemode-btn:hover {
|
||||||
|
background: #1ed760;
|
||||||
|
transform: scale(1.04);
|
||||||
|
}
|
||||||
|
.gamemode-btn.disabled, .gamemode-btn[disabled] {
|
||||||
|
background: #535353;
|
||||||
|
color: #bbb;
|
||||||
|
cursor: not-allowed;
|
||||||
|
opacity: 0.7;
|
||||||
|
pointer-events: none;
|
||||||
|
border: 1px solid #888;
|
||||||
|
}
|
||||||
|
.gamemode-desc {
|
||||||
|
font-size: 0.95em;
|
||||||
|
color: #bdbdbd;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="gamemode-container">
|
||||||
|
<h2>{{ translations['quiz_title'] }} – Game Modes</h2>
|
||||||
|
<form method="get" action="{{ url_for('quiz', playlist_id=playlist_id) }}">
|
||||||
|
<button class="gamemode-btn" type="submit">{{ translations['quiz_mode'] if translations['quiz_mode'] else 'Quiz Mode' }}</button>
|
||||||
|
<div class="gamemode-desc">{{ translations['quiz_mode_desc'] if translations['quiz_mode_desc'] else 'Classic music quiz.' }}</div>
|
||||||
|
</form>
|
||||||
|
<button class="gamemode-btn disabled" disabled>Battle Mode</button>
|
||||||
|
<div class="gamemode-desc">Coming soon!</div>
|
||||||
|
<button class="gamemode-btn disabled" disabled>Party Mode</button>
|
||||||
|
<div class="gamemode-desc">Coming soon!</div>
|
||||||
|
<div style="margin-top:30px;">
|
||||||
|
<a href="{{ url_for('playlists') }}" style="color:#1DB954;">← {{ translations['choose_playlist'] }}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
<h2>{{ translations['choose_playlist'] }}</h2>
|
<h2>{{ translations['choose_playlist'] }}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{% for pl in playlists %}
|
{% for pl in playlists %}
|
||||||
<li><a class="playlist-link" href="/quiz/{{ pl.id }}">{{ pl.name }}</a></li>
|
<li><a class="playlist-link" href="/gamemodes/{{ pl.id }}">{{ pl.name }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user