playlistmaker / templates /dashboard.html
tasiapi's picture
Create templates/dashboard.html
b065f42 verified
Raw History Blame Contribute Delete
2.87 kB
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<title>Generate Playlist</title>
<style>
body {
background-color: #000;
color: #00ff00;
font-family: 'Courier New', Courier, monospace;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.container {
text-align: center;
padding: 2rem;
border: 1px solid #00ff00;
box-shadow: 0 0 10px #00ff00;
width: 90%;
max-width: 700px;
}
h1 {
font-size: 36px;
color: #00ff00;
text-shadow: 0 0 5px #00ff00;
}
label {
display: block;
margin: 1rem 0 0.5rem;
font-size: 16px;
color: #00ff00;
}
input[type="text"] {
background-color: #000;
color: #00ff00;
border: 1px solid #00ff00;
padding: 10px;
width: 80%;
max-width: 400px;
font-family: inherit;
font-size: 16px;
text-align: center;
box-shadow: 0 0 5px #00ff00 inset;
}
.button-link {
display: inline-block;
padding: 10px 20px;
background-color: #000;
color: #00ff00;
text-align: center;
text-decoration: none;
border-radius: 3px;
border: 1px solid #00ff00;
font-size: 16px;
margin-top: 1rem;
cursor: pointer;
transition: all 0.2s ease-in-out;
box-shadow: 0 0 5px #00ff00;
}
.blinking-cursor::after {
content: '_';
animation: blink 1s step-start infinite;
}
@keyframes blink {
50% {
opacity: 0;
}
}
.button-link:hover {
background-color: #00ff00;
color: #000;
box-shadow: 0 0 10px #00ff00;
}
form {
margin-top: 1rem;
}
</style>
<script>
function showLoader() {
document.getElementById('loader').style.display = 'block';
}
</script>
</head>
<body>
<div class="container">
{% if guest %}
<p>You are using the app as a guest.</p>
{% elif user %}
<p>Logged in as: {{ user.display_name }} ({{ user.id }})</p>
{% endif %}
<hr>
<form action="{{ url_for('generate') }}" method="POST" onsubmit="showLoader()">
<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>
<input type="text" id="prompt" name="prompt" placeholder="40 songs best Rock Mix" required>
<br>
<label for="prompt">Name of Playlist:</label>
<input type="text" id="playlist_name" name="playlist_name" placeholder="My Awesome Rock Mix" required style="background-color:black; color:green;" class="blinking-cursor">
<br>
<button type="submit" class="button-link">Generate</button>
</form>
</div>
<div id="loader" style="display:none;">Generating playlist, please wait...</div>
</body>
</html>