From b9b5ceb49dd074a18a186b2cb52c48efb27102fd Mon Sep 17 00:00:00 2001 From: Kevin Bieri Date: Sat, 7 Sep 2024 11:38:44 +0200 Subject: [PATCH] Frontend: Add map and IIIF viewer --- api/.gitignore | 1 + frontend/composables/useDeviceOrientation.js | 0 frontend/nuxt.config.js | 5 + frontend/package.json | 3 +- frontend/pages/iiif.vue | 37 +++++++ frontend/pages/index.vue | 104 ++++++++++++++++++- frontend/pages/map/index.vue | 33 ++++-- frontend/pnpm-lock.yaml | 9 ++ 8 files changed, 182 insertions(+), 10 deletions(-) create mode 100644 frontend/composables/useDeviceOrientation.js create mode 100644 frontend/pages/iiif.vue diff --git a/api/.gitignore b/api/.gitignore index cd432fe..90852da 100644 --- a/api/.gitignore +++ b/api/.gitignore @@ -1,3 +1,4 @@ .env /var/ /venv/ +/**/__pycache__ diff --git a/frontend/composables/useDeviceOrientation.js b/frontend/composables/useDeviceOrientation.js new file mode 100644 index 0000000..e69de29 diff --git a/frontend/nuxt.config.js b/frontend/nuxt.config.js index 3b9ada0..16ef6c9 100644 --- a/frontend/nuxt.config.js +++ b/frontend/nuxt.config.js @@ -43,6 +43,11 @@ export default defineNuxtConfig({ }, nitro: { preset: "static", + devProxy: { + "/api/": { + target: `http://localhost:8000/api/`, + }, + }, }, compatibilityDate: "2024-09-06", }); diff --git a/frontend/package.json b/frontend/package.json index 3c42a20..3fdfd7b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -40,7 +40,8 @@ "dependencies": { "@vueuse/core": "^11.0.3", "leaflet": "^1.9.4", - "lodash-es": "^4.17.21" + "lodash-es": "^4.17.21", + "tify": "^0.31.0" }, "packageManager": "pnpm@9.9.0+sha512.60c18acd138bff695d339be6ad13f7e936eea6745660d4cc4a776d5247c540d0edee1a563695c183a66eb917ef88f2b4feb1fc25f32a7adcadc7aaf3438e99c1" } diff --git a/frontend/pages/iiif.vue b/frontend/pages/iiif.vue new file mode 100644 index 0000000..1a14095 --- /dev/null +++ b/frontend/pages/iiif.vue @@ -0,0 +1,37 @@ + + diff --git a/frontend/pages/index.vue b/frontend/pages/index.vue index 4dd0fde..be9eaf9 100644 --- a/frontend/pages/index.vue +++ b/frontend/pages/index.vue @@ -1,4 +1,104 @@ - + diff --git a/frontend/pages/map/index.vue b/frontend/pages/map/index.vue index 44d02c5..9f745b1 100644 --- a/frontend/pages/map/index.vue +++ b/frontend/pages/map/index.vue @@ -1,5 +1,5 @@