This commit is contained in:
Viner Abubakirov
2025-12-10 14:18:04 +05:00
parent 9a16f9c9ca
commit 36fbd46909
28 changed files with 819 additions and 0 deletions

View File

@@ -0,0 +1,198 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Музыкальный сервис</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', sans-serif;
background-color: #f8f9fa;
color: #333;
line-height: 1.6;
padding: 20px;
min-height: 100vh;
}
.container {
max-width: 800px;
margin: 0 auto;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 2px 15px rgba(0,0,0,0.05);
padding: 30px;
}
header {
text-align: center;
margin-bottom: 30px;
padding-bottom: 20px;
border-bottom: 1px solid #eee;
}
h1 {
font-weight: 500;
font-size: 2rem;
color: #2c3e50;
margin-bottom: 10px;
}
.subtitle {
color: #7f8c8d;
font-size: 1rem;
}
.track-list {
list-style: none;
}
.track-item {
padding: 20px 0;
border-bottom: 1px solid #f0f0f0;
display: flex;
align-items: center;
gap: 20px;
}
.track-item:last-child {
border-bottom: none;
}
.track-number {
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
background-color: #e9ecef;
border-radius: 50%;
font-size: 0.9rem;
color: #6c757d;
flex-shrink: 0;
}
.track-info {
flex: 1;
}
.track-title {
font-weight: 500;
color: #2c3e50;
margin-bottom: 5px;
}
.track-artist {
color: #7f8c8d;
font-size: 0.9rem;
}
.player-container {
background-color: #f8f9fa;
border-radius: 6px;
padding: 15px;
margin-top: 10px;
}
.audio-player {
width: 100%;
margin: 0;
border-radius: 4px;
background-color: #fff;
}
.player-controls {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 0;
}
.player-time {
font-size: 0.8rem;
color: #7f8c8d;
}
.empty-state {
text-align: center;
padding: 50px 20px;
color: #7f8c8d;
}
.empty-state i {
font-size: 3rem;
margin-bottom: 15px;
color: #bdc3c7;
}
footer {
text-align: center;
margin-top: 40px;
padding-top: 20px;
border-top: 1px solid #eee;
color: #7f8c8d;
font-size: 0.9rem;
}
@media (max-width: 600px) {
.container {
padding: 20px 15px;
}
.track-item {
flex-direction: column;
align-items: flex-start;
gap: 10px;
}
.track-number {
margin-right: 10px;
}
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>Музыкальный сервис</h1>
<p class="subtitle">Ваша коллекция треков</p>
</header>
<ul class="track-list">
{% if tracks %}
{% for track in tracks %}
<li class="track-item">
<div class="track-number">{{ forloop.counter }}</div>
<div class="track-info">
<h3 class="track-title">{{ track.title }}</h3>
<p class="track-artist">Исполнитель: {{ track.artist }}</p>
<div class="player-container">
<audio class="audio-player" controls>
<source src="{{ track.file.url }}" type="audio/mpeg">
Ваш браузер не поддерживает аудио.
</audio>
</div>
</div>
</li>
{% endfor %}
{% else %}
<div class="empty-state">
<i class="fas fa-music"></i>
<p>Нет добавленных треков</p>
</div>
{% endif %}
</ul>
<footer>
<p>© 2023 Музыкальный сервис</p>
</footer>
</div>
</body>
</html>