Spaces:
Sleeping
Sleeping
Create templates/dashboard.html
Browse files- templates/dashboard.html +114 -0
templates/dashboard.html
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="pl">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<title>Generate Playlist</title>
|
| 6 |
+
<style>
|
| 7 |
+
body {
|
| 8 |
+
background-color: #000;
|
| 9 |
+
color: #00ff00;
|
| 10 |
+
font-family: 'Courier New', Courier, monospace;
|
| 11 |
+
display: flex;
|
| 12 |
+
justify-content: center;
|
| 13 |
+
align-items: center;
|
| 14 |
+
height: 100vh;
|
| 15 |
+
margin: 0;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
.container {
|
| 19 |
+
text-align: center;
|
| 20 |
+
padding: 2rem;
|
| 21 |
+
border: 1px solid #00ff00;
|
| 22 |
+
box-shadow: 0 0 10px #00ff00;
|
| 23 |
+
width: 90%;
|
| 24 |
+
max-width: 700px;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
h1 {
|
| 28 |
+
font-size: 36px;
|
| 29 |
+
color: #00ff00;
|
| 30 |
+
text-shadow: 0 0 5px #00ff00;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
label {
|
| 34 |
+
display: block;
|
| 35 |
+
margin: 1rem 0 0.5rem;
|
| 36 |
+
font-size: 16px;
|
| 37 |
+
color: #00ff00;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
input[type="text"] {
|
| 41 |
+
background-color: #000;
|
| 42 |
+
color: #00ff00;
|
| 43 |
+
border: 1px solid #00ff00;
|
| 44 |
+
padding: 10px;
|
| 45 |
+
width: 80%;
|
| 46 |
+
max-width: 400px;
|
| 47 |
+
font-family: inherit;
|
| 48 |
+
font-size: 16px;
|
| 49 |
+
text-align: center;
|
| 50 |
+
box-shadow: 0 0 5px #00ff00 inset;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.button-link {
|
| 54 |
+
display: inline-block;
|
| 55 |
+
padding: 10px 20px;
|
| 56 |
+
background-color: #000;
|
| 57 |
+
color: #00ff00;
|
| 58 |
+
text-align: center;
|
| 59 |
+
text-decoration: none;
|
| 60 |
+
border-radius: 3px;
|
| 61 |
+
border: 1px solid #00ff00;
|
| 62 |
+
font-size: 16px;
|
| 63 |
+
margin-top: 1rem;
|
| 64 |
+
cursor: pointer;
|
| 65 |
+
transition: all 0.2s ease-in-out;
|
| 66 |
+
box-shadow: 0 0 5px #00ff00;
|
| 67 |
+
}
|
| 68 |
+
.blinking-cursor::after {
|
| 69 |
+
content: '_';
|
| 70 |
+
animation: blink 1s step-start infinite;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
@keyframes blink {
|
| 74 |
+
50% {
|
| 75 |
+
opacity: 0;
|
| 76 |
+
}
|
| 77 |
+
}
|
| 78 |
+
.button-link:hover {
|
| 79 |
+
background-color: #00ff00;
|
| 80 |
+
color: #000;
|
| 81 |
+
box-shadow: 0 0 10px #00ff00;
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
form {
|
| 85 |
+
margin-top: 1rem;
|
| 86 |
+
}
|
| 87 |
+
</style>
|
| 88 |
+
<script>
|
| 89 |
+
function showLoader() {
|
| 90 |
+
document.getElementById('loader').style.display = 'block';
|
| 91 |
+
}
|
| 92 |
+
</script>
|
| 93 |
+
</head>
|
| 94 |
+
<body>
|
| 95 |
+
<div class="container">
|
| 96 |
+
{% if guest %}
|
| 97 |
+
<p>You are using the app as a guest.</p>
|
| 98 |
+
{% elif user %}
|
| 99 |
+
<p>Logged in as: {{ user.display_name }} ({{ user.id }})</p>
|
| 100 |
+
{% endif %}
|
| 101 |
+
<hr>
|
| 102 |
+
<form action="{{ url_for('generate') }}" method="POST" onsubmit="showLoader()">
|
| 103 |
+
<label for="prompt">put topic and number of songs you wanna use to make playlist like:<br> <em>40 songs Best of Rock</em></label>
|
| 104 |
+
<input type="text" id="prompt" name="prompt" placeholder="40 songs best Rock Mix" required>
|
| 105 |
+
<br>
|
| 106 |
+
<label for="prompt">Name of Playlist:</label>
|
| 107 |
+
<input type="text" id="playlist_name" name="playlist_name" placeholder="My Awesome Rock Mix" required style="background-color:black; color:green;" class="blinking-cursor">
|
| 108 |
+
<br>
|
| 109 |
+
<button type="submit" class="button-link">Generate</button>
|
| 110 |
+
</form>
|
| 111 |
+
</div>
|
| 112 |
+
<div id="loader" style="display:none;">Generating playlist, please wait...</div>
|
| 113 |
+
</body>
|
| 114 |
+
</html>
|