card cosmo ambient
This commit is contained in:
@@ -1,11 +1,28 @@
|
|||||||
---
|
---
|
||||||
// src/components/EventCard.astro
|
// src/components/EventCard.astro
|
||||||
const { frontmatter } = Astro.props;
|
const { frontmatter } = Astro.props;
|
||||||
const { title, date, location, target_date, participants, summary, status } =
|
const {
|
||||||
frontmatter;
|
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"];
|
||||||
---
|
---
|
||||||
|
|
||||||
<article class="event-card">
|
<article class="event-card" style={`--accent-color: ${accentColor}`}>
|
||||||
<div class="card-inner">
|
<div class="card-inner">
|
||||||
<header class="event-header">
|
<header class="event-header">
|
||||||
<span class="event-type">ÉVÉNEMENT IRL</span>
|
<span class="event-type">ÉVÉNEMENT IRL</span>
|
||||||
@@ -45,11 +62,13 @@ const { title, date, location, target_date, participants, summary, status } =
|
|||||||
.event-card {
|
.event-card {
|
||||||
width: 320px;
|
width: 320px;
|
||||||
height: 480px;
|
height: 480px;
|
||||||
background: #a1be18;
|
/* Utilisation de la couleur dynamique [cite: 6, 61] */
|
||||||
|
background: var(--accent-color);
|
||||||
border-radius: 18px;
|
border-radius: 18px;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
font-family: "Philosopher", serif;
|
font-family: "Philosopher", serif;
|
||||||
color: rgba(0, 0, 0, 0.7);
|
color: rgba(0, 0, 0, 0.7);
|
||||||
|
transition: background 0.3s ease;
|
||||||
}
|
}
|
||||||
.card-inner {
|
.card-inner {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -96,6 +115,12 @@ const { title, date, location, target_date, participants, summary, status } =
|
|||||||
flex: 1.2;
|
flex: 1.2;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
|
.event-type {
|
||||||
|
text-transform: uppercase;
|
||||||
|
background: rgba(255, 255, 255, 0.3);
|
||||||
|
padding: 2px 8px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
.summary {
|
.summary {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ const latestPerUser = Array.from(
|
|||||||
<div class="card-focus">
|
<div class="card-focus">
|
||||||
<EventCard frontmatter={latestEvent.data} />
|
<EventCard frontmatter={latestEvent.data} />
|
||||||
<div class="entry-meta">
|
<div class="entry-meta">
|
||||||
<p>Projet Communautaire</p>
|
<p>Projet</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user