diff --git a/public/content/home/acy-1.jpg b/public/content/home/acy-1.jpg new file mode 100644 index 0000000..d6b2e64 Binary files /dev/null and b/public/content/home/acy-1.jpg differ diff --git a/public/content/home/acy-1.jpg.txt b/public/content/home/acy-1.jpg.txt new file mode 100644 index 0000000..f0bd989 --- /dev/null +++ b/public/content/home/acy-1.jpg.txt @@ -0,0 +1,5 @@ +Uuid: qHw8nu1sgsbs0G6q + +---- + +Template: blocks/image \ No newline at end of file diff --git a/public/content/home/home.txt b/public/content/home/home.txt index 9aa04f6..2966c32 100644 --- a/public/content/home/home.txt +++ b/public/content/home/home.txt @@ -2,4 +2,20 @@ Title: Home ---- +Testimages: - file://4xs4UNZhQf3jLvsG + +---- + +Testtext: test + +---- + +Testblocks: [{"content":{"location":"kirby","image":["file://qHw8nu1sgsbs0G6q"],"src":"","alt":"","caption":"","link":"","ratio":"","crop":"false"},"id":"9f5c767f-0b50-471c-85de-5c3d18fb596a","isHidden":false,"type":"image"}] + +---- + +Testimage: - file://4xs4UNZhQf3jLvsG + +---- + Uuid: 6yh1yt2Sk45Y2sOl \ No newline at end of file diff --git a/public/content/home/signal-2024-07-01-214357.jpg b/public/content/home/signal-2024-07-01-214357.jpg new file mode 100644 index 0000000..078dd9f Binary files /dev/null and b/public/content/home/signal-2024-07-01-214357.jpg differ diff --git a/public/content/home/signal-2024-07-01-214357.jpg.txt b/public/content/home/signal-2024-07-01-214357.jpg.txt new file mode 100644 index 0000000..81a3cff --- /dev/null +++ b/public/content/home/signal-2024-07-01-214357.jpg.txt @@ -0,0 +1 @@ +Uuid: 4xs4UNZhQf3jLvsG \ No newline at end of file diff --git a/public/site/blueprints/pages/home.yml b/public/site/blueprints/pages/home.yml new file mode 100644 index 0000000..3d20152 --- /dev/null +++ b/public/site/blueprints/pages/home.yml @@ -0,0 +1,7 @@ +fields: + testImages: + type: files + testText: + type: text + testBlocks: + type: blocks diff --git a/public/site/snippets/footer.php b/public/site/snippets/footer.php new file mode 100644 index 0000000..6cd780f --- /dev/null +++ b/public/site/snippets/footer.php @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/public/site/snippets/header.php b/public/site/snippets/header.php index 99f1e47..deeea87 100644 --- a/public/site/snippets/header.php +++ b/public/site/snippets/header.php @@ -6,4 +6,5 @@ Document - \ No newline at end of file + + \ No newline at end of file diff --git a/public/site/templates/home.php b/public/site/templates/home.php index 671cc32..f7d9cc5 100644 --- a/public/site/templates/home.php +++ b/public/site/templates/home.php @@ -1,4 +1,3 @@ -
- \ No newline at end of file + \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index a521693..f630237 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,35 +1,23 @@ - - + diff --git a/src/main.js b/src/main.js index e837ca0..84c8a88 100644 --- a/src/main.js +++ b/src/main.js @@ -6,4 +6,5 @@ import { createPinia } from "pinia"; const app = createApp(App); const pinia = createPinia(); -app.use(pinia).mount("#app"); +app.use(pinia); +app.mount("#app"); diff --git a/src/stores/api.js b/src/stores/api.js new file mode 100644 index 0000000..d04dbaf --- /dev/null +++ b/src/stores/api.js @@ -0,0 +1,46 @@ +import { defineStore } from "pinia"; + +export const useApiStore = defineStore("counter", () => { + function fetchData() { + const api = "/api/query"; + + const username = import.meta.env.VITE_USERNAME; + const password = import.meta.env.VITE_PASSWORD; + + const token = btoa(`${username}:${password}`); + + const headers = { + Authorization: `Basic ${token}`, + }; + + const request = { + method: "post", + body: JSON.stringify({ + query: `page('home')`, + select: { + testImages: { + query: "page.testImages.toFiles", + select: { + url: true, + }, + }, + blocks: { + query: "page.testBlocks.toBlocks", + }, + }, + }), + headers, + }; + + fetch(api, request) + .then((response) => response.json()) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.log(error); + }); + } + + return { fetchData }; +}); diff --git a/src/views/Home.vue b/src/views/Home.vue new file mode 100644 index 0000000..3ea8fa9 --- /dev/null +++ b/src/views/Home.vue @@ -0,0 +1,3 @@ + + +