Обновил шаблон для album_list.html и добавил функцию для cover_image в модели Album
This commit is contained in:
46
music_storage/static/css/album_list.css
Normal file
46
music_storage/static/css/album_list.css
Normal file
@@ -0,0 +1,46 @@
|
||||
.album-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.album-card {
|
||||
background: #ffffff;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.album-card:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.album-link {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.album-cover {
|
||||
width: 100%;
|
||||
height: 220px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.album-info {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.album-name {
|
||||
margin: 0;
|
||||
font-size: 1.1rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.album-artist {
|
||||
margin: 4px 0 0;
|
||||
font-size: 0.9rem;
|
||||
color: #666;
|
||||
}
|
||||
Reference in New Issue
Block a user