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
34 changed files with 132 additions and 132 deletions
Showing only changes of commit 43ca92d5f9 - Show all commits

View File

@ -24,7 +24,7 @@
<div class="ext-detail-tagline"> <div class="ext-detail-tagline">
<a href="{{ extension.get_absolute_url }}">{{ extension.name }}</a> <a href="{{ extension.get_absolute_url }}">{{ extension.name }}</a>
</div> </div>
<div class="ext-detail-authors ml-3"> <div class="ext-detail-authors ms-3">
<a href="{% url 'extensions:by-type' type_slug=extension.type_slug %}"> <a href="{% url 'extensions:by-type' type_slug=extension.type_slug %}">
{{ extension.get_type_display }} {{ extension.get_type_display }}
</a> </a>
@ -44,7 +44,7 @@
{% block hero_tabs %} {% block hero_tabs %}
<nav class="hero-tabs"> <nav class="hero-tabs">
<span class="ml-auto"></span> <span class="ms-auto"></span>
<div class="btn-row mb-1"> <div class="btn-row mb-1">
{% if request.user.is_staff %} {% if request.user.is_staff %}

View File

@ -5,7 +5,7 @@ function galleriaCloneFirstItem() {
let firstGalleriaItem = galleriaCarrousel.firstElementChild.cloneNode(true); let firstGalleriaItem = galleriaCarrousel.firstElementChild.cloneNode(true);
firstGalleriaItem.classList.remove('js-galleria-item-preview', 'is-active'); firstGalleriaItem.classList.remove('js-galleria-item-preview', 'is-active');
firstGalleriaItem.classList.add('js-expand-on-click'); firstGalleriaItem.classList.add('js-expand-on-click');
firstGalleriaItem.id = 'galleria-item-large'; firstGalleriaItem.id = 'galleria-item-lg';
document.getElementById("galleria-container").prepend(firstGalleriaItem); document.getElementById("galleria-container").prepend(firstGalleriaItem);
} }
@ -13,7 +13,7 @@ function galleriaCloneFirstItem() {
function galleriaSetLargePreview(item) { function galleriaSetLargePreview(item) {
let previewsContainer = document.getElementById('galleria-items'); let previewsContainer = document.getElementById('galleria-items');
let previewLarge = document.getElementById('galleria-item-large'); let previewLarge = document.getElementById('galleria-item-lg');
let thumbnails = document.getElementsByClassName("js-galleria-item-preview"); let thumbnails = document.getElementsByClassName("js-galleria-item-preview");
[].forEach.call(thumbnails, function(el) { [].forEach.call(thumbnails, function(el) {
el.classList.remove("is-active"); el.classList.remove("is-active");

View File

@ -4,7 +4,7 @@
z-index: 0 z-index: 0
> li > li
--border-color: var(--box-background-color) --border-color: var(--box-bg-color)
position: relative position: relative
&:first-child &:first-child
@ -64,7 +64,7 @@
top: 1.25rem top: 1.25rem
.activity-status-change .activity-status-change
color: var(--text-color-tertiary) color: var(--color-text-tertiary)
.profile-avatar .profile-avatar
+margin(3, right) +margin(3, right)
@ -73,7 +73,7 @@
left: 0 left: 0
strong strong
color: var(--text-color-secondary) color: var(--color-text-secondary)
.badge .badge
border: none border: none
@ -88,12 +88,12 @@
.activity-icon .activity-icon
align-items: center align-items: center
background-color: var(--background-color) background-color: var(--color-bg)
border-radius: 100% border-radius: 100%
border: var(--border-width) solid var(--border-color) border: var(--border-width) solid var(--border-color)
color: var(--text-color-tertiary) color: var(--color-text-tertiary)
display: flex display: flex
font-size: var(--font-size-small) font-size: var(--fs-sm)
height: 1.5rem height: 1.5rem
justify-content: center justify-content: center
left: -.66rem left: -.66rem

View File

@ -1,17 +1,17 @@
a.badge-tag a.badge-tag
--badge-color: var(--text-color-secondary) --badge-color: var(--color-text-secondary)
--badge-bg: var(--text-color-tertiary) --badge-bg: var(--color-text-tertiary)
background-color: transparent background-color: transparent
text-decoration: none !important text-decoration: none !important
&:hover &:hover
background-color: transparent background-color: transparent
border-color: var(--text-color) border-color: var(--color-text)
color: var(--text-color) color: var(--color-text)
.badge-tag .badge-tag
font-size: var(--font-size-extra-small) font-size: var(--fs-xs)
.badge-status .badge-status
&-approved &-approved

View File

@ -11,7 +11,7 @@
z-index: 0 z-index: 0
&:before &:before
background-color: var(--box-background-color) background-color: var(--box-bg-color)
border-radius: .25rem border-radius: .25rem
content: '' content: ''
display: block display: block
@ -27,8 +27,8 @@
margin-bottom: 0 margin-bottom: 0
header header
color: var(--text-color-secondary) color: var(--color-text-secondary)
font-size: var(--font-size-small) font-size: var(--fs-sm)
+margin(2, bottom) +margin(2, bottom)
ul ul

View File

@ -1,12 +1,12 @@
.hero.extension-detail .hero.extension-detail
--hero-max-height: 0 --hero-max-height: 0
--hero-min-height: 240px --hero-min-height: 240px
--font-size-hero-title: clamp(3rem, 4vw + 1rem, 48px) --fs-hero-title: clamp(3rem, 4vw + 1rem, 48px)
--font-size-large: 18px --fs-lg: 18px
--border-width: 2px --border-width: 2px
--hero-background-color: hsl(213, 10%, 14%) --hero-bg-color: hsl(213, 10%, 14%)
background-color: var(--hero-background-color) background-color: var(--hero-bg-color)
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%233e4248' fill-opacity='0.21'%3E%3Cpath d='M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%233e4248' fill-opacity='0.21'%3E%3Cpath d='M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")
background-size: 40px background-size: 40px
flex-direction: column flex-direction: column
@ -24,7 +24,7 @@
.hero-overlay .hero-overlay
background-color: transparent background-color: transparent
background-image: linear-gradient(0deg, var(--background-color), hsla(213, 10%, 14%, 0)) background-image: linear-gradient(0deg, var(--color-bg), hsla(213, 10%, 14%, 0))
&.extension-review &.extension-review
--hero-min-height: 210px --hero-min-height: 210px
@ -42,8 +42,8 @@
@extend .alert @extend .alert
@extend .alert-danger @extend .alert-danger
border-radius: 0 border-radius: 0
font-size: var(--font-size-small) font-size: var(--fs-sm)
+font-weight-bold +fw-bold
+padding(1, y) +padding(1, y)
text-align: center text-align: center
@ -54,17 +54,17 @@
color: var(--color-warning-text); color: var(--color-warning-text);
.hero-breadcrumbs .hero-breadcrumbs
font-size: var(--font-size-small) font-size: var(--fs-sm)
a a
color: var(--text-color-secondary) color: var(--color-text-secondary)
display: inline-block display: inline-block
+padding(2) +padding(2)
.ext-detail-name .ext-detail-name
font-size: var(--font-size-title-massive) font-size: var(--fs-title-massive)
+font-weight-title +fw-title
line-height: var(--font-size-title-massive) line-height: var(--fs-title-massive)
margin-bottom: 0 margin-bottom: 0
.ext-detail-info-authors .ext-detail-info-authors
@ -72,7 +72,7 @@
flex-wrap: wrap flex-wrap: wrap
.ext-detail-authors .ext-detail-authors
color: var(--text-color-secondary) color: var(--color-text-secondary)
.ext-detail-tagline .ext-detail-tagline
+margin(2, bottom) +margin(2, bottom)
@ -83,7 +83,7 @@
.ext-detail-info .ext-detail-info
dd dd
color: var(--text-color) color: var(--color-text)
overflow: hidden overflow: hidden
text-overflow: ellipsis text-overflow: ellipsis
white-space: nowrap white-space: nowrap
@ -93,8 +93,8 @@
margin-bottom: 0 margin-bottom: 0
dt dt
color: var(--text-color-secondary) color: var(--color-text-secondary)
font-size: var(--font-size-small) font-size: var(--fs-sm)
dd dd
font-family: var(--font-family-body) font-family: var(--font-family-body)
@ -108,7 +108,7 @@
white-space: nowrap white-space: nowrap
&:hover &:hover
color: var(--text-color-primary) color: var(--color-text-primary)
.dl-col .dl-col
overflow: hidden overflow: hidden
@ -134,10 +134,10 @@
padding: 0 padding: 0
strong strong
font-size: var(--font-size-large) font-size: var(--fs-lg)
i i
font-size: var(--font-size-large) font-size: var(--fs-lg)
+margin(3, right) +margin(3, right)
.ext-detail-download .ext-detail-download
@ -160,16 +160,16 @@
summary summary
.date .date
+margin(2, left) +margin(2, left)
color: var(--text-color-secondary) color: var(--color-text-secondary)
+font-weight-normal +fw-normal
.cards-list .cards
+media-sm +media-sm
--cards-list-items-per-row: 2 --cards-items-per-row: 2
+media-md +media-md
--cards-list-items-per-row: 3 --cards-items-per-row: 3
+media-lg +media-lg
--cards-list-items-per-row: 4 --cards-items-per-row: 4
.ext-card .ext-card
+box-card +box-card
@ -182,13 +182,13 @@
&:hover &:hover
box-shadow: 10px 10px 20px 0px rgba(0, 0, 0, .04), -10px 0 20px 0px rgba(0, 0, 0, .04) box-shadow: 10px 10px 20px 0px rgba(0, 0, 0, .04), -10px 0 20px 0px rgba(0, 0, 0, .04)
&.is-background-blur &.is-bg-blur
background-color: hsl(213, 10%, 21%) background-color: hsl(213, 10%, 21%)
border: thin solid hsl(213, 10%, 20%) border: thin solid hsl(213, 10%, 20%)
position: relative position: relative
.ext-card-body .ext-card-body
--text-color-secondary: hsla(213, 40%, 90%, .6) --color-text-secondary: hsla(213, 40%, 90%, .6)
border-bottom-left-radius: var(--border-radius-lg) border-bottom-left-radius: var(--border-radius-lg)
border-bottom-right-radius: var(--border-radius-lg) border-bottom-right-radius: var(--border-radius-lg)
@ -202,11 +202,11 @@
border-radius: 0 border-radius: 0
.ext-card-thumbnail-img .ext-card-thumbnail-img
-webkit-mask-image: -webkit-gradient(linear, left 60%, left bottom, from(rgba(0,0,0,1)), to(rgba(0,0,0,0))) -webkit-mask-img: -webkit-gradient(linear, left 60%, left bottom, from(rgba(0,0,0,1)), to(rgba(0,0,0,0)))
.ext-card-thumbnail:hover .ext-card-thumbnail:hover
&+.ext-card-body .ext-card-title &+.ext-card-body .ext-card-title
color: var(--text-color-primary) color: var(--color-text-primary)
&.ext-card-row &.ext-card-row
flex-direction: row flex-direction: row
@ -264,7 +264,7 @@
line-height: 1.2 line-height: 1.2
.ext-card-title .ext-card-title
font-size: var(--font-size-large) font-size: var(--fs-lg)
+margin(3, bottom) +margin(3, bottom)
transition: color var(--transition-speed) transition: color var(--transition-speed)
@ -275,8 +275,8 @@
@extend .list-inline @extend .list-inline
align-items: center align-items: center
color: var(--text-color-secondary) color: var(--color-text-secondary)
font-size: var(--font-size-small) font-size: var(--fs-sm)
margin: auto 0 0 0 margin: auto 0 0 0
&+.ext-list-details &+.ext-list-details
@ -333,7 +333,7 @@
width: var(--preview-thumbnail-max-size) width: var(--preview-thumbnail-max-size)
.previews-list-item-thumbnail-img .previews-list-item-thumbnail-img
background-color: var(--background-color) background-color: var(--color-bg)
background-position: center background-position: center
background-size: cover background-size: cover
border-radius: var(--border-radius) border-radius: var(--border-radius)
@ -344,7 +344,7 @@
flex: 1 flex: 1
label label
font-size: var(--font-size-small) font-size: var(--fs-sm)
ul ul
+list-unstyled +list-unstyled
@ -365,7 +365,7 @@
.form-control .form-control
&[type="file"] &[type="file"]
font-size: var(--font-size-extra-small) font-size: var(--fs-xs)
max-width: 50% max-width: 50%
.ext-version-history .ext-version-history
@ -374,15 +374,15 @@
ul ul
@extend .list-inline @extend .list-inline
color: var(--text-color-secondary) color: var(--color-text-secondary)
+font-weight-normal +fw-normal
gap: 0 1rem gap: 0 1rem
margin: 0 margin: 0
+margin(3, right) +margin(3, right)
.blender-version .blender-version
color: var(--text-color-secondary) color: var(--color-text-secondary)
+font-weight-normal +fw-normal
+margin(3, left) +margin(3, left)
details[open] details[open]
@ -392,31 +392,31 @@
.ext-detail-info .ext-detail-info
.ext-detail-permissions .ext-detail-permissions
strong strong
font-size: var(--font-size-normal) font-size: var(--fs-normal)
small small
display: block display: block
i i
font-size: var(--font-size-normal) font-size: var(--fs-normal)
+margin(2, right) +margin(2, right)
/* Settings */ /* Settings */
.settings .settings
.form-control .form-control
&[disabled] &[disabled]
--input-bg-color: var(--background-color) --input-color-bg: var(--color-bg)
background-color: var(--input-bg-color) background-color: var(--input-color-bg)
color: var(--text-color-secondary) color: var(--color-text-secondary)
&:hover &:hover
--input-bg-color-hover: var(--input-bg-color) --input-color-bg-hover: var(--input-color-bg)
cursor: not-allowed cursor: not-allowed
& + i.i-lock & + i.i-lock
color: var(--text-color-secondary) color: var(--color-text-secondary)
position: absolute position: absolute
right: var(--spacer) right: var(--spacer)
@ -430,7 +430,7 @@
+margin(2, right) +margin(2, right)
.ext-review-list .ext-review-list
color: var(--text-color-secondary) color: var(--color-text-secondary)
th th
+padding(3, x) +padding(3, x)
@ -440,7 +440,7 @@
transition: background-color var(--transition-speed-fast) transition: background-color var(--transition-speed-fast)
a a
color: var(--text-color) color: var(--color-text)
+padding(1, y) +padding(1, y)
padding-inline: 0 !important padding-inline: 0 !important

View File

@ -1,7 +1,7 @@
.galleria-container .galleria-container
--extension-thumbnail-width: 140px --extension-thumbnail-width: 140px
background-color: var(--background-color-secondary) background-color: var(--color-bg-secondary)
border-radius: var(--border-radius-lg) border-radius: var(--border-radius-lg)
+padding(2) +padding(2)
@ -33,7 +33,7 @@
border-radius: 999em border-radius: 999em
&::-webkit-scrollbar-track &::-webkit-scrollbar-track
background-color: hsl(var(--background-color-h), var(--background-color-s), 80%) background-color: hsl(var(--color-bg-h), var(--color-bg-s), 80%)
.galleria-item .galleria-item
cursor: pointer cursor: pointer
@ -73,7 +73,7 @@
&.is-active &.is-active
background-color: var(--color-primary) background-color: var(--color-accent)
img img
clip-path: inset(0.2rem 0.2rem 0.2rem 0.2rem) clip-path: inset(0.2rem 0.2rem 0.2rem 0.2rem)
@ -176,7 +176,7 @@
background-color: rgba(black, .5) background-color: rgba(black, .5)
bottom: 1rem bottom: 1rem
color: white color: white
+font-weight-bold +fw-bold
min-width: 3ch min-width: 3ch
+padding(2, x) +padding(2, x)
position: absolute position: absolute

View File

@ -23,7 +23,7 @@
> a:not(.btn) > a:not(.btn)
background-color: transparent background-color: transparent
border-radius: 0 border-radius: 0
color: var(--text-color-secondary) color: var(--color-text-secondary)
display: inline-block display: inline-block
+padding(4, x) +padding(4, x)
+padding(2, y) +padding(2, y)
@ -48,7 +48,7 @@
opacity: 1 opacity: 1
&.is-active &.is-active
+font-weight-bold +fw-bold
color: white color: white
&::after &::after

View File

@ -3,12 +3,12 @@
.list-filters .list-filters
+box-card +box-card
background-color: var(--background-color-tertiary) background-color: var(--color-bg-tertiary)
+padding(3) +padding(3)
h3 h3
border-bottom: var(--border-width) solid var(--border-color) border-bottom: var(--border-width) solid var(--border-color)
color: var(--text-color-secondary) color: var(--color-text-secondary)
+padding(2, bottom) +padding(2, bottom)
ul ul
@ -17,12 +17,12 @@
li li
&.is-active &.is-active
color: var(--text-color-primary) color: var(--color-text-primary)
+font-weight-bold +fw-bold
a a
display: block display: block
&:hover &:hover
color: var(--text-color-primary) color: var(--color-text-primary)
text-decoration: none text-decoration: none

View File

@ -1,17 +1,17 @@
.background-color .background-color
background-color: var(--background-color) background-color: var(--color-bg)
.background-color-primary .background-color-primary
background-color: var(--background-color-primary) background-color: var(--color-bg-primary)
.background-color-secondary .background-color-secondary
background-color: var(--background-color-secondary) background-color: var(--color-bg-secondary)
.background-color-tertiary .background-color-tertiary
background-color: var(--background-color-tertiary) background-color: var(--color-bg-tertiary)
.border-bottom-tertiary .border-bottom-tertiary
border-bottom: thin solid var(--background-color-tertiary) border-bottom: thin solid var(--color-bg-tertiary)
.cursor-move .cursor-move
&:hover &:hover

View File

@ -47,7 +47,7 @@ $container-width: map-get($container-max-widths, 'xl')
width: 26px width: 26px
.search-highlight .search-highlight
background-color: var(--btn-bg-color) background-color: var(--btn-color-bg)
border-radius: var(--border-radius) border-radius: var(--border-radius)
color: var(--btn-color) color: var(--btn-color)
font-style: normal font-style: normal
@ -63,8 +63,8 @@ $container-width: map-get($container-max-widths, 'xl')
border-radius: var(--border-radius) border-radius: var(--border-radius)
color: hsl(0, 100%, 90%) !important color: hsl(0, 100%, 90%) !important
display: flex display: flex
+font-weight-bold +fw-bold
font-size: var(--font-size-extra-small) font-size: var(--fs-xs)
justify-content: center justify-content: center
padding-block: .1rem padding-block: .1rem
padding-inline: .4rem padding-inline: .4rem

View File

@ -40,12 +40,12 @@
.tagger > ul > li:not(.tagger-new) a:visited, .tagger > ul > li:not(.tagger-new) a:visited,
.tagger-new ul a, .tagger-new ul a,
.tagger-new ul a:visited { .tagger-new ul a:visited {
color: var(--text-color); color: var(--color-text);
} }
.tagger > ul > li:not(.tagger-new) > a, .tagger > ul > li:not(.tagger-new) > a,
.tagger li:not(.tagger-new) > span, .tagger li:not(.tagger-new) > span,
.tagger .tagger-new ul { .tagger .tagger-new ul {
background: var(--btn-bg-color); background: var(--btn-color-bg);
border-radius: var(--border-radius); border-radius: var(--border-radius);
padding: 4px 4px 4px 8px; padding: 4px 4px 4px 8px;

View File

@ -124,7 +124,7 @@
</li> </li>
{% block nav-upload %} {% block nav-upload %}
<li class="mr-2"> <li class="me-2">
<a href="{% url 'extensions:submit' %}" class="btn btn-primary text-primary"> <a href="{% url 'extensions:submit' %}" class="btn btn-primary text-primary">
<i class="i-upload"></i> <i class="i-upload"></i>
<span>Upload Extension</span> <span>Upload Extension</span>

View File

@ -1,8 +1,8 @@
// TODO: improve and refactor variable namings // TODO: improve and refactor variable namings
const formsetContainer = document.getElementById('add-image-container'); const formsetContainer = document.getElementById('add-img-container');
const form = document.getElementById('update-extension-form'); const form = document.getElementById('update-extension-form');
const btnAddImage = document.getElementById('btn-add-image'); const btnAddImage = document.getElementById('btn-add-img');
const formsetPrefix = 'form'; const formsetPrefix = 'form';
const inputTotalForms = document.getElementById(`id_${formsetPrefix}-TOTAL_FORMS`); const inputTotalForms = document.getElementById(`id_${formsetPrefix}-TOTAL_FORMS`);
const tagInput = document.getElementById('id_tags'); const tagInput = document.getElementById('id_tags');
@ -28,10 +28,10 @@ function appendImageUploadForm() {
const formRow = document.createElement('div'); const formRow = document.createElement('div');
const newFormHTML = ` const newFormHTML = `
<div class="previews-list-item"> <div class="previews-list-item">
<div class="align-items-center d-flex previews-list-item-thumbnail pl-3"> <div class="align-items-center d-flex previews-list-item-thumbnail ps-3">
<div class="js-input-img-thumbnail previews-list-item-thumbnail-img" title="Preview"> <div class="js-input-img-thumbnail previews-list-item-thumbnail-img" title="Preview">
<div class="align-items-center d-flex js-input-img-thumbnail-icon justify-content-center"> <div class="align-items-center d-flex js-input-img-thumbnail-icon justify-content-center">
<i class="i-image"></i> <i class="i-img"></i>
</div> </div>
</div> </div>
</div> </div>
@ -44,10 +44,10 @@ function appendImageUploadForm() {
<input accept="image/*" class="form-control js-input-img" id="id_${formsetPrefix}-${i}-source" type="file" name="${formsetPrefix}-${i}-source"> <input accept="image/*" class="form-control js-input-img" id="id_${formsetPrefix}-${i}-source" type="file" name="${formsetPrefix}-${i}-source">
<ul class="pt-0"> <ul class="pt-0">
<li> <li>
<button class="btn btn-link btn-sm js-btn-reset-img-upload-form pl-2 pr-0"><i class="i-refresh"></i> Reset</button> <button class="btn btn-link btn-sm js-btn-reset-img-upload-form ps-2 pe-0"><i class="i-refresh"></i> Reset</button>
</li> </li>
<li> <li>
<button class="btn btn-link btn-sm js-btn-remove-img-upload-form pl-2 pr-0"><i class="i-trash"></i> Delete</button> <button class="btn btn-link btn-sm js-btn-remove-img-upload-form ps-2 pe-0"><i class="i-trash"></i> Delete</button>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -71,7 +71,7 @@
{% trans "Version History" %} {% trans "Version History" %}
</a> </a>
<span class="ml-auto"></span> <span class="ms-auto"></span>
<div class="btn-row"> <div class="btn-row">
{% if is_maintainer %} {% if is_maintainer %}

View File

@ -1,5 +1,5 @@
<a href="{% url "extensions:by-support" support_slug=slug %}" title="Support: {{ name }}" <a href="{% url "extensions:by-support" support_slug=slug %}" title="Support: {{ name }}"
class="badge text-decoration-none align-middle {% if not small %}px-3 py-2 my-1{% endif %} badge-dark{#% if slug == 'official' %}primary{% elif slug == 'community' %}success{% else %}warning{% endif % #}" class="badge text-decoration-none align-middle {% if not small %}px-3 py-2 my-1{% endif %} badge-dark{#% if slug == 'official' %}primary{% elif slug == 'community' %}success{% else %}warning{% endif % #}"
style="{% if not small %}font-size: var(--font-size-base);{% endif %}"> style="{% if not small %}font-size: var(--fs-base);{% endif %}">
<b>{{ name }}</b> <b>{{ name }}</b>
</a> </a>

View File

@ -1,6 +1,6 @@
{% load extensions %} {% load extensions %}
<a href="{% url "extensions:by-tag" tag_slug=tag.slug %}" title="{{ tag.name }}" <a href="{% url "extensions:by-tag" tag_slug=tag.slug %}" title="{{ tag.name }}"
class="badge badge-tag{% if not small %} badge-lg{% endif %} {{ class }}"> class="badge badge-tag{% if not small %} badgefs-lg{% endif %} {{ class }}">
{{ tag.name }} {{ tag.name }}
</a> </a>

View File

@ -1,7 +1,7 @@
{% load common filters %} {% load common filters %}
{% with latest=extension.latest_version %} {% with latest=extension.latest_version %}
<div class="ext-card {% if blur %}is-background-blur{% endif %}"> <div class="ext-card {% if blur %}is-bg-blur{% endif %}">
{% if blur %} {% if blur %}
<div class="ext-card-thumbnail-blur" style="background-image: url({{ extension.previews.listed.first.source.url }});"></div> <div class="ext-card-thumbnail-blur" style="background-image: url({{ extension.previews.listed.first.source.url }});"></div>
{% endif %} {% endif %}
@ -47,7 +47,7 @@
{% endif %} {% endif %}
{% if show_type %} {% if show_type %}
<li class="ml-auto"> <li class="ms-auto">
{{ extension.get_type_display }} {{ extension.get_type_display }}
</li> </li>
{% endif %} {% endif %}

View File

@ -80,7 +80,7 @@
</ul> </ul>
</div> </div>
{% else %} {% else %}
<p class="mb-0"><i class="i-check mr-0"></i> This extension does not require special permissions.</p> <p class="mb-0"><i class="i-check me-0"></i> This extension does not require special permissions.</p>
{% endif %} {% endif %}
</section> </section>
{% endif %} {% endif %}
@ -272,7 +272,7 @@
{% trans 'Reviews' %} {% trans 'Reviews' %}
</a> </a>
</h2> </h2>
<a href="{{ extension.get_ratings_url }}" class="ml-auto">See all</a> <a href="{{ extension.get_ratings_url }}" class="ms-auto">See all</a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -25,7 +25,7 @@
</div> </div>
</div> </div>
<div class="hero-background" style="background-image: url(https://www.blender.org/wp-content/uploads/2022/08/piotr-krynski-scanislands-blender-33lts-crop.jpg); background-position-y: 50%"></div> <div class="hero-bg" style="background-image: url(https://www.blender.org/wp-content/uploads/2022/08/piotr-krynski-scanislands-blender-33lts-crop.jpg); background-position-y: 50%"></div>
<div class="hero-overlay"></div> <div class="hero-overlay"></div>
<div class="hero-credits"></div> <div class="hero-credits"></div>
</div> </div>
@ -37,10 +37,10 @@
<h2> <h2>
<a href="{% url 'extensions:by-type' type_slug='add-ons' %}">Add-ons</a> <a href="{% url 'extensions:by-type' type_slug='add-ons' %}">Add-ons</a>
</h2> </h2>
<a href="{% url 'extensions:by-type' type_slug='add-ons' %}" class="ml-auto">See all</a> <a href="{% url 'extensions:by-type' type_slug='add-ons' %}" class="ms-auto">See all</a>
</div> </div>
<p>Extend Blender capabilities with these add-ons by the community.</p> <p>Extend Blender capabilities with these add-ons by the community.</p>
<div class="cards-list mt-3"> <div class="cards mt-3">
{% for extension in addons %} {% for extension in addons %}
{% include "extensions/components/card.html" %} {% include "extensions/components/card.html" %}
{% endfor %} {% endfor %}
@ -52,12 +52,12 @@
<h2> <h2>
<a href="{% url 'extensions:by-type' type_slug='themes' %}">Themes</a> <a href="{% url 'extensions:by-type' type_slug='themes' %}">Themes</a>
</h2> </h2>
<a href="{% url 'extensions:by-type' type_slug='themes' %}" class="ml-auto fw-normal"> <a href="{% url 'extensions:by-type' type_slug='themes' %}" class="ms-auto fw-normal">
See all See all
</a> </a>
</div> </div>
<p>Blender themes to your liking. Dark, light, flat, colorful, and everything in between.</p> <p>Blender themes to your liking. Dark, light, flat, colorful, and everything in between.</p>
<div class="cards-list mt-3"> <div class="cards mt-3">
{% for extension in themes %} {% for extension in themes %}
{% include "extensions/components/card.html" %} {% include "extensions/components/card.html" %}
{% endfor %} {% endfor %}
@ -65,7 +65,7 @@
<div class="my-5 text-center"> <div class="my-5 text-center">
Got an add-on or theme to share with the community? Got an add-on or theme to share with the community?
<a href="{% url 'extensions:submit' %}" class="text-primary ml-2"> <a href="{% url 'extensions:submit' %}" class="text-primary ms-2">
Upload Upload
<i class="i-chevron-right"></i> <i class="i-chevron-right"></i>
</a> </a>

View File

@ -35,7 +35,7 @@
{% endif %} {% endif %}
{% if tag %} {% if tag %}
<h2 class="d-flex align-items-center"> <h2 class="d-flex align-items-center">
<span class="mr-3">{% blocktranslate %}Extensions with the tag{% endblocktranslate %}</span> <span class="me-3">{% blocktranslate %}Extensions with the tag{% endblocktranslate %}</span>
{% include "extensions/components/badge_tag.html" %} {% include "extensions/components/badge_tag.html" %}
</h2> </h2>
{% endif %} {% endif %}
@ -49,7 +49,7 @@
<div class="row"> <div class="row">
<div class="col"> <div class="col">
{% if object_list %} {% if object_list %}
<div class="cards-list card-layout-horizontal cards-3"> <div class="cards card-layout-horizontal cards-3">
{% for extension in object_list %} {% for extension in object_list %}
{% include "extensions/components/card.html" with show_type=False %} {% include "extensions/components/card.html" with show_type=False %}
{% endfor %} {% endfor %}

View File

@ -2,17 +2,17 @@
{# Upload new preview images #} {# Upload new preview images #}
{% load i18n %} {% load i18n %}
<div class="previews-upload"> <div class="previews-upload">
<div id="add-image-container" class="previews-list"> <div id="add-img-container" class="previews-list">
{{ add_preview_formset.management_form }} {{ add_preview_formset.management_form }}
{{ add_preview_formset.non_form_errors }} {{ add_preview_formset.non_form_errors }}
{% for newform in add_preview_formset %} {% for newform in add_preview_formset %}
{% with inlineform=newform|add_form_classes %} {% with inlineform=newform|add_form_classes %}
<div class="ext-edit-field-row js-ext-edit-field-row"> <div class="ext-edit-field-row js-ext-edit-field-row">
<div class="previews-list-item"> <div class="previews-list-item">
<div class="align-items-center d-flex previews-list-item-thumbnail pl-3"> <div class="align-items-center d-flex previews-list-item-thumbnail ps-3">
<div class="js-input-img-thumbnail previews-list-item-thumbnail-img" title="Preview"> <div class="js-input-img-thumbnail previews-list-item-thumbnail-img" title="Preview">
<div class="align-items-center d-flex js-input-img-thumbnail-icon justify-content-center"> <div class="align-items-center d-flex js-input-img-thumbnail-icon justify-content-center">
<i class="i-image"></i> <i class="i-img"></i>
</div> </div>
</div> </div>
</div> </div>
@ -24,7 +24,7 @@
{% include "common/components/field.html" with field=inlineform.source label='File' %} {% include "common/components/field.html" with field=inlineform.source label='File' %}
<ul class="pt-0"> <ul class="pt-0">
<li> <li>
<button class="btn btn-link btn-sm js-btn-reset-img-upload-form pl-2 pr-0"><i class="i-refresh"></i> Reset</button> <button class="btn btn-link btn-sm js-btn-reset-img-upload-form ps-2 pe-0"><i class="i-refresh"></i> Reset</button>
</li> </li>
</ul> </ul>
</div> </div>
@ -38,7 +38,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col text-right mt-3"> <div class="col text-right mt-3">
<a id="btn-add-image" class="btn"> <a id="btn-add-img" class="btn">
<i class="i-plus"></i> <i class="i-plus"></i>
<span>{% trans 'Add Preview' %}</span> <span>{% trans 'Add Preview' %}</span>
</a> </a>

View File

@ -25,7 +25,7 @@
<div class="row mt-4"> <div class="row mt-4">
<div class="col"> <div class="col">
{% if object_list %} {% if object_list %}
<div class="cards-list"> <div class="cards">
{% for extension in object_list %} {% for extension in object_list %}
{% include "extensions/manage/components/card.html" with show_type=True %} {% include "extensions/manage/components/card.html" with show_type=True %}
{% endfor %} {% endfor %}

View File

@ -68,7 +68,7 @@
<small>Source File</small> <small>Source File</small>
</a> </a>
</li> </li>
<li class="ml-auto"> <li class="ms-auto">
{% include "common/components/field.html" with field=inlineform.DELETE %} {% include "common/components/field.html" with field=inlineform.DELETE %}
</li> </li>
<li> <li>
@ -157,7 +157,7 @@
const previewDragContainer = document.querySelector('.js-previews-drag-container'); const previewDragContainer = document.querySelector('.js-previews-drag-container');
const previewDragClass = 'js-preview-drag'; const previewDragClass = 'js-preview-drag';
{% comment %} dragula([document.querySelector('.js-preview-drag'), document.querySelector('.cards-list')]); {% endcomment %} {% comment %} dragula([document.querySelector('.js-preview-drag'), document.querySelector('.cards')]); {% endcomment %}
dragula([previewDragContainer, previewDragContainer], { dragula([previewDragContainer, previewDragContainer], {
moves: function (el, container, handle) { moves: function (el, container, handle) {
return handle.className.includes(previewDragClass); return handle.className.includes(previewDragClass);

View File

@ -29,7 +29,7 @@
<span class="show-on-collapse blender-version"> <span class="show-on-collapse blender-version">
{% include "extensions/components/blender_version.html" with version=version %} {% include "extensions/components/blender_version.html" with version=version %}
</span> </span>
<ul class="ml-auto"> <ul class="ms-auto">
<li class="show-on-collapse">{{ version.file.size_bytes|filesizeformat }}</li> <li class="show-on-collapse">{{ version.file.size_bytes|filesizeformat }}</li>
<li class="show-on-collapse"><i class="i-download"></i> {{ version.download_count }}</li> <li class="show-on-collapse"><i class="i-download"></i> {{ version.download_count }}</li>
<li> <li>

View File

@ -32,7 +32,7 @@
h1 { h1 {
background: linear-gradient(to right, #0cc, violet); background: linear-gradient(to right, #0cc, violet);
background-clip: text; background-clip: text;
-webkit-background-clip: text; -webkit-bg-clip: text;
-webkit-text-fill-color: transparent; -webkit-text-fill-color: transparent;
font-weight: 300; font-weight: 300;
font-size: 1.6em; font-size: 1.6em;

View File

@ -87,9 +87,9 @@
text-decoration: none text-decoration: none
span span
color: var(--text-color-secondary) color: var(--color-text-secondary)
display: block display: block
font-size: var(--font-size-base) font-size: var(--fs-base)
.stars .stars
+margin(auto, x) +margin(auto, x)

View File

@ -14,7 +14,7 @@
{{ rating.user }} {{ rating.user }}
</a> </a>
</li> </li>
<li class="mr-auto"> <li class="me-auto">
{% with score_percentage=rating.score %} {% with score_percentage=rating.score %}
<a href="{{ extension.get_ratings_url }}?score={{ rating.score }}"> <a href="{{ extension.get_ratings_url }}?score={{ rating.score }}">
{% include "ratings/components/average.html" with score=rating.score %} {% include "ratings/components/average.html" with score=rating.score %}

View File

@ -13,7 +13,7 @@
{% endif %} {% endif %}
</h2> </h2>
{% if score %} {% if score %}
<div class="ml-auto"> <div class="ms-auto">
<a href="{{ extension.get_ratings_url }}" class="text-muted">See all</a> <a href="{{ extension.get_ratings_url }}" class="text-muted">See all</a>
</div> </div>
{% endif %} {% endif %}

View File

@ -18,7 +18,7 @@
</a> </a>
{% if extension.review_activity.all %} {% if extension.review_activity.all %}
<a href="{{ extension.get_review_url }}#activity-{{ extension.review_activity.all.last.id }}" class="ml-3"> <a href="{{ extension.get_review_url }}#activity-{{ extension.review_activity.all.last.id }}" class="ms-3">
<span>{{ extension.review_activity.all.last.date_created|naturaltime_compact }}</span> <span>{{ extension.review_activity.all.last.date_created|naturaltime_compact }}</span>
</a> </a>
{% endif %} {% endif %}

View File

@ -24,7 +24,7 @@
{% trans "Version History" %} {% trans "Version History" %}
</a> </a>
<span class="ml-auto"></span> <span class="ms-auto"></span>
<div class="btn-row"> <div class="btn-row">
{% if is_maintainer %} {% if is_maintainer %}
@ -137,7 +137,7 @@
{{ activity.user }} {{ activity.user }}
</a> </a>
</li> </li>
<li class="ml-auto"> <li class="ms-auto">
<a href="#activity-{{ activity.id }}" title="{{ activity.date_created }}"> <a href="#activity-{{ activity.id }}" title="{{ activity.date_created }}">
{{ activity.date_created|naturaltime_compact }} {{ activity.date_created|naturaltime_compact }}
</a> </a>
@ -165,7 +165,7 @@
{% include "common/components/field.html" with field=form.message %} {% include "common/components/field.html" with field=form.message %}
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<div class="btn-row ml-3 w-100 justify-content-end"> <div class="btn-row ms-3 w-100 justify-content-end">
{% if is_maintainer or request.user.is_moderator %} {% if is_maintainer or request.user.is_moderator %}
{% include "common/components/field.html" with field=form.type %} {% include "common/components/field.html" with field=form.type %}
{% endif %} {% endif %}

View File

@ -1,3 +1,3 @@
{% for _slug, badge in badges.items %} {% for _slug, badge in badges.items %}
<img class="mr-2" width="{{ width }}" src="{{ badge.image }}" title="{{ badge.description }}" label="{{ badge.label }}" /> <img class="me-2" width="{{ width }}" src="{{ badge.image }}" title="{{ badge.description }}" label="{{ badge.label }}" />
{% endfor %} {% endfor %}

View File

@ -1,7 +1,7 @@
{% load static %} {% load static %}
<img src="{% if user.image %}{{ user.image.url }}{% else %}{% static 'common/images/blank-profile-pic.png' %}{% endif %}" class="profile-avatar {{ classes }}"> <img src="{% if user.image %}{{ user.image.url }}{% else %}{% static 'common/images/blank-profile-pic.png' %}{% endif %}" class="profile-avatar {{ classes }}">
{% if show_name %} {% if show_name %}
<span class="ml-2"> <span class="ms-2">
{% firstof user.full_name user.username %} {% firstof user.full_name user.username %}
</span> </span>
{% endif %} {% endif %}

View File

@ -27,12 +27,12 @@
</div> </div>
<div class="col-md-6 mb-4"> <div class="col-md-6 mb-4">
<label class="mb-2 h3" for="email"> <label class="mb-2 h3" for="email">
<span class="mr-1">Email</span> <span class="me-1">Email</span>
{% if user.confirmed_email_at %} {% if user.confirmed_email_at %}
<span class="align-middle badge badge-sm badge-success"><i class="i-check"></i>Confirmed</span> <span class="align-middle badge badgefs-xs badge-success"><i class="i-check"></i>Confirmed</span>
{% else %} {% else %}
<span class="align-middle badge badge-sm badge-warning"><i class="i-alert-triangle"></i>Not yet confirmed</span> <span class="align-middle badge badgefs-xs badge-warning"><i class="i-alert-triangle"></i>Not yet confirmed</span>
{% endif %} {% endif %}
</label> </label>
<div class="align-items-center d-flex position-relative"> <div class="align-items-center d-flex position-relative">