feat: background photo toggle available everywhere, not just dev
This commit is contained in:
@@ -9,8 +9,6 @@
|
|||||||
document.body.style.setProperty('--bg-photo-url', 'url("' + url + '")');
|
document.body.style.setProperty('--bg-photo-url', 'url("' + url + '")');
|
||||||
document.body.classList.add('bg-photo');
|
document.body.classList.add('bg-photo');
|
||||||
|
|
||||||
{{if not .IsProduction}}
|
|
||||||
// Dev only: toggle support
|
|
||||||
window.toggleBgPhoto = function() {
|
window.toggleBgPhoto = function() {
|
||||||
var isOn = document.body.classList.contains('bg-photo');
|
var isOn = document.body.classList.contains('bg-photo');
|
||||||
if (isOn) {
|
if (isOn) {
|
||||||
@@ -24,13 +22,10 @@
|
|||||||
if (icon) icon.setAttribute('icon', isOn ? 'mdi:image-outline' : 'mdi:image');
|
if (icon) icon.setAttribute('icon', isOn ? 'mdi:image-outline' : 'mdi:image');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
{{end}}
|
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{if not .IsProduction}}
|
<!-- Background Photo Toggle -->
|
||||||
<!-- Background Photo Toggle (Dev Only) -->
|
|
||||||
<button
|
<button
|
||||||
id="bg-photo-toggle"
|
id="bg-photo-toggle"
|
||||||
class="fixed-btn bg-photo-btn no-print has-tooltip"
|
class="fixed-btn bg-photo-btn no-print has-tooltip"
|
||||||
|
|||||||
Reference in New Issue
Block a user