mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
fix errors
This commit is contained in:
@@ -37,8 +37,13 @@ isPro: true
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
<script type="module">
|
||||
let didInit = false;
|
||||
|
||||
function init() {
|
||||
if (didInit) return;
|
||||
didInit = true;
|
||||
|
||||
const paletteContainer = document.getElementById('color-palettes');
|
||||
const palettePicker = document.getElementById('palette-picker');
|
||||
const paletteStylesheet = document.getElementById('palette-stylesheet');
|
||||
@@ -66,7 +71,10 @@ isPro: true
|
||||
// Update the palette stylesheet
|
||||
paletteStylesheet.href = `/dist/styles/color/${selectedValue}.css`;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', init);
|
||||
window.addEventListener('turbo:load', init);
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -35,7 +35,12 @@ isPro: true
|
||||
</wa-comparison>
|
||||
|
||||
<script type="module">
|
||||
let didInit = false;
|
||||
|
||||
function init() {
|
||||
if (didInit) return;
|
||||
didInit = true;
|
||||
|
||||
const themePicker = document.getElementById('theme-picker');
|
||||
const afterFrame = document.querySelector('wa-zoomable-frame[slot="after"]');
|
||||
const beforeFrame = document.querySelector('wa-zoomable-frame[slot="before"]');
|
||||
@@ -56,7 +61,7 @@ isPro: true
|
||||
|
||||
const queryString = params.toString() ? '?' + params.toString() : '';
|
||||
const darkQueryString = '?' + darkParams.toString();
|
||||
console.log(queryString);
|
||||
|
||||
afterFrame.src = baseUrl + queryString;
|
||||
beforeFrame.src = baseUrl + darkQueryString;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user