From 61f6808eb5e73e1ce6515eb56438e43548647d95 Mon Sep 17 00:00:00 2001 From: LATCHIMY Nicolas Date: Mon, 23 Feb 2026 03:20:28 +0400 Subject: [PATCH] medication --- src/components/Card.astro | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/components/Card.astro b/src/components/Card.astro index addd7d6..7aa75bc 100644 --- a/src/components/Card.astro +++ b/src/components/Card.astro @@ -1,6 +1,7 @@ --- const { frontmatter, streakCount = 1 } = Astro.props; const { birthDate, health, manifestations, date, name } = frontmatter; +const medicationTaken = health?.mental?.medication ?? false; // 1. CALCUL DU NIVEAU ET VARIABLES DE BASE const referenceDate = new Date(date); @@ -157,6 +158,11 @@ const autoLayer = [ status: hallucinations > 4 ? "alerte" : "calme", }, { label: "Stabilité", value: currentBiome.label, status: "info" }, + { + label: "Traitement", + value: medicationTaken ? "Pris" : "Absent", + status: medicationTaken ? "stable" : "critique", + }, ]; // LAYER MANUEL : Les leviers d'action et ressentis @@ -188,7 +194,16 @@ const manualLayer = [
Niveau {age} — {frontmatter.identity?.job || "PROTO"} - streak {streakCount} +
+ { + medicationTaken && ( + + 💊 + + ) + } + streak {streakCount} +
@@ -455,4 +470,14 @@ const manualLayer = [ font-size: 0.8rem; font-weight: bold; } + .header-tags { + display: flex; + gap: 8px; + align-items: center; + } + .med-tag { + font-size: 0.9rem; + filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5)); + cursor: help; + }