-
-
-
-
-
-
-
+
@@ -19,7 +21,7 @@ import type SharedHero from "../types/component/sharedHero";
import type { ComponentTypes } from "../types/component/baseComponent";
defineProps({
- hero: Object as PropType
,
+ hero: { type: Object as PropType, required: false, default: null },
content: Array,
});
diff --git a/components/Header.vue b/components/Header.vue
index 674ad96..1b89705 100644
--- a/components/Header.vue
+++ b/components/Header.vue
@@ -9,7 +9,7 @@
primary-link
v-for="link in navbar.navbar_items"
:key="link.id"
- :to="`/${link.URL}/${link.default_active_child}`"
+ :to="`/${link.URL}/${link.default_active_child ?? ''}`"
:class="link.URL == params?.[0] ? 'active' : ''"
>
{{ link.name }}
@@ -26,7 +26,7 @@
v-for="sublink in navbar_sub_items"
:key="sublink.id"
:to="`/${params?.[0]}/${sublink.URL}`"
- :class="sublink.URL == params?.[1] ? 'active' : ''"
+ :class="sublink.URL == params?.[1] && !params[2] ? 'active' : ''"
>
{{ sublink.name }}
diff --git a/components/shared/Hero.vue b/components/shared/Hero.vue
index 6c201c0..1920ede 100644
--- a/components/shared/Hero.vue
+++ b/components/shared/Hero.vue
@@ -1,13 +1,13 @@
-
+
-
diff --git a/pages/[...slug].vue b/pages/[...slug].vue
index b7c3dfe..d44de09 100644
--- a/pages/[...slug].vue
+++ b/pages/[...slug].vue
@@ -1,41 +1,37 @@
-
-
+
+
+
diff --git a/pages/index.vue b/pages/index.vue
index 81e519f..59f6d58 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/types/collection/article.ts b/types/collection/article.ts
index 5be8f1e..3f59a6f 100644
--- a/types/collection/article.ts
+++ b/types/collection/article.ts
@@ -1,13 +1,5 @@
-export default interface Article {
- id: number;
- documentId: string;
- title: string;
- description: string;
- slug: string;
+import type BaseCollection from "./baseCollection";
+
+export default interface Article extends BaseCollection {
content: Array<{ type: string; children: Array<{ type: string; text: string }>; level?: number }>;
- date: string;
- createdAt: string;
- updatedAt: string;
- publishedAt: string;
- locale: string;
}
diff --git a/types/collection/baseCollection.ts b/types/collection/baseCollection.ts
new file mode 100644
index 0000000..a4408d8
--- /dev/null
+++ b/types/collection/baseCollection.ts
@@ -0,0 +1,12 @@
+export default interface BaseCollection {
+ id: number;
+ documentId: string;
+ title: string;
+ description: string;
+ slug: string;
+ date: string;
+ createdAt: string;
+ updatedAt: string;
+ publishedAt: string;
+ locale: string;
+}
diff --git a/types/collection/event.ts b/types/collection/event.ts
new file mode 100644
index 0000000..6206029
--- /dev/null
+++ b/types/collection/event.ts
@@ -0,0 +1,5 @@
+import type BaseCollection from "./baseCollection";
+
+export default interface Event extends BaseCollection {
+ content: Array<{ type: string; children: Array<{ type: string; text: string }>; level?: number }>;
+}
diff --git a/types/collection/lookup.ts b/types/collection/lookup.ts
new file mode 100644
index 0000000..8501cf8
--- /dev/null
+++ b/types/collection/lookup.ts
@@ -0,0 +1,9 @@
+export default interface Lookup {
+ id: number;
+ documentId: string;
+ collection: string;
+ reference: string;
+ createdAt: Date;
+ updatedAt: Date;
+ publishedAt: Date;
+}
diff --git a/types/collection/operation.ts b/types/collection/operation.ts
new file mode 100644
index 0000000..db197d9
--- /dev/null
+++ b/types/collection/operation.ts
@@ -0,0 +1,5 @@
+import type BaseCollection from "./baseCollection";
+
+export default interface Operation extends BaseCollection {
+ content: Array<{ type: string; children: Array<{ type: string; text: string }>; level?: number }>;
+}