feat: 🚧 Create base page for roomID selection
This commit is contained in:
@ -1,28 +1,64 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Fête de la musique</title>
|
||||
{{ bootstrap.load_css() }}
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<form method="POST">
|
||||
<div class="form-group">
|
||||
<div class="form-inline text-center">
|
||||
<label>Enter here the music that you want:</label>
|
||||
<label>
|
||||
<input type="text" name="search" class="form-control" />
|
||||
</label>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Fête de la musique</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
{{ bootstrap.load_css() }}
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Make this playlist</h1>
|
||||
<p>You too, choose the music that will play tonight.</p>
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<h2>Join a room</h2>
|
||||
<form method="POST" >
|
||||
<div class="form-group">
|
||||
<label for="roomID">Enter here the room id:</label>
|
||||
<input type="text" class="form-control" name="roomID" placeholder="00000000" maxlength="8" minlength="8" />
|
||||
<small id="roomIDHelp" class="form-text text-muted">If you don't have a room id, you can create one.</small>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Join</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<h2>Create a room</h2>
|
||||
<form method="POST" action="/create">
|
||||
<div class="form-group">
|
||||
<label for="roomName">Enter here the room name:</label>
|
||||
<input type="text" class="form-control" name="roomName" placeholder="Room name" />
|
||||
<small id="roomNameHelp" class="form-text text-muted">This will be the playlist name</small>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success">Create (require a Spotify account)</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<input type="submit" value="Submit" class="btn btn-primary">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
<div class="sweetalert">
|
||||
<script>
|
||||
if ("{{ type }}" !== "") {
|
||||
if ("{{ type }}" === "success") {
|
||||
Swal.fire({
|
||||
title: "{{ response }}",
|
||||
text: "{{ comment }}",
|
||||
icon: "{{ type }}",
|
||||
confirmButtonText: "Join another room",
|
||||
}).then(function() {
|
||||
window.location = "/search/{{ roomid }}";
|
||||
})
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: "{{ response }}",
|
||||
text: "{{ comment }}",
|
||||
icon: "{{ type }}",
|
||||
confirmButtonText: "Try again",
|
||||
}).then(function() {
|
||||
window.location = "/";
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
26
templates/search.html
Normal file
26
templates/search.html
Normal file
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Fête de la musique</title>
|
||||
{{ bootstrap.load_css() }}
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<form method="POST">
|
||||
<div class="form-group">
|
||||
<div class="form-inline text-center">
|
||||
<label>Enter here the music that you want:</label>
|
||||
<label>
|
||||
<input type="text" name="search" class="form-control" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<input type="submit" value="Submit" class="btn btn-primary">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user