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
2 changed files with 87 additions and 63 deletions
Showing only changes of commit 7a06add6f0 - Show all commits

View File

@ -1,3 +1,18 @@
.card
@extend .box
.crads-item-excerpt
line-height: calc(24 / 18)
.cards-item-extra
text-transform: none
.cards-item-extra-rating-stars
margin-bottom: .2rem
.stars
font-size: 1.4rem
.cards-item-title
+padding(0, y)

View File

@ -1,24 +1,32 @@
{% load common filters %}
{% with latest=extension.latest_version %}
<div class="ext-card {% if blur %}is-bg-blur{% endif %}">
{# TODO: add conditional if is bg blur to web-assets component card #}
{% comment %}
<div class="ext-card {% if blur %}is-bg-blur{% endif %}">
{% if blur %}
<div class="ext-card-thumbnail-blur" style="background-image: url({{ extension.previews.listed.first.source.url }});"></div>
{% endif %}
<a class="ext-card-thumbnail" href="{{ extension.get_absolute_url }}">
<div class="ext-card-thumbnail-img" style="background-image: url({{ extension.previews.listed.first.source.url }});" title="{{ extension.name }}"></div>
</a>
</div>
{% endcomment %}
<div class="ext-card-body">
<h3 class="ext-card-title">
<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="{{ extension.previews.listed.first.source.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>
<ul class="ext-list-details">
</div>
<div class="cards-item-extra">
<ul>
<li class="ext-card-author">
{% if extension.team %}
{% with team=extension.team %}
@ -30,7 +38,7 @@
</li>
</ul>
<ul class="ext-list-details mt-1">
<ul class="cards-item-extra-rating-stars">
{% if extension.average_score %}
<li>
<a class="align-items-center d-flex" href="{{ extension.get_ratings_url }}">
@ -54,15 +62,16 @@
</ul>
{% if latest.tags.count %}
<ul class="ext-list-details ext-card-tags">
<ul class="ext-card-tags">
<li class="ext-card-tags">
{% include "extensions/components/tags.html" with small=True version=latest %}
</li>
</ul>
{% endif %}
</div>
</div>
{# Author/admin tools can be added here in an extending template #}
{% block admin %}{% endblock admin %}
</div>
</div>
{% endwith %}