add tag cloud to video page, short rating

This commit is contained in:
simon 2022-11-21 10:27:28 +07:00
parent a1fbc0b436
commit acb24e38a6
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
2 changed files with 23 additions and 2 deletions

View File

@ -69,15 +69,24 @@
<p class="thumb-icon"><img class="dislike" src="{% static 'img/icon-thumb.svg' %}" alt="thumbs-down">: {{ video.stats.dislike_count|intcomma }}</p>
{% endif %}
{% if video.stats.average_rating %}
<p class="rating-stars">Rating:
<div class="rating-stars">
{% for star in video.stats.average_rating %}
<img src="/static/img/icon-star-{{ star }}.svg" alt="{{ star }}">
{% endfor %}
</p>
</div>
{% endif %}
</div>
</div>
</div>
{% if video.tags %}
<div class="description-box">
<div class="video-tag-box">
{% for tag in video.tags %}
<span class="video-tag">{{ tag }}</span>
{% endfor %}
</div>
</div>
{% endif %}
{% if video.description %}
<div class="description-box">
<p id="text-expand" class="description-text">

View File

@ -783,6 +783,18 @@ video:-webkit-full-screen {
display: flex;
}
.video-tag-box {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.video-tag {
padding: 5px 10px;
margin: 5px;
border: 1px solid var(--accent-font-light);
}
.thumb-icon img,
.rating-stars img {
width: 20px;