merge dev into features/notifications
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
import {useState} from "react";
|
||||
import styles from "./eventDetail.module.css";
|
||||
import { useParams } from "react-router";
|
||||
|
||||
|
||||
function eventDetail() {
|
||||
|
||||
const params = useParams();
|
||||
const id = params.id;
|
||||
|
||||
const [tasks, setTasks] = useState([
|
||||
{ text: "Préparer les slides", registered: false },
|
||||
{ text: "Réserver la salle", registered: false },
|
||||
{ text: "Envoyer les invitations", registered: false },
|
||||
{ text: "Tester la configuration technique", registered: false },
|
||||
{ text: "Organiser le catering", registered: false },
|
||||
]);
|
||||
|
||||
const event = {
|
||||
title: "Conférence React 2025",
|
||||
date: "27 Décembre 2025",
|
||||
location: "Paris, France",
|
||||
description: "azertyuiop azertyuiop azertyuiop azertyuiop azertyuiop azertyuiop azertyuiop azertyuiop azertyuiop azertyuiop azertyuiop azertyuiop"
|
||||
};
|
||||
|
||||
const toggleRegister = (index) => {
|
||||
setTasks((prevTasks) =>
|
||||
prevTasks.map((task, i) =>
|
||||
i === index
|
||||
? { ...task, registered: !task.registered }
|
||||
: task
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={styles.allContent}>
|
||||
<div className={`glassCard`}>
|
||||
<div className={styles.textImage}>
|
||||
<img src="/public/icons/theme/dark.svg" alt="Illustration événement" className={styles.eventImage}/>
|
||||
<div className={styles.eventInfo}>
|
||||
<h2>{event.title}</h2>
|
||||
<p>Date: {event.date}</p>
|
||||
<p>Lieu: {event.location}</p>
|
||||
<p>Description: {event.description}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Tâches</h2>
|
||||
<ul className={styles.tasks}>
|
||||
{tasks.map((task, index) => (
|
||||
<li style={{"--i": index}} key={index}>
|
||||
<div className={styles.tasksButton}>
|
||||
<span><strong>{task.text}</strong></span>
|
||||
<button
|
||||
className={styles.registerButton}
|
||||
onClick={() => toggleRegister(index)}
|
||||
>
|
||||
{task.registered ? "Se désinscrire" : "S’inscrire"}
|
||||
</button>
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default eventDetail;
|
||||
@@ -0,0 +1,92 @@
|
||||
.allContent{
|
||||
margin: 16px 0px 16px 0px;
|
||||
align-self: center;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
|
||||
.textImage {
|
||||
display: flex;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.eventImage {
|
||||
width: 40%;
|
||||
aspect-ratio: 16 / 9;
|
||||
background-color: #e0e0e0;
|
||||
border-radius: 16px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.eventInfo {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.eventInfo p {
|
||||
white-space: normal;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.eventImage {
|
||||
width: 40%;
|
||||
height: 100%;
|
||||
aspect-ratio: 16 / 9;
|
||||
background-color: #e0e0e0;
|
||||
border-radius: 16px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.registerButton {
|
||||
margin-left: auto;
|
||||
padding: 5px 10px;
|
||||
border-radius: 12px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
background: #019AFF;
|
||||
color: white;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.registerButton:hover {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.tasksButton {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.tasks {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.tasks li {
|
||||
margin: 16px 0px 16px 0px;
|
||||
padding: 10px 20px 10px 20px;
|
||||
border-radius: 20px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
box-shadow:
|
||||
inset 1.25px 1.25px 1px rgba(255, 255, 255, 1),
|
||||
inset -1.25px -1.25px 1px rgba(255, 255, 255, 1),
|
||||
inset -0.25px 0.25px 1px rgba(0, 0, 0, 0.2),
|
||||
inset 0.25px -0.25px 1px rgba(0, 0, 0, 0.2);
|
||||
opacity: 0;
|
||||
animation: fadeInUp 0.6s ease-out forwards;
|
||||
animation-delay: calc(var(--i) * 0.1s);
|
||||
}
|
||||
|
||||
@keyframes fadeInUp {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(10px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user