diff --git a/docs/implementation-artifacts/3-6-carte-interactive-desktop-konvajs.md b/docs/implementation-artifacts/3-6-carte-interactive-desktop-konvajs.md index d815bb6..4b8a47b 100644 --- a/docs/implementation-artifacts/3-6-carte-interactive-desktop-konvajs.md +++ b/docs/implementation-artifacts/3-6-carte-interactive-desktop-konvajs.md @@ -1,6 +1,6 @@ # Story 3.6: Carte interactive desktop (Konva.js) -Status: ready-for-dev +Status: review ## Story diff --git a/docs/implementation-artifacts/sprint-status.yaml b/docs/implementation-artifacts/sprint-status.yaml index 9001881..99d72d8 100644 --- a/docs/implementation-artifacts/sprint-status.yaml +++ b/docs/implementation-artifacts/sprint-status.yaml @@ -76,7 +76,7 @@ development_status: 3-3-textes-narrateur-contextuels-arc-revelation: review 3-4-barre-progression-globale-xp-bar: review 3-5-logique-progression-deblocage-contact: review - 3-6-carte-interactive-desktop-konvajs: ready-for-dev + 3-6-carte-interactive-desktop-konvajs: review 3-7-navigation-mobile-chemin-libre-bottom-bar: ready-for-dev epic-3-retrospective: optional diff --git a/frontend/app/components/feature/InteractiveMap.client.vue b/frontend/app/components/feature/InteractiveMap.client.vue new file mode 100644 index 0000000..0f868ef --- /dev/null +++ b/frontend/app/components/feature/InteractiveMap.client.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/frontend/app/data/mapZones.ts b/frontend/app/data/mapZones.ts new file mode 100644 index 0000000..ec01711 --- /dev/null +++ b/frontend/app/data/mapZones.ts @@ -0,0 +1,71 @@ +export interface MapZone { + id: 'projets' | 'competences' | 'temoignages' | 'parcours' | 'contact' + label: { + fr: string + en: string + } + route: { + fr: string + en: string + } + position: { x: number; y: number } + color: string + emoji: string + size: number +} + +export const mapZones: MapZone[] = [ + { + id: 'projets', + label: { fr: 'Projets', en: 'Projects' }, + route: { fr: '/projets', en: '/en/projects' }, + position: { x: 150, y: 180 }, + color: '#3b82f6', + emoji: '💻', + size: 70, + }, + { + id: 'competences', + label: { fr: 'Compétences', en: 'Skills' }, + route: { fr: '/competences', en: '/en/skills' }, + position: { x: 350, y: 100 }, + color: '#10b981', + emoji: '⚡', + size: 70, + }, + { + id: 'temoignages', + label: { fr: 'Témoignages', en: 'Testimonials' }, + route: { fr: '/temoignages', en: '/en/testimonials' }, + position: { x: 300, y: 280 }, + color: '#f59e0b', + emoji: '💬', + size: 70, + }, + { + id: 'parcours', + label: { fr: 'Parcours', en: 'Journey' }, + route: { fr: '/parcours', en: '/en/journey' }, + position: { x: 520, y: 220 }, + color: '#8b5cf6', + emoji: '📍', + size: 70, + }, + { + id: 'contact', + label: { fr: 'Contact', en: 'Contact' }, + route: { fr: '/contact', en: '/en/contact' }, + position: { x: 650, y: 150 }, + color: '#fa784f', + emoji: '📧', + size: 70, + }, +] + +export const mapConnections = [ + ['projets', 'competences'], + ['competences', 'temoignages'], + ['temoignages', 'parcours'], + ['parcours', 'contact'], + ['projets', 'temoignages'], +] diff --git a/frontend/i18n/en.json b/frontend/i18n/en.json index c79285e..8a2a2b6 100644 --- a/frontend/i18n/en.json +++ b/frontend/i18n/en.json @@ -179,6 +179,18 @@ "clickToSkip": "Click or press Space to skip", "bugAlt": "The Bug - Stage {stage}" }, + "map": { + "ariaLabel": "Interactive portfolio map. Use Tab to navigate between zones and Enter to explore.", + "instructions": "Use Tab keys to navigate between zones and Enter or Space to explore a zone.", + "locked": "Locked zone - Explore more", + "visited": "Already visited", + "clickToExplore": "Click to explore", + "legend": { + "notVisited": "Not visited", + "visited": "Visited", + "locked": "Locked" + } + }, "progress": { "label": "Progress: {percent}%", "title": "Portfolio exploration", diff --git a/frontend/i18n/fr.json b/frontend/i18n/fr.json index 7d084fc..b732362 100644 --- a/frontend/i18n/fr.json +++ b/frontend/i18n/fr.json @@ -179,6 +179,18 @@ "clickToSkip": "Cliquez ou appuyez sur Espace pour passer", "bugAlt": "Le Bug - Stade {stage}" }, + "map": { + "ariaLabel": "Carte interactive du portfolio. Utilisez Tab pour naviguer entre les zones et Entrée pour explorer.", + "instructions": "Utilisez les touches Tab pour naviguer entre les zones et Entrée ou Espace pour explorer une zone.", + "locked": "Zone verrouillée - Explorez davantage", + "visited": "Déjà visité", + "clickToExplore": "Cliquez pour explorer", + "legend": { + "notVisited": "Non visité", + "visited": "Visité", + "locked": "Verrouillé" + } + }, "progress": { "label": "Progression : {percent}%", "title": "Exploration du portfolio", diff --git a/frontend/nuxt.config.ts b/frontend/nuxt.config.ts index c6106e6..5643926 100644 --- a/frontend/nuxt.config.ts +++ b/frontend/nuxt.config.ts @@ -67,4 +67,8 @@ export default defineNuxtConfig({ }, compatibilityDate: '2025-01-01', + + build: { + transpile: ['konva', 'vue-konva'], + }, }) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index b3a6d86..1cacb50 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -12,8 +12,10 @@ "@nuxtjs/i18n": "^9.0.0", "@nuxtjs/sitemap": "^7.2.0", "@pinia/nuxt": "^0.9.0", + "konva": "^10.2.0", "nuxt": "^3.16.0", - "pinia-plugin-persistedstate": "^3.2.0" + "pinia-plugin-persistedstate": "^3.2.0", + "vue-konva": "^3.3.0" }, "devDependencies": { "autoprefixer": "^10.4.24", @@ -6643,6 +6645,25 @@ "resolved": "https://registry.npmjs.org/knitwork/-/knitwork-1.3.0.tgz", "integrity": "sha512-4LqMNoONzR43B1W0ek0fhXMsDNW/zxa1NdFAVMY+k28pgZLovR4G3PB5MrpTxCy1QaZCqNoiaKPr5w5qZHfSNw==" }, + "node_modules/konva": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/konva/-/konva-10.2.0.tgz", + "integrity": "sha512-JBoz0Xjbf49UPxCZegZ4WseqOzJ+C4AUDOtJ9eBve5RS5Fcq/u8TdBD5fDl/uPFInpC3a9uycm0sRyZpF4hheg==", + "funding": [ + { + "type": "patreon", + "url": "https://www.patreon.com/lavrton" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/konva" + }, + { + "type": "github", + "url": "https://github.com/sponsors/lavrton" + } + ] + }, "node_modules/launch-editor": { "version": "2.12.0", "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.12.0.tgz", @@ -11664,6 +11685,33 @@ "vue": "^3.0.0" } }, + "node_modules/vue-konva": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/vue-konva/-/vue-konva-3.3.0.tgz", + "integrity": "sha512-z7yB4VSyYaBAfRRlNCaxINp3+h0lpy+C9wm+FeQ0rBZylGRBMbNOOQbURjNdsS/uo3togcWz8jrM+0TVTDUTeQ==", + "funding": [ + { + "type": "patreon", + "url": "https://www.patreon.com/lavrton" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/konva" + }, + { + "type": "github", + "url": "https://github.com/sponsors/lavrton" + } + ], + "engines": { + "node": ">= 4.0.0", + "npm": ">= 3.0.0" + }, + "peerDependencies": { + "konva": ">7", + "vue": "^3" + } + }, "node_modules/vue-router": { "version": "4.6.4", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.6.4.tgz", diff --git a/frontend/package.json b/frontend/package.json index f5dcc7a..203fe37 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -15,8 +15,10 @@ "@nuxtjs/i18n": "^9.0.0", "@nuxtjs/sitemap": "^7.2.0", "@pinia/nuxt": "^0.9.0", + "konva": "^10.2.0", "nuxt": "^3.16.0", - "pinia-plugin-persistedstate": "^3.2.0" + "pinia-plugin-persistedstate": "^3.2.0", + "vue-konva": "^3.3.0" }, "devDependencies": { "autoprefixer": "^10.4.24",