Стилизовал artist_list.html

This commit is contained in:
Viner Abubakirov
2026-01-02 15:37:24 +05:00
parent b8fc219f09
commit 67a32d8ac7
3 changed files with 66 additions and 10 deletions

View File

@@ -1,11 +1,27 @@
{% load static %}
<ul>
{% for artist in artists %}
<li>
<a href="{% url 'music:artist_detail' artist.id %}">{{ artist.name }}</a>
</li>
{% empty %}
<li>No artists available.</li>
{% endfor %}
</ul>
<link rel="stylesheet" href="{% static 'css/artist_list.css' %}">
<div class="container">
<div class="artist-container">
{% for artist in artists %}
<div class="artist-card">
<a href="{% url 'music:artist_detail' artist.id %}" class="artist-link">
{% if artist.cover_image %}
<img src="{{ artist.cover_image.url }}" alt="{{ artist.name }}" class="artist-photo">
{% else %}
<img src="{% static 'img/no-artist.png' %}" alt="No photo" class="artist-photo">
{% endif %}
<div class="artist-info">
<h3 class="artist-name">{{ artist.name }}</h3>
</div>
</a>
</div>
{% empty %}
<p>No artists available.</p>
{% endfor %}
</div>
</div>