/** * Main entry point for the Gallery application * This file initializes the app when the DOM is ready */ import { GalleryApp } from './gallery-app.js'; // Global app instance for backward compatibility let app; // Global functions for onclick handlers (backward compatibility) function toggleTheme() { app.toggleTheme(); } function toggleSidebar() { app.toggleSidebar(); } // Make functions globally available window.toggleTheme = toggleTheme; window.toggleSidebar = toggleSidebar; // Initialize application when DOM is ready document.addEventListener('DOMContentLoaded', function() { // Configuration will be injected by the template const config = window.galleryConfig || {}; app = new GalleryApp(config); // Make app globally available window.app = app; });