- Hero : animation fade-in/fade-out + swipe (useTypewriter composable + TypewriterText) - 3 axes : Autonomie numérique, économique, citoyenne (AxisBlock + AxisGrid) - Pages gestation avec présentations (wishBounty, trustWallet, Cloud libre) - Page /decision : plateforme Décision collective (lien Glibredecision) - Bloc événement distinct en bas des axes - Nav : Numérique / Économique / Citoyenne / Événement - Dark theme éclairci (bg 7→10%, surface 12→14%) - Suppression BookSection + GrateWizardTeaser (remplacés par AxisGrid) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
232 lines
5.4 KiB
Vue
232 lines
5.4 KiB
Vue
<template>
|
|
<div class="axis-block">
|
|
<!-- Header -->
|
|
<div class="flex items-center gap-3 mb-6">
|
|
<div class="axis-icon" :class="`axis-icon--${color}`">
|
|
<div :class="`i-lucide-${icon} h-6 w-6`" />
|
|
</div>
|
|
<h2 class="font-display text-2xl font-bold text-white">{{ title }}</h2>
|
|
</div>
|
|
|
|
<!-- Items grid -->
|
|
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
|
<div
|
|
v-for="(item, i) in items"
|
|
:key="i"
|
|
class="axis-item card-surface"
|
|
:class="{ 'axis-item--gestation': item.gestation }"
|
|
>
|
|
<!-- Item icon -->
|
|
<div v-if="item.icon" class="axis-item-icon mb-3" :class="`axis-item-icon--${color}`">
|
|
<div :class="`i-lucide-${item.icon} h-5 w-5`" />
|
|
</div>
|
|
|
|
<h3 class="font-display text-lg font-semibold text-white mb-2">
|
|
{{ item.label }}
|
|
<span v-if="item.gestation" class="gestation-badge">
|
|
<div class="i-lucide-flask-conical h-3 w-3" />
|
|
En gestation
|
|
</span>
|
|
</h3>
|
|
|
|
<p class="text-sm text-white/60 leading-relaxed mb-4">{{ item.description }}</p>
|
|
|
|
<!-- Actions or link -->
|
|
<div class="mt-auto">
|
|
<!-- Multiple actions (e.g., Économie du don) -->
|
|
<div v-if="item.actions?.length" class="flex flex-wrap gap-2">
|
|
<button
|
|
v-for="action in item.actions"
|
|
:key="action.id"
|
|
class="axis-action-btn"
|
|
@click="handleAction(action.id)"
|
|
>
|
|
<div :class="`i-lucide-${action.icon} h-3.5 w-3.5`" />
|
|
{{ action.label }}
|
|
</button>
|
|
</div>
|
|
|
|
<!-- External link -->
|
|
<a
|
|
v-else-if="item.href"
|
|
:href="item.href"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
class="axis-link"
|
|
>
|
|
Découvrir
|
|
<div class="i-lucide-external-link h-3.5 w-3.5" />
|
|
</a>
|
|
|
|
<!-- Internal link -->
|
|
<NuxtLink
|
|
v-else-if="item.to"
|
|
:to="item.to"
|
|
class="axis-link"
|
|
>
|
|
{{ item.gestation ? 'En savoir plus' : 'Découvrir' }}
|
|
<div class="i-lucide-arrow-right h-3.5 w-3.5" />
|
|
</NuxtLink>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
interface AxisAction {
|
|
id: string
|
|
label: string
|
|
icon: string
|
|
}
|
|
|
|
interface AxisItem {
|
|
label: string
|
|
description: string
|
|
to?: string
|
|
href?: string
|
|
gestation?: boolean
|
|
icon?: string
|
|
actions?: AxisAction[]
|
|
}
|
|
|
|
defineProps<{
|
|
title: string
|
|
icon: string
|
|
color?: 'primary' | 'accent'
|
|
items: AxisItem[]
|
|
}>()
|
|
|
|
const emit = defineEmits<{
|
|
'open-player': []
|
|
'open-pdf': []
|
|
'launch-gratewizard': []
|
|
}>()
|
|
|
|
function handleAction(id: string) {
|
|
if (id === 'open-player') emit('open-player')
|
|
else if (id === 'open-pdf') emit('open-pdf')
|
|
else if (id === 'launch-gratewizard') emit('launch-gratewizard')
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.axis-block {
|
|
padding: 0;
|
|
}
|
|
|
|
.axis-icon {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 2.75rem;
|
|
height: 2.75rem;
|
|
border-radius: 0.75rem;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.axis-icon--primary {
|
|
background: hsl(var(--color-primary) / 0.12);
|
|
border: 1px solid hsl(var(--color-primary) / 0.2);
|
|
color: hsl(var(--color-primary));
|
|
}
|
|
|
|
.axis-icon--accent {
|
|
background: hsl(var(--color-accent) / 0.12);
|
|
border: 1px solid hsl(var(--color-accent) / 0.2);
|
|
color: hsl(var(--color-accent));
|
|
}
|
|
|
|
.axis-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: 1.25rem;
|
|
border-radius: 0.75rem;
|
|
border: 1px solid hsl(var(--color-text) / 0.08);
|
|
background: hsl(var(--color-surface));
|
|
transition: border-color 0.2s, box-shadow 0.2s;
|
|
}
|
|
|
|
.axis-item:hover {
|
|
border-color: hsl(var(--color-text) / 0.15);
|
|
box-shadow: 0 4px 20px hsl(var(--color-text) / 0.05);
|
|
}
|
|
|
|
.axis-item--gestation {
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.axis-item--gestation:hover {
|
|
opacity: 0.85;
|
|
}
|
|
|
|
.axis-item-icon {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 2.25rem;
|
|
height: 2.25rem;
|
|
border-radius: 0.5rem;
|
|
}
|
|
|
|
.axis-item-icon--primary {
|
|
background: hsl(var(--color-primary) / 0.1);
|
|
color: hsl(var(--color-primary));
|
|
}
|
|
|
|
.axis-item-icon--accent {
|
|
background: hsl(var(--color-accent) / 0.1);
|
|
color: hsl(var(--color-accent));
|
|
}
|
|
|
|
.gestation-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.25rem;
|
|
margin-left: 0.5rem;
|
|
padding: 0.125rem 0.5rem;
|
|
border-radius: 9999px;
|
|
background: hsl(var(--color-accent) / 0.12);
|
|
color: hsl(var(--color-accent));
|
|
font-size: 0.7rem;
|
|
font-weight: 500;
|
|
font-family: var(--font-mono);
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.axis-action-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.375rem;
|
|
padding: 0.375rem 0.75rem;
|
|
border-radius: 0.5rem;
|
|
font-size: 0.8rem;
|
|
font-weight: 500;
|
|
color: hsl(var(--color-text) / 0.7);
|
|
background: hsl(var(--color-text) / 0.05);
|
|
border: 1px solid hsl(var(--color-text) / 0.1);
|
|
transition: all 0.2s;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.axis-action-btn:hover {
|
|
color: hsl(var(--color-text));
|
|
background: hsl(var(--color-primary) / 0.12);
|
|
border-color: hsl(var(--color-primary) / 0.3);
|
|
}
|
|
|
|
.axis-link {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.375rem;
|
|
font-size: 0.85rem;
|
|
font-weight: 500;
|
|
color: hsl(var(--color-primary) / 0.8);
|
|
transition: color 0.2s;
|
|
}
|
|
|
|
.axis-link:hover {
|
|
color: hsl(var(--color-primary));
|
|
}
|
|
</style>
|