fix
This commit is contained in:
parent
72a77cc919
commit
6b75d2b34a
2 changed files with 18 additions and 17 deletions
|
@ -145,19 +145,4 @@ function expandDesktopImage(image) {
|
|||
document.getElementById("desktop-expanded-image").src = image.replace("200w_d.webp", "giphy.webp");
|
||||
document.getElementById("desktop-expanded-image-link").href = image;
|
||||
document.getElementById("desktop-expanded-image-wrap-link").href=image;
|
||||
};
|
||||
|
||||
|
||||
var previousTheme = ['theme-iron','dark'];
|
||||
|
||||
function changeTheme(theme) {
|
||||
const body = document.body;
|
||||
// if previous selection has a value, remove them from body tag
|
||||
if (previousTheme.length) {
|
||||
previousTheme.map(v => body.classList.toggle(v));
|
||||
}
|
||||
// toggle classes in body tag
|
||||
theme.map(v => body.classList.toggle(v));
|
||||
// Set global previous selection to current selection
|
||||
previousTheme = theme;
|
||||
}
|
||||
};
|
|
@ -348,8 +348,24 @@
|
|||
|
||||
{% if v %}
|
||||
<script>function formkey() {return '{{v.formkey}}';}</script>
|
||||
|
||||
<script>
|
||||
var previousTheme = ['theme-iron','dark'];
|
||||
//var previousTheme = {{ u.theme }}.split(' ');
|
||||
function changeTheme(theme) {
|
||||
const body = document.body;
|
||||
// if previous selection has a value, remove them from body tag
|
||||
if (previousTheme.length) {
|
||||
previousTheme.map(v => body.classList.toggle(v));
|
||||
}
|
||||
// toggle classes in body tag
|
||||
theme.map(v => body.classList.toggle(v));
|
||||
// Set global previous selection to current selection
|
||||
previousTheme = theme;
|
||||
}
|
||||
</script>
|
||||
{% endif %}
|
||||
<script src="/assets/CHRISTMAS/js/default.js?v=203"></script>
|
||||
<script src="/assets/CHRISTMAS/js/default.js?v=204"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue