diff --git a/wp-content/themes/ccat/app/components/nodes/TheArticle.fragment.gql b/wp-content/themes/ccat/app/components/nodes/TheArticle.fragment.gql
new file mode 100644
index 0000000..2ad3abc
--- /dev/null
+++ b/wp-content/themes/ccat/app/components/nodes/TheArticle.fragment.gql
@@ -0,0 +1,3 @@
+fragment TheArticle on Post {
+ title
+}
\ No newline at end of file
diff --git a/wp-content/themes/ccat/app/components/nodes/TheArticle.vue b/wp-content/themes/ccat/app/components/nodes/TheArticle.vue
new file mode 100644
index 0000000..6cc5b2d
--- /dev/null
+++ b/wp-content/themes/ccat/app/components/nodes/TheArticle.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/wp-content/themes/ccat/app/components/nodes/TheEvent.fragment.gql b/wp-content/themes/ccat/app/components/nodes/TheEvent.fragment.gql
new file mode 100644
index 0000000..6421804
--- /dev/null
+++ b/wp-content/themes/ccat/app/components/nodes/TheEvent.fragment.gql
@@ -0,0 +1,3 @@
+fragment TheEvent on Event {
+ title
+}
\ No newline at end of file
diff --git a/wp-content/themes/ccat/app/components/nodes/TheEvent.vue b/wp-content/themes/ccat/app/components/nodes/TheEvent.vue
new file mode 100644
index 0000000..ce1faa6
--- /dev/null
+++ b/wp-content/themes/ccat/app/components/nodes/TheEvent.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/wp-content/themes/ccat/app/components/nodes/TheLocation.fragment.gql b/wp-content/themes/ccat/app/components/nodes/TheLocation.fragment.gql
new file mode 100644
index 0000000..e229365
--- /dev/null
+++ b/wp-content/themes/ccat/app/components/nodes/TheLocation.fragment.gql
@@ -0,0 +1,3 @@
+fragment TheLocation on Location {
+ title
+}
\ No newline at end of file
diff --git a/wp-content/themes/ccat/app/components/nodes/TheLocation.vue b/wp-content/themes/ccat/app/components/nodes/TheLocation.vue
new file mode 100644
index 0000000..3fe04a6
--- /dev/null
+++ b/wp-content/themes/ccat/app/components/nodes/TheLocation.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wp-content/themes/ccat/app/components/nodes/TheMembership.fragment.gql b/wp-content/themes/ccat/app/components/nodes/TheMembership.fragment.gql
new file mode 100644
index 0000000..5581368
--- /dev/null
+++ b/wp-content/themes/ccat/app/components/nodes/TheMembership.fragment.gql
@@ -0,0 +1,3 @@
+fragment TheMembership on Membership {
+ title
+}
\ No newline at end of file
diff --git a/wp-content/themes/ccat/app/components/nodes/TheMembership.vue b/wp-content/themes/ccat/app/components/nodes/TheMembership.vue
new file mode 100644
index 0000000..3b8e660
--- /dev/null
+++ b/wp-content/themes/ccat/app/components/nodes/TheMembership.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wp-content/themes/ccat/app/components/nodes/TheProject.fragment.gql b/wp-content/themes/ccat/app/components/nodes/TheProject.fragment.gql
new file mode 100644
index 0000000..3dc1314
--- /dev/null
+++ b/wp-content/themes/ccat/app/components/nodes/TheProject.fragment.gql
@@ -0,0 +1,3 @@
+fragment TheProject on Project {
+ title
+}
\ No newline at end of file
diff --git a/wp-content/themes/ccat/app/components/nodes/TheProject.vue b/wp-content/themes/ccat/app/components/nodes/TheProject.vue
new file mode 100644
index 0000000..95cfef2
--- /dev/null
+++ b/wp-content/themes/ccat/app/components/nodes/TheProject.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wp-content/themes/ccat/app/components/nodes/TheResource.fragment.gql b/wp-content/themes/ccat/app/components/nodes/TheResource.fragment.gql
new file mode 100644
index 0000000..7651a8f
--- /dev/null
+++ b/wp-content/themes/ccat/app/components/nodes/TheResource.fragment.gql
@@ -0,0 +1,3 @@
+fragment TheResource on Resource {
+ title
+}
\ No newline at end of file
diff --git a/wp-content/themes/ccat/app/components/nodes/TheResource.vue b/wp-content/themes/ccat/app/components/nodes/TheResource.vue
new file mode 100644
index 0000000..8d47f3b
--- /dev/null
+++ b/wp-content/themes/ccat/app/components/nodes/TheResource.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wp-content/themes/ccat/app/composables/useNodeByUri.gql b/wp-content/themes/ccat/app/composables/useNodeByUri.gql
index 04fc213..7f00bbc 100644
--- a/wp-content/themes/ccat/app/composables/useNodeByUri.gql
+++ b/wp-content/themes/ccat/app/composables/useNodeByUri.gql
@@ -5,5 +5,23 @@ query nodeByUri($uri: String!) {
... on Page {
...ThePage
}
+ ... on Post {
+ ...TheArticle
+ }
+ ... on Event {
+ ...TheEvent
+ }
+ ... on Location {
+ ...TheLocation
+ }
+ ... on Membership {
+ ...TheMembership
+ }
+ ... on Project {
+ ...TheProject
+ }
+ ... on Resource {
+ ...TheResource
+ }
}
}
\ No newline at end of file
diff --git a/wp-content/themes/ccat/app/composables/useNodeByUri.ts b/wp-content/themes/ccat/app/composables/useNodeByUri.ts
index 6f9af14..3eefbb3 100644
--- a/wp-content/themes/ccat/app/composables/useNodeByUri.ts
+++ b/wp-content/themes/ccat/app/composables/useNodeByUri.ts
@@ -1,5 +1,21 @@
-import type { ThePageFragment } from "#graphql-operations";
-import { ThePage } from "#components";
+import type {
+ ThePageFragment,
+ TheArticleFragment,
+ TheEventFragment,
+ TheLocationFragment,
+ TheMembershipFragment,
+ TheProjectFragment,
+ TheResourceFragment,
+} from "#graphql-operations";
+import {
+ ThePage,
+ TheArticle,
+ TheEvent,
+ TheLocation,
+ TheMembership,
+ TheProject,
+ TheResource,
+} from "#components";
export async function useNodeByUri() {
const route = useRoute();
@@ -12,6 +28,18 @@ export async function useNodeByUri() {
switch (node?.__typename) {
case "Page":
return { component: ThePage, node: node as ThePageFragment };
+ case "Post":
+ return { component: TheArticle, node: node as TheArticleFragment };
+ case "Event":
+ return { component: TheEvent, node: node as TheEventFragment };
+ case "Location":
+ return { component: TheLocation, node: node as TheLocationFragment };
+ case "Membership":
+ return { component: TheMembership, node: node as TheMembershipFragment };
+ case "Project":
+ return { component: TheProject, node: node as TheProjectFragment };
+ case "Resource":
+ return { component: TheResource, node: node as TheResourceFragment };
default:
throw createError({ statusCode: 404, message: "Page non trouvée", fatal: true });
}