refactor: Consolidate script imports to use main.js bundle
- dashboard.templ: Replaced individual script tags with single main.js import - admin_users.templ, custom_section.templ: Minor formatting/cleanup - docs.templ: Updated script imports (excluded from Alpine conversion per user request) - api.ts, docs.ts, password_validation.ts: Minor updates for compatibility
This commit is contained in:
+13
-1
@@ -1,3 +1,5 @@
|
||||
import { Alpine } from "./alpine";
|
||||
|
||||
function toggleSidebar(): void {
|
||||
const sidebar = document.getElementById("docs-sidebar");
|
||||
const overlay = document.getElementById("docs-overlay");
|
||||
@@ -91,4 +93,14 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
initializeDocsSearch();
|
||||
});
|
||||
|
||||
(window as any).toggleSidebar = toggleSidebar;
|
||||
Alpine.global("docs", {
|
||||
toggleSidebar,
|
||||
initializeSearch: initializeDocsSearch,
|
||||
});
|
||||
|
||||
export { toggleSidebar, initializeDocsSearch };
|
||||
|
||||
Alpine.global("docs", {
|
||||
toggleSidebar,
|
||||
initializeSearch: initializeDocsSearch,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user