fix: background toggle button dev-only, photo always visible in production
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
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}}
|
||||||
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) {
|
||||||
@@ -22,10 +23,12 @@
|
|||||||
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>
|
||||||
|
|
||||||
<!-- Background Photo Toggle -->
|
{{if not .IsProduction}}
|
||||||
|
<!-- 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"
|
||||||
@@ -36,3 +39,4 @@
|
|||||||
</button>
|
</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
|||||||
Reference in New Issue
Block a user