92 lines
3.5 KiB
Dart
92 lines
3.5 KiB
Dart
import 'package:flutter/material.dart';
|
||
|
||
/// Couleurs / tokens du quotidien parent–AM (#166) — lignée papier / pastel.
|
||
/// Pas le violet Material du dashboard staff.
|
||
abstract final class QuotidienTheme {
|
||
static const Color ink = Color(0xFF2F2F2F);
|
||
static const Color ivory = Color(0xFFFFFEF9);
|
||
static const Color turquoise = Color(0xFF8AD0C8);
|
||
static const Color peach = Color(0xFFFFCCB6);
|
||
static const Color lavender = Color(0xFFC6A3D8);
|
||
static const Color coral = Color(0xFFF4A28C);
|
||
static const Color softGreenPill = Color(0xFFB8D9A8);
|
||
static const Color columnCardFill = Color(0xFFF7F3EA);
|
||
static const Color muted = Color(0xFF6B6B6B);
|
||
|
||
static const String paperAsset = 'assets/images/paper2.png';
|
||
static const String logoAsset = 'assets/images/logo.png';
|
||
|
||
/// Pastilles « dessinées » du bandeau : même silhouette (1190×299), une
|
||
/// couleur charte par section ; l'inactive est la même, plus transparente.
|
||
static const double pillInactiveOpacity = 0.45;
|
||
static const String pillIvoryAsset = 'assets/images/bg_ivoire_pill.png';
|
||
static const String pillBlueAsset = 'assets/images/bg_blue_pill.png';
|
||
|
||
// Bandeaux pour les couples (ratio 10:1, dessinés au crayon, couleur dynamique)
|
||
static const String bandeauLime = 'assets/images/bandeau_lime.png';
|
||
static const String bandeauBlue = 'assets/images/bandeau_blue.png';
|
||
static const String bandeauPeach = 'assets/images/bandeau_peach.png';
|
||
static const String bandeauYellow = 'assets/images/bandeau_yellow.png';
|
||
static const String bandeauLavender = 'assets/images/bandeau_lavender.png';
|
||
|
||
static const List<String> bandeauColors = [
|
||
bandeauLime,
|
||
bandeauBlue,
|
||
bandeauPeach,
|
||
bandeauYellow,
|
||
bandeauLavender,
|
||
];
|
||
|
||
/// Retourne un asset bandeau fixe pour un couple donné (basé sur son ID)
|
||
static String bandeauAssetForCouple(String coupleId) {
|
||
if (coupleId.isEmpty) return bandeauLime;
|
||
final hash = coupleId.hashCode.abs();
|
||
return bandeauColors[hash % bandeauColors.length];
|
||
}
|
||
static const String pillYellowAsset = 'assets/images/bg_yellow_pill.png';
|
||
static const String pillPeachAsset = 'assets/images/bg_peach_pill.png';
|
||
static const String pillTurquoiseAsset =
|
||
'assets/images/bg_turquoise_pill.png';
|
||
static const String pillLavenderAsset =
|
||
'assets/images/bg_lavender_pill.png';
|
||
|
||
/// Trait crayon gris (2400×28, transparent) : séparateurs bandeau / corps /
|
||
/// footer. Version verticale (28×2400) entre les colonnes.
|
||
static const String pencilLineAsset = 'assets/images/pencil_line_grey.png';
|
||
static const String pencilLineVerticalAsset =
|
||
'assets/images/pencil_line_grey_v.png';
|
||
|
||
static String pillAssetFor(QuotidienNavSection section) {
|
||
switch (section) {
|
||
case QuotidienNavSection.liaison:
|
||
return pillYellowAsset;
|
||
case QuotidienNavSection.agenda:
|
||
return pillPeachAsset;
|
||
case QuotidienNavSection.contrat:
|
||
return pillTurquoiseAsset;
|
||
}
|
||
}
|
||
|
||
/// Largeur / hauteur des PNG de pastille, à respecter pour ne pas déformer.
|
||
static const double pillAspectRatio = 1190 / 298;
|
||
|
||
static BoxDecoration paperBackground() {
|
||
return const BoxDecoration(
|
||
image: DecorationImage(
|
||
image: AssetImage(paperAsset),
|
||
fit: BoxFit.cover,
|
||
repeat: ImageRepeat.repeat,
|
||
),
|
||
);
|
||
}
|
||
|
||
}
|
||
|
||
/// Sections du bandeau quotidien (Cahier de liaison / Agenda / Contrat).
|
||
/// `liaison` = le hub « Cahier de liaison » (cartes · blog · messagerie).
|
||
enum QuotidienNavSection {
|
||
liaison,
|
||
agenda,
|
||
contrat,
|
||
}
|