]> git.ipfire.org Git - people/ms/westferry.git/commitdiff
frontend: Add a demo page
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 10 May 2025 14:56:39 +0000 (14:56 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 10 May 2025 14:56:39 +0000 (14:56 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
frontend/src/router/index.ts
frontend/src/views/DemoView.vue [new file with mode: 0644]

index 3e49915cae707b92441e745b76f9a7958cd8f2ac..9c70e2fa5eea0424edae0b8d139295d0649fe21f 100644 (file)
@@ -16,6 +16,13 @@ const router = createRouter({
       // this generates a separate chunk (About.[hash].js) for this route
       // which is lazy-loaded when the route is visited.
       component: () => import('../views/AboutView.vue'),
+    },
+
+       // Add the demo page (this is being lazy-loaded)
+    {
+      path: "/demo",
+      name: "demo",
+      component: () => import("../views/DemoView.vue"),
     },
   ],
 })
diff --git a/frontend/src/views/DemoView.vue b/frontend/src/views/DemoView.vue
new file mode 100644 (file)
index 0000000..e1cde6b
--- /dev/null
@@ -0,0 +1,13 @@
+<!--
+       This is a demo page that shows all possible elements for testing.
+-->
+
+<script setup lang="ts">
+       import Section from "../components/Section.vue"
+</script>
+
+<template>
+       <Section :title="$t('This Is A Section')">
+               <p>{{ $t("The section can have any content...") }}</p>
+       </Section>
+</template>