Implement Web Assets' theme system and selection, and add 'light' theme #118

Merged
Márton Lente merged 97 commits from martonlente/extensions-website:ui/theme-light into main 2024-05-08 14:20:07 +02:00
Showing only changes of commit 22b5f6f1ea - Show all commits

View File

@ -1,25 +1,23 @@
{% load common filters %} {% 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="ext-card {% if blur %}is-background-blur{% endif %}"> <div class="cards-item-content">
{% if blur %} <a href="{{ extension.get_absolute_url }}">
<div class="ext-card-thumbnail-blur" style="background-image: url({{ thumbnail_360p_url }});"></div> <div class="cards-item-thumbnail">
{% endif %} <img alt="{{ extension.name }}" src="{{ thumbnail_360p_url }}" title="{{ extension.name }}">
</div>
<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> </a>
<h3 class="cards-item-title">
<div class="ext-card-body">
<h3 class="ext-card-title">
<a href="{{ extension.get_absolute_url }}">{{ extension.name }}</a> <a href="{{ extension.get_absolute_url }}">{{ extension.name }}</a>
</h3> </h3>
<div class="cards-item-excerpt">
<p> <p>
{{ latest.tagline }} {{ latest.tagline }}
</p> </p>
</div>
<ul class="ext-list-details"> <div class="cards-item-extra">
<li class="ext-card-author"> <ul>
<li>
{% if extension.team %} {% if extension.team %}
{% with team=extension.team %} {% with team=extension.team %}
<a href="{{ team.get_absolute_url }}" title="{{ team.name }}">{{ team.name }}</a> <a href="{{ team.get_absolute_url }}" title="{{ team.name }}">{{ team.name }}</a>
@ -30,10 +28,10 @@
</li> </li>
</ul> </ul>
<ul class="ext-list-details mt-1"> <ul class="cards-item-extra-rating-stars">
{% if extension.average_score %} {% if extension.average_score %}
<li> <li>
<a href="{{ extension.get_ratings_url }}"> <a class="align-items-center d-flex" href="{{ extension.get_ratings_url }}">
{% include "ratings/components/average.html" with score=extension.average_score %} {% include "ratings/components/average.html" with score=extension.average_score %}
({{ extension.text_ratings_count|int_compact }}) ({{ extension.text_ratings_count|int_compact }})
</a> </a>