7
0
forked from yvv/decision

Home : renommage libreDecision + chiffres dynamiques + centrage + typo

- Titre : ğ(Decision) → libreDecision (libre italic/muted + Decision accent)
- Chiffres : plus de valeurs hardcodées, tout dynamique depuis les stores
  (mandates store ajouté, protocoles depuis protocols.protocols.length)
- Affichage intelligent : total quand actif = 0, labels contextuels
- Grilles centrées : margin: 0 auto sur .dash
- Font-weight 800 → 700 partout (moins gras, plus classe)
- Typo : "Nuance" → "Nuancé" dans les tags

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Yvv
2026-03-24 02:06:02 +01:00
parent 0310dcba42
commit 99c5e9dd5a

View File

@@ -2,6 +2,7 @@
const documents = useDocumentsStore()
const decisions = useDecisionsStore()
const protocols = useProtocolsStore()
const mandates = useMandatesStore()
const auth = useAuthStore()
const loading = ref(true)
@@ -13,6 +14,7 @@ onMounted(async () => {
documents.fetchAll(),
decisions.fetchAll(),
protocols.fetchProtocols(),
mandates.fetchAll(),
])
}
finally {
@@ -20,52 +22,61 @@ onMounted(async () => {
}
})
const entryCards = computed(() => [
{
key: 'decisions',
title: 'Décisions structurantes',
icon: 'i-lucide-scale',
to: '/decisions',
count: decisions.activeDecisions.length,
countLabel: `${decisions.activeDecisions.length} en cours`,
totalLabel: `${decisions.list.length} au total`,
description: 'Processus de décision collectifs',
color: 'var(--mood-secondary, var(--mood-accent))',
},
{
key: 'documents',
title: 'Documents de référence',
icon: 'i-lucide-book-open',
to: '/documents',
count: documents.activeDocuments.length,
countLabel: `${documents.activeDocuments.length} actif${documents.activeDocuments.length > 1 ? 's' : ''}`,
totalLabel: `${documents.list.length} au total`,
description: 'Textes fondateurs sous vote permanent',
color: 'var(--mood-accent)',
},
{
key: 'mandats',
title: 'Mandats et nominations',
icon: 'i-lucide-user-check',
to: '/mandates',
count: null,
countLabel: null,
totalLabel: null,
description: 'Missions déléguées avec nomination en binôme',
color: 'var(--mood-success)',
},
{
key: 'protocoles',
title: 'Protocoles et fonctionnement',
icon: 'i-lucide-settings',
to: '/protocols',
count: 2,
countLabel: '2 protocoles',
totalLabel: `${protocols.protocols.length} modalités de vote`,
description: 'Modalités de vote, formules, workflows',
color: 'var(--mood-tertiary, var(--mood-accent))',
},
])
const entryCards = computed(() => {
const decisionsTotal = decisions.list.length
const decisionsActive = decisions.activeDecisions.length
const docsActive = documents.activeDocuments.length
const docsTotal = documents.list.length
const mandatesActive = mandates.list.filter(m => ['active', 'voting'].includes(m.status)).length
const mandatesTotal = mandates.list.length
const protocolsCount = protocols.protocols.length
return [
{
key: 'decisions',
title: 'Décisions',
icon: 'i-lucide-scale',
to: '/decisions',
count: decisionsTotal,
countLabel: decisionsActive > 0 ? `${decisionsActive} en cours` : `${decisionsTotal} au total`,
totalLabel: decisionsActive > 0 ? `${decisionsTotal} au total` : 'aucune en cours',
color: 'var(--mood-secondary, var(--mood-accent))',
},
{
key: 'documents',
title: 'Documents',
icon: 'i-lucide-book-open',
to: '/documents',
count: docsActive || docsTotal,
countLabel: docsActive > 0 ? `${docsActive} actif${docsActive > 1 ? 's' : ''}` : `${docsTotal} au total`,
totalLabel: docsTotal > 0 ? `${docsTotal} document${docsTotal > 1 ? 's' : ''}` : 'textes fondateurs',
color: 'var(--mood-accent)',
},
{
key: 'mandats',
title: 'Mandats',
icon: 'i-lucide-user-check',
to: '/mandates',
count: mandatesTotal || null,
countLabel: mandatesTotal > 0 ? `${mandatesActive} en cours` : null,
totalLabel: mandatesTotal > 0 ? `${mandatesTotal} mandats` : 'missions déléguées',
color: 'var(--mood-success)',
},
{
key: 'protocoles',
title: 'Protocoles',
icon: 'i-lucide-settings',
to: '/protocols',
count: protocolsCount || null,
countLabel: protocolsCount > 0 ? `${protocolsCount} protocoles` : null,
totalLabel: 'modalités de vote',
color: 'var(--mood-tertiary, var(--mood-accent))',
},
]
})
const recentDecisions = computed(() => {
return [...decisions.list]
@@ -98,7 +109,7 @@ function formatDate(dateStr: string): string {
<!-- Welcome -->
<div class="dash__welcome">
<h1 class="dash__title">
<span class="dash__title-g">ğ</span><span class="dash__title-paren">(</span>Decision<span class="dash__title-paren">)</span>
<span class="dash__title-libre">libre</span><span class="dash__title-decision">Decision</span>
</h1>
<p class="dash__subtitle">
Décisions collectives pour la communauté Duniter / G1
@@ -127,7 +138,7 @@ function formatDate(dateStr: string): string {
<span class="entry-card__total">{{ card.totalLabel }}</span>
</template>
<template v-else>
<span class="entry-card__desc">{{ card.description }}</span>
<span class="entry-card__desc">{{ card.totalLabel }}</span>
</template>
<span class="entry-card__arrow">
<UIcon name="i-lucide-arrow-right" />
@@ -151,7 +162,7 @@ function formatDate(dateStr: string): string {
</NuxtLink>
</div>
<!-- Toolbox teaser (5th block, distinct look) -->
<!-- Toolbox teaser -->
<NuxtLink to="/tools" class="dash__toolbox-card">
<div class="dash__toolbox-card-inner">
<div class="dash__toolbox-card-icon">
@@ -166,7 +177,7 @@ function formatDate(dateStr: string): string {
<span class="dash__toolbox-card-tag">Vote WoT</span>
<span class="dash__toolbox-card-tag">Inertie</span>
<span class="dash__toolbox-card-tag">Smith</span>
<span class="dash__toolbox-card-tag">Nuance</span>
<span class="dash__toolbox-card-tag">Nuancé</span>
</div>
</div>
<UIcon name="i-lucide-arrow-right" class="dash__toolbox-card-arrow" />
@@ -236,17 +247,19 @@ function formatDate(dateStr: string): string {
flex-direction: column;
gap: 2rem;
max-width: 56rem;
margin: 0 auto;
}
/* --- Welcome --- */
.dash__welcome {
padding: 0.5rem 0;
}
.dash__title {
font-size: 1.75rem;
font-weight: 800;
color: var(--mood-accent);
letter-spacing: -0.03em;
font-weight: 700;
letter-spacing: -0.02em;
line-height: 1.1;
}
@media (min-width: 640px) {
@@ -254,14 +267,18 @@ function formatDate(dateStr: string): string {
font-size: 2.25rem;
}
}
.dash__title-g {
.dash__title-libre {
font-style: italic;
}
.dash__title-paren {
font-weight: 300;
font-weight: 400;
color: var(--mood-text-muted);
opacity: 0.4;
}
.dash__title-decision {
font-weight: 700;
color: var(--mood-accent);
}
.dash__subtitle {
margin-top: 0.375rem;
font-size: 0.9375rem;
@@ -284,7 +301,6 @@ function formatDate(dateStr: string): string {
@media (min-width: 640px) {
.dash__entries {
grid-template-columns: 1fr 1fr;
gap: 1rem;
}
}
@@ -331,17 +347,29 @@ function formatDate(dateStr: string): string {
}
.entry-card__title {
font-size: 1.25rem;
font-weight: 800;
font-size: 1rem;
font-weight: 700;
color: var(--mood-text);
margin: 0;
}
@media (min-width: 640px) {
.entry-card__title {
font-size: 1.125rem;
}
}
.entry-card__count {
font-size: 1.5rem;
font-weight: 800;
font-size: 0.9375rem;
font-weight: 700;
color: var(--card-color, var(--mood-accent));
line-height: 1;
line-height: 1.2;
}
@media (min-width: 640px) {
.entry-card__count {
font-size: 1.125rem;
}
}
.entry-card__total {
@@ -350,7 +378,7 @@ function formatDate(dateStr: string): string {
}
.entry-card__desc {
font-size: 0.875rem;
font-size: 0.8125rem;
color: var(--mood-text-muted);
line-height: 1.4;
}
@@ -452,7 +480,7 @@ function formatDate(dateStr: string): string {
transform: translateY(0);
}
/* --- Toolbox card (5th block, distinct) --- */
/* --- Toolbox card --- */
.dash__toolbox-card {
display: block;
text-decoration: none;
@@ -495,8 +523,8 @@ function formatDate(dateStr: string): string {
}
.dash__toolbox-card-title {
font-size: 1.125rem;
font-weight: 800;
font-size: 1.0625rem;
font-weight: 700;
color: var(--mood-text);
margin: 0;
}
@@ -557,8 +585,8 @@ function formatDate(dateStr: string): string {
align-items: center;
gap: 0.5rem;
color: var(--mood-text);
font-weight: 800;
font-size: 1.0625rem;
font-weight: 700;
font-size: 1rem;
margin-bottom: 0.75rem;
}
.dash__activity-head h3 { margin: 0; }