From 9b8c079d79a0db781737adc3315c7c26783b09fe Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Sat, 21 Mar 2026 20:58:44 +0000 Subject: [PATCH] Start sorting out basic layout elements --- html/template/sync/authenticated.html | 2 +- ts/App.vue | 20 +++++++++++++++++ ts/Home.vue | 10 +++++++++ ts/app.vue | 24 -------------------- ts/components/common/NavigationLink.vue | 30 +++++++++++++++++++++++++ ts/components/layout/MainContent.vue | 18 +++++++++++++++ ts/components/layout/Sidebar.vue | 29 ++++++++++++++++++++++++ ts/global.d.ts | 1 - ts/main.ts | 27 +--------------------- 9 files changed, 109 insertions(+), 52 deletions(-) create mode 100644 ts/App.vue create mode 100644 ts/Home.vue delete mode 100644 ts/app.vue create mode 100644 ts/components/common/NavigationLink.vue create mode 100644 ts/components/layout/MainContent.vue create mode 100644 ts/components/layout/Sidebar.vue diff --git a/html/template/sync/authenticated.html b/html/template/sync/authenticated.html index 0e5045c3..eb44da9f 100644 --- a/html/template/sync/authenticated.html +++ b/html/template/sync/authenticated.html @@ -15,6 +15,6 @@ {{ if not .Config.IsProductionEnvironment }} {{ end }} - + diff --git a/ts/App.vue b/ts/App.vue new file mode 100644 index 00000000..a93cead3 --- /dev/null +++ b/ts/App.vue @@ -0,0 +1,20 @@ + + + + + diff --git a/ts/Home.vue b/ts/Home.vue new file mode 100644 index 00000000..74903fe9 --- /dev/null +++ b/ts/Home.vue @@ -0,0 +1,10 @@ + + + diff --git a/ts/app.vue b/ts/app.vue deleted file mode 100644 index 9bf2ba2c..00000000 --- a/ts/app.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/ts/components/common/NavigationLink.vue b/ts/components/common/NavigationLink.vue new file mode 100644 index 00000000..26c23069 --- /dev/null +++ b/ts/components/common/NavigationLink.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/ts/components/layout/MainContent.vue b/ts/components/layout/MainContent.vue new file mode 100644 index 00000000..2a4a8ad2 --- /dev/null +++ b/ts/components/layout/MainContent.vue @@ -0,0 +1,18 @@ + + + + + diff --git a/ts/components/layout/Sidebar.vue b/ts/components/layout/Sidebar.vue new file mode 100644 index 00000000..ec627e7d --- /dev/null +++ b/ts/components/layout/Sidebar.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/ts/global.d.ts b/ts/global.d.ts index 0a2fbbe9..8b8f3ee3 100644 --- a/ts/global.d.ts +++ b/ts/global.d.ts @@ -4,7 +4,6 @@ declare global { interface Window { Alpine: any; SSEManager: any; - createAppPlanning: any; bootstrap: typeof bootstrap; } } diff --git a/ts/main.ts b/ts/main.ts index 0f013d35..65630938 100644 --- a/ts/main.ts +++ b/ts/main.ts @@ -1,6 +1,6 @@ import Alpine from "./vendor/alpinejs-3.15.8.js"; import { createApp } from "vue"; -import App from "./app.vue"; +import App from "./App.vue"; import { SSEManager } from "./sse-manager"; //import { SetupSidebar } from "./sidebar"; import "maplibre-gl/dist/maplibre-gl.css"; @@ -14,25 +14,12 @@ import "./style/style.scss"; import * as bootstrap from "bootstrap"; window.bootstrap = bootstrap; -import { Planning } from "./app/planning"; - // Make Alpine available on window for inline Alpine window.Alpine = Alpine; // Make SSEManager available to all the JavaScript window.SSEManager = SSEManager; -function createAppPlanning() { - const app = createApp({ - data() { - return { - count: 0, - }; - }, - }); -} -window.createAppPlanning = createAppPlanning; - // Wait for DOM to be ready, then initialize Alpine document.addEventListener("DOMContentLoaded", () => { Alpine.start(); @@ -63,16 +50,4 @@ interface GreetingComponent { updateMessage(): void; } -Alpine.data( - "greeting", - (): GreetingComponent => ({ - message: "Welcome to Alpine + TypeScript!", - name: "World", - - updateMessage() { - this.message = "Message updated at " + new Date().toLocaleTimeString(); - }, - }), -); - createApp(App).mount("#app");