Configure shop app, admin sidebar, media routing, and Stripe dependencies
This commit is contained in:
commit
93d83a0d63
188 files changed
+9220
No files matched your search
@@ -0,0 +1,22 @@
|
||||
for (const field of document.querySelectorAll('.studio-palette-field')) {
|
||||
const hex = field.querySelector('[data-theme-hex]');
|
||||
const swatch = field.querySelector('input[type=color]');
|
||||
const refresh = () => { swatch.value = /^#[a-f0-9]{6}$/i.test(hex.value) ? hex.value : swatch.dataset.default; };
|
||||
hex.addEventListener('input', refresh);
|
||||
swatch.addEventListener('input', () => { hex.value = swatch.value; });
|
||||
refresh();
|
||||
swatch.hidden = false;
|
||||
}
|
||||
|
||||
const referenceNoteColors = document.querySelector('[data-reference-note-colors]');
|
||||
if (referenceNoteColors) {
|
||||
referenceNoteColors.hidden = false;
|
||||
referenceNoteColors.addEventListener('click', () => {
|
||||
for (const field of referenceNoteColors.closest('fieldset').querySelectorAll('.studio-palette-field')) {
|
||||
const hex = field.querySelector('[data-theme-hex]');
|
||||
if (!['author_bubble', 'author_card'].includes(hex.name)) continue;
|
||||
hex.value = field.querySelector('input[type=color]').dataset.default;
|
||||
hex.dispatchEvent(new Event('input', {bubbles: true}));
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user