diff --git a/wp-content/themes/ccat/app/components/nodes/ThePage.fragment.gql b/wp-content/themes/ccat/app/components/nodes/ThePage.fragment.gql
new file mode 100644
index 0000000..fd7e061
--- /dev/null
+++ b/wp-content/themes/ccat/app/components/nodes/ThePage.fragment.gql
@@ -0,0 +1,3 @@
+fragment ThePage on Page {
+ title
+}
diff --git a/wp-content/themes/ccat/app/components/nodes/ThePage.vue b/wp-content/themes/ccat/app/components/nodes/ThePage.vue
new file mode 100644
index 0000000..bd3164b
--- /dev/null
+++ b/wp-content/themes/ccat/app/components/nodes/ThePage.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/wp-content/themes/ccat/app/composables/useNodeByUri.gql b/wp-content/themes/ccat/app/composables/useNodeByUri.gql
new file mode 100644
index 0000000..04fc213
--- /dev/null
+++ b/wp-content/themes/ccat/app/composables/useNodeByUri.gql
@@ -0,0 +1,9 @@
+query nodeByUri($uri: String!) {
+ nodeByUri(uri: $uri) {
+ __typename
+ id
+ ... on Page {
+ ...ThePage
+ }
+ }
+}
\ 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
new file mode 100644
index 0000000..6f9af14
--- /dev/null
+++ b/wp-content/themes/ccat/app/composables/useNodeByUri.ts
@@ -0,0 +1,18 @@
+import type { ThePageFragment } from "#graphql-operations";
+import { ThePage } from "#components";
+
+export async function useNodeByUri() {
+ const route = useRoute();
+ const uri = computed(() => route.path);
+ const { data } = await useAsyncGraphqlQuery("nodeByUri", { uri: uri.value }, { graphqlCaching: { client: true } });
+ if (data.value?.errors?.length) {
+ throw createError({ statusCode: 500, message: "Erreur lors de la récupération du contenu", fatal: true });
+ }
+ const node = data.value?.data.nodeByUri;
+ switch (node?.__typename) {
+ case "Page":
+ return { component: ThePage, node: node as ThePageFragment };
+ default:
+ throw createError({ statusCode: 404, message: "Page non trouvée", fatal: true });
+ }
+}
diff --git a/wp-content/themes/ccat/app/pages/[...uri].vue b/wp-content/themes/ccat/app/pages/[...uri].vue
new file mode 100644
index 0000000..a76d817
--- /dev/null
+++ b/wp-content/themes/ccat/app/pages/[...uri].vue
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/wp-content/themes/ccat/app/pages/index.vue b/wp-content/themes/ccat/app/pages/index.vue
deleted file mode 100644
index a72b124..0000000
--- a/wp-content/themes/ccat/app/pages/index.vue
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-