diff --git a/pages/codev/carto.vue b/pages/codev/carto.vue index bb17163..35b497b 100644 --- a/pages/codev/carto.vue +++ b/pages/codev/carto.vue @@ -11,75 +11,92 @@

-
- +
+ + +
- - - - +
+
+ +
- -
- - Mode {{ MODE_LABELS[mode] }} actif - - {{ matches.length }} connexion{{ matches.length !== 1 ? 's' : '' }} trouvee{{ matches.length !== 1 ? 's' : '' }}. - - + + + + + + +
+ + Mode {{ MODE_LABELS[mode] }} actif - + {{ matches.length }} connexion{{ matches.length !== 1 ? 's' : '' }} trouvee{{ matches.length !== 1 ? 's' : '' }}. + + +
+ + +
+ + + +
- -
- - - - +
+
+
{{ f.nom }}
+

{{ f.besoin }}

+ Modifier +
+
Aucune fiche. Ajouter la mienne
+
+ +
+
+
{{ f.nom }}
+

{{ f.offre }}

+ Modifier +
+
Aucune fiche. Ajouter la mienne
@@ -87,6 +104,28 @@ + + +
+
+
+
{{ selectedFiche.nom }}
+
+ Besoin +

{{ selectedFiche.besoin }}

+
+
+ Ce que j'apporte +

{{ selectedFiche.offre }}

+
+
+ #{{ t }} +
+ Modifier cette fiche + +
+
+
+
@@ -102,6 +141,9 @@ const fiches = computed(() => data.value?.list ?? []) const matches = ref([]) const mode = ref<'none' | 'solution' | 'alliance' | 'surprise'>('none') const showLabels = ref(false) +const tab = ref<'carto' | 'besoins' | 'competences'>('carto') +const selectedFiche = ref(null) +const isMobileView = typeof window !== 'undefined' ? window.innerWidth < 600 : false const MODE_LABELS: Record = { solution: 'Solution', @@ -119,7 +161,11 @@ function setMode(newMode: 'none' | 'solution' | 'alliance' | 'surprise') { } function onSelectFiche(id: number) { - navigateTo(`/codev/fiche?id=${id}`) + if (isMobileView) { + selectedFiche.value = fiches.value.find(f => f.id === id) ?? null + } else { + navigateTo(`/codev/fiche?id=${id}`) + } } @@ -326,6 +372,37 @@ function onSelectFiche(id: number) { opacity: 0.92; } +/* ── Tabs ── */ + +.codev-tabs { display: flex; gap: 4px; background: #f3f4f6; border-radius: 10px; padding: 4px; } +.codev-tabs button { flex: 1; padding: 8px 4px; border: none; border-radius: 7px; background: transparent; font-size: 0.875rem; font-weight: 500; cursor: pointer; color: #6b7280; transition: all 0.15s; } +.codev-tabs button.active { background: white; color: #1a1a2e; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.08); } + +/* ── List view ── */ + +.list-view { display: flex; flex-direction: column; gap: 12px; padding: 8px 0; } +.list-card { background: white; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; } +.list-card-name { font-weight: 700; font-size: 0.95rem; color: #1a1a2e; } +.list-card-text { font-size: 0.875rem; color: #4b5563; margin: 0; line-height: 1.5; } +.list-card-link { font-size: 0.8rem; color: #1B4436; text-decoration: none; align-self: flex-end; } +.list-empty { text-align: center; color: #6b7280; font-size: 0.9rem; } + +/* ── Bottom sheet ── */ + +.bottom-sheet { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 200; display: flex; align-items: flex-end; } +.sheet-content { background: white; border-radius: 16px 16px 0 0; padding: 16px 20px 32px; width: 100%; display: flex; flex-direction: column; gap: 12px; max-height: 80vh; overflow-y: auto; } +.sheet-handle { width: 36px; height: 4px; background: #d1d5db; border-radius: 2px; align-self: center; margin-bottom: 4px; } +.sheet-name { font-size: 1.1rem; font-weight: 700; color: #1a1a2e; } +.sheet-section { display: flex; flex-direction: column; gap: 4px; } +.sheet-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; } +.sheet-text { font-size: 0.9rem; color: #374151; margin: 0; line-height: 1.5; } +.sheet-tags { display: flex; flex-wrap: wrap; gap: 6px; } +.sheet-tag { font-size: 0.75rem; background: #f3f4f6; color: #374151; padding: 2px 8px; border-radius: 12px; } +.sheet-edit-btn { display: block; text-align: center; background: #1B4436; color: white; border-radius: 8px; padding: 12px; text-decoration: none; font-weight: 600; } +.sheet-close { background: transparent; border: 1px solid #d1d5db; border-radius: 8px; padding: 10px; color: #6b7280; cursor: pointer; font-size: 0.875rem; } +.sheet-enter-active, .sheet-leave-active { transition: opacity 0.2s; } +.sheet-enter-from, .sheet-leave-to { opacity: 0; } + /* ── Mobile ── */ @media (max-width: 600px) { diff --git a/pages/codev/fiche.vue b/pages/codev/fiche.vue index 64d03be..0ad5d41 100644 --- a/pages/codev/fiche.vue +++ b/pages/codev/fiche.vue @@ -4,6 +4,7 @@
+ ← Retour à la carte

{{ isEdit ? 'Modifier ma fiche' : 'Ma fiche' }}

3 lignes pour te présenter. Le reste se passe entre nous.

@@ -193,6 +194,18 @@ async function submit() { /* ── En-tête ── */ +.back-link { + display: inline-block; + font-size: 0.875rem; + color: var(--nav-text-muted, #6b7280); + text-decoration: none; + margin-bottom: 0.75rem; +} + +.back-link:hover { + color: var(--nav-primary-solid, #1B4436); +} + .fiche-header h1 { font-size: 1.5rem; font-weight: 700;