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
4 changed files with 23 additions and 1 deletions
Showing only changes of commit 4b274407c5 - Show all commits

View File

@ -1,4 +1,20 @@
(function() { (function() {
// Create function agreeWithTerms
function agreeWithTerms() {
const agreeWithTermsInput = document.querySelector('#id_agreed_with_terms');
agreeWithTermsInput.addEventListener('change', function(e) {
const agreeWithTermsBtnSubmit = document.querySelector('.js-agree-with-terms-btn-submit');
// Check if checkbox is checked
if (e.target.checked == true) {
agreeWithTermsBtnSubmit.removeAttribute('disabled');
} else {
agreeWithTermsBtnSubmit.setAttribute('disabled', true);
}
});
}
// Create function btnBack // Create function btnBack
function btnBack() { function btnBack() {
const btnBack = document.querySelectorAll('.js-btn-back'); const btnBack = document.querySelectorAll('.js-btn-back');
@ -90,6 +106,7 @@
} }
// Create function init // Create function init
function init() { function init() {
agreeWithTerms();
btnBack(); btnBack();
commentForm(); commentForm();
copyInstallUrl(); copyInstallUrl();

View File

@ -0,0 +1,4 @@
button,
.btn
&[type=submit]
transition: opacity var(--transition-speed)

View File

@ -18,6 +18,7 @@ $container-width: map-get($container-max-widths, 'xl')
@import '_alert.sass' @import '_alert.sass'
@import '_badge.sass' @import '_badge.sass'
@import '_box.sass' @import '_box.sass'
@import '_button.sass'
@import '_cards.sass' @import '_cards.sass'
@import '_code.sass' @import '_code.sass'
@import '_comments.sass' @import '_comments.sass'

View File

@ -70,7 +70,7 @@
</div> </div>
</div> </div>
<div class="mt-4"> <div class="mt-4">
<button type="submit" class="btn btn-block btn-primary px-5 py-2"> <button type="submit" class="btn btn-block btn-primary js-agree-with-terms-btn-submit px-5 py-2" disabled>
<i class="i-upload"></i> <i class="i-upload"></i>
<span> <span>
{% if extension %} {% if extension %}