From a077db77f3a313c61eb333701f70ce73a4204b7e Mon Sep 17 00:00:00 2001 From: p2405951 Date: Fri, 14 Nov 2025 12:16:51 +0100 Subject: [PATCH] add responsive --- src/index.css | 18 ++- src/pages/Profile/ProfilePage.jsx | 108 +++++++++----- src/pages/Profile/ProfilePage.module.css | 170 +++++++++++++++++++---- 3 files changed, 232 insertions(+), 64 deletions(-) diff --git a/src/index.css b/src/index.css index b6c5ed6..ef21704 100644 --- a/src/index.css +++ b/src/index.css @@ -21,13 +21,21 @@ } - -.content { - padding: 1.5rem; - z-index: 1; - +@media screen and (max-width: 768px) { + .content{ + padding: 0.7rem; + z-index:1; + } } +@media screen and (min-width: 1000px) { + .content{ + padding: 1.1rem; + z-index:1; + } +} + + diff --git a/src/pages/Profile/ProfilePage.jsx b/src/pages/Profile/ProfilePage.jsx index 07e1e80..9c4f598 100644 --- a/src/pages/Profile/ProfilePage.jsx +++ b/src/pages/Profile/ProfilePage.jsx @@ -1,10 +1,48 @@ +import React, { useState } from "react"; import styles from "./ProfilePage.module.css"; +function Event({ title,date, tasks }) { + const [isExpanded, setIsExpanded] = useState(false); + + const toggleExpand = () => { + setIsExpanded(!isExpanded); + }; + + return ( +
+
+
+

{title}

+

{date}

+
+ +
+ +
+ ); +} + + function ProfilePage() { return (
-

LEBLOND Malo

-

Role : Président

Membre depuis : 2019

-
+

Mail : mailpro@gmail.com

Téléphone : 08 67 87 32 21

-

..............................................................................................................................................................................................

-

Vos Evenements :

-
-

Titre event

-
    -
  • -- Votre tâche 1
  • -
  • -- Votre tâche 2
  • -
  • -- Votre tâche 3
  • -
-
-
-

Titre event

-
    -
  • -- Votre tâche 1
  • -
  • -- Votre tâche 2
  • -
  • -- Votre tâche 3
  • -
-
-
-

Titre event

-
    -
  • -- Votre tâche 1
  • -
  • -- Votre tâche 2
  • -
  • -- Votre tâche 3
  • -
-
+

Vos Événements :

+ + + + + + +
@@ -59,7 +106,4 @@ function ProfilePage() { ); } - export default ProfilePage; - - diff --git a/src/pages/Profile/ProfilePage.module.css b/src/pages/Profile/ProfilePage.module.css index 65cd48f..b309c90 100644 --- a/src/pages/Profile/ProfilePage.module.css +++ b/src/pages/Profile/ProfilePage.module.css @@ -1,37 +1,153 @@ -.container{ - width:100%; - display: flex; - justify-content: center; -} -.profileboard{ - display: flex; - justify-content: center; - width:90%; - height:500px; +.container { + width: 100%; + padding: 10px; + box-sizing: border-box; } -.contentWrapper{ - display:flex; - width:90%; +.profileboard { + width: 100%; + padding: 15px; + border-radius: 10px; + box-sizing: border-box; } -.profilePictureContainer{ - width:30%; - margin:0; + +.contentWrapper { + display: flex; + flex-direction: column; + align-items: center; + width: 100%; } -.profilePicture{ - width:100%; - border:1px dotted rgb(77, 68, 68); - border-radius:12px; + +.profilePictureContainer { + width: 120px; + height: 120px; + margin-bottom: 15px; } -.description{ - margin-left:12%; + +.profilePicture { + width: 100%; + height: 100%; + border-radius: 50%; + object-fit: cover; } -.topDescription{ - display:flex; + +.description { + width: 100%; + text-align: left; + margin-left:4%; +} + +.topDescription { + display: flex; + flex-direction: column; + gap: 10px; + margin-bottom: 15px; +} + +.infoBlock { + width: 100%; + background: rgba(255, 255, 255, 0.1); + padding: 10px; + border-radius: 5px; +} + +.event { + width: 100%; + padding: 12px; + margin-bottom: 10px; + border-radius: 8px; +} + +.eventTasks { + max-height: 0; + overflow: hidden; + transition: max-height 0.3s ease-out, opacity 0.2s ease; + opacity: 0; + padding-left: 20px; +} + +.eventTasks.expanded { + max-height: 500px; + opacity: 1; + margin-top: 10px; } .description h2{ font-size:30px; + margin-bottom: 2%; +} +.profilePicture{ + width:90%; + } +/* Tablette (768px et plus) */ +@media screen and (min-width: 768px) { + .contentWrapper { + flex-direction: row; + justify-content: flex-start; + align-items: flex-start; + } + + .profilePictureContainer { + width: 150px; + height: 150px; + margin-right: 20px; + margin-bottom: 0; + } + + .description { + width: calc(100% - 170px); + margin-left:4%; + } + + .topDescription { + flex-direction: row; + justify-content: space-between; + } + + .infoBlock { + width: 48%; + } + + .event { + padding: 15px; + } + .description h2{ + font-size:30px; + margin-bottom: 2%; +} +.profilePicture{ + width:90%; + } +} + +/* Desktop (1024px et plus) */ +@media screen and (min-width: 1024px) { + .container { + max-width: 100%; + margin: 0 auto; + padding: 20px; + } + + .profileboard { + padding: 25px; + } + + .profilePictureContainer { + width: 30%; + height:auto; + } + .profilePicture{ + width:90%; + } + .description { + width: calc(100% - 200px); + margin-left:4%; + } + + .event { + padding: 18px; + } + .description h2{ + font-size:30px; + margin-bottom: 2%; +} } -.infoBlock p { - font-size: 22px;; -} \ No newline at end of file