diff --git a/src/components/EventCard.astro b/src/components/EventCard.astro index d349b05..4256734 100644 --- a/src/components/EventCard.astro +++ b/src/components/EventCard.astro @@ -1,11 +1,28 @@ --- // src/components/EventCard.astro const { frontmatter } = Astro.props; -const { title, date, location, target_date, participants, summary, status } = - frontmatter; +const { + title, + date, + location, + target_date, + participants, + summary, + status, + type, +} = frontmatter; + +// Définition des couleurs par catégorie [cite: 93, 94, 95, 96] +const categoryColors = { + Festival: "#f59e0b", // Orange/Or + IRL: "#a1be18", // Bleu + default: "#ec4899", // Ton vert actuel +}; + +const accentColor = categoryColors[type] || categoryColors["default"]; --- -
+
ÉVÉNEMENT IRL @@ -45,11 +62,13 @@ const { title, date, location, target_date, participants, summary, status } = .event-card { width: 320px; height: 480px; - background: #a1be18; + /* Utilisation de la couleur dynamique [cite: 6, 61] */ + background: var(--accent-color); border-radius: 18px; padding: 12px; font-family: "Philosopher", serif; color: rgba(0, 0, 0, 0.7); + transition: background 0.3s ease; } .card-inner { height: 100%; @@ -96,6 +115,12 @@ const { title, date, location, target_date, participants, summary, status } = flex: 1.2; font-size: 0.85rem; } + .event-type { + text-transform: uppercase; + background: rgba(255, 255, 255, 0.3); + padding: 2px 8px; + border-radius: 4px; + } .summary { font-style: italic; line-height: 1.4; diff --git a/src/pages/index.astro b/src/pages/index.astro index 624cf61..aaa0f6c 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -122,7 +122,7 @@ const latestPerUser = Array.from(
)