feat: completely remove lightbox feature
All checks were successful
Deploy Theme / deploy (push) Successful in 15s
All checks were successful
Deploy Theme / deploy (push) Successful in 15s
This commit is contained in:
14
default.hbs
14
default.hbs
@@ -3,8 +3,6 @@
|
||||
x-data="{
|
||||
theme: localStorage.getItem('theme') || (window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark'),
|
||||
mobileMenuOpen: false,
|
||||
lightboxOpen: false,
|
||||
lightboxImage: '',
|
||||
init() {
|
||||
$watch('theme', val => {
|
||||
localStorage.setItem('theme', val);
|
||||
@@ -12,19 +10,8 @@
|
||||
});
|
||||
document.documentElement.setAttribute('data-theme', this.theme);
|
||||
document.documentElement.classList.remove('hidden');
|
||||
},
|
||||
handleGlobalClick(e) {
|
||||
if (this.lightboxOpen && e.target.closest('#lightbox')) return;
|
||||
|
||||
const img = e.target.closest('img');
|
||||
if (img && img.src && !img.closest('a') && img.closest('.kg-image-card, .post-content, .post-feature-image')) {
|
||||
e.preventDefault();
|
||||
this.lightboxImage = img.src;
|
||||
this.lightboxOpen = true;
|
||||
}
|
||||
}
|
||||
}"
|
||||
@click.window="handleGlobalClick($event)"
|
||||
:data-theme="theme"
|
||||
class="hidden">
|
||||
<head>
|
||||
@@ -51,7 +38,6 @@
|
||||
{{> footer}}
|
||||
|
||||
{{> mobile-menu}}
|
||||
{{> lightbox}}
|
||||
</div>
|
||||
|
||||
{{ghost_foot}}
|
||||
|
||||
Reference in New Issue
Block a user