UI: Web Assets v2 upgrade #85

Merged
Márton Lente merged 52 commits from martonlente/extensions-website:ui/web-assets-v2-upgrade into main 2024-04-30 17:57:33 +02:00
Showing only changes of commit 22b5f6f1ea - Show all commits

View File

@ -1,50 +1,48 @@
{% load common filters %}
{% with latest=extension.latest_version thumbnail_360p_url=extension.get_previews.0.thumbnail_360p_url %}
{% with latest=extension.latest_version thumbnail_360p_url=extension.previews.listed.first.thumbnail_360p_url %}
<div class="cards-item">
<div class="cards-item-content">
<a href="{{ extension.get_absolute_url }}">
<div class="cards-item-thumbnail">
<img alt="{{ extension.name }}" src="{{ thumbnail_360p_url }}" title="{{ extension.name }}">
</div>
</a>
<h3 class="cards-item-title">
<a href="{{ extension.get_absolute_url }}">{{ extension.name }}</a>
</h3>
<div class="cards-item-excerpt">
<p>
{{ latest.tagline }}
</p>
</div>
<div class="cards-item-extra">
<ul>
<li>
{% if extension.team %}
{% with team=extension.team %}
<a href="{{ team.get_absolute_url }}" title="{{ team.name }}">{{ team.name }}</a>
{% endwith %}
{% elif extension.authors.count %}
{% include "extensions/components/authors.html" %}
{% endif %}
</li>
</ul>
<div class="ext-card {% if blur %}is-background-blur{% endif %}">
{% if blur %}
<div class="ext-card-thumbnail-blur" style="background-image: url({{ thumbnail_360p_url }});"></div>
{% endif %}
<ul class="cards-item-extra-rating-stars">
{% if extension.average_score %}
<li>
<a class="align-items-center d-flex" href="{{ extension.get_ratings_url }}">
{% include "ratings/components/average.html" with score=extension.average_score %}
({{ extension.text_ratings_count|int_compact }})
</a>
</li>
{% endif %}
<a class="ext-card-thumbnail" href="{{ extension.get_absolute_url }}">
<div class="ext-card-thumbnail-img" style="background-image: url({{ thumbnail_360p_url }});" title="{{ extension.name }}"></div>
</a>
<div class="ext-card-body">
<h3 class="ext-card-title">
<a href="{{ extension.get_absolute_url }}">{{ extension.name }}</a>
</h3>
<p>
{{ latest.tagline }}
</p>
<ul class="ext-list-details">
<li class="ext-card-author">
{% if extension.team %}
{% with team=extension.team %}
<a href="{{ team.get_absolute_url }}" title="{{ team.name }}">{{ team.name }}</a>
{% endwith %}
{% elif extension.authors.count %}
{% include "extensions/components/authors.html" %}
{% endif %}
</li>
</ul>
<ul class="ext-list-details mt-1">
{% if extension.average_score %}
<li>
<a href="{{ extension.get_ratings_url }}">
{% include "ratings/components/average.html" with score=extension.average_score %}
({{ extension.text_ratings_count|int_compact }})
</a>
</li>
{% endif %}
{% if extension.download_count %}
<li title="{{ extension.download_count }} downloads">
<i class="i-download"></i> {{ extension.download_count | int_compact }}
</li>
{% endif %}
{% if extension.download_count %}
<li title="{{ extension.download_count }} downloads">
<i class="i-download"></i> {{ extension.download_count | int_compact }}
</li>
{% endif %}
{% if show_type %}
<li class="ms-auto">