Стилизовал artist_list.html
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user