add responsive profile

This commit is contained in:
p2405951
2026-02-10 14:58:25 +01:00
parent 85d9e60025
commit 26dcc0fcd3
3 changed files with 139 additions and 118 deletions
+4
View File
@@ -0,0 +1,4 @@
export const APP_CONFIG = {
contactEmail: "contact@example.com",
contactPhone: "+33 01 02 03 04 05"
}
+133 -116
View File
@@ -1,158 +1,175 @@
/* Conteneur principal */
.container { .container {
width: 100%; width: 100%;
padding: 12px; padding: 12px;
box-sizing: border-box; box-sizing: border-box;
margin: 0 auto;
} }
.profileboard { .profileboard {
width: 100%; width: 100%;
padding: 16px; padding: 16px;
border-radius: 20px; border-radius: 20px;
box-sizing: border-box; box-sizing: border-box;
}
.settingImage{
width:100%;
display: flex;
justify-content: center;
} }
.contentWrapper { .contentWrapper {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
width: 100%; width: 100%;
gap: 20px;
} }
.profilePictureContainer { .profilePictureContainer {
width: 120px; width: 120px;
height: 120px; height: 120px;
margin-bottom: 16px; margin-bottom: 0;
position: relative;
display: flex;
justify-content: center;
} }
.profilePicture { .profilePicture {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 50%; border-radius: 50%;
object-fit: cover; object-fit: cover;
}
.editPictureButton {
margin-top: 16px;
padding-top: 12px;
padding-bottom: 12px;
background: rgba(255, 255, 255, 0.95);
border: none;
border-radius: 24px;
cursor: pointer;
font-size: 0.95rem;
font-weight: 600;
color: #e74c3c;
box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
transition: all 0.3s ease;
backdrop-filter: blur(5px);
white-space: nowrap;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
width: auto;
min-width: 140px;
}
.editPictureButton:hover {
background: rgba(255, 255, 255, 1);
transform: translateY(-2px);
box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
color: #c0392b;
} }
.description { .description {
width: 100%; width: 100%;
text-align: left; text-align: left;
} }
.headerProfile { .headerProfile {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 16px; margin-bottom: 16px;
} }
.description h2 { .headerProfile h2 {
font-size: 1.6rem; font-size: 1.6rem;
margin-bottom: 10px; margin: 0;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
}
.description button {
width: 44px;
height: 44px;
min-width: 44px;
min-height: 44px;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
background: transparent;
border: none;
cursor: pointer;
}
.modifyIcon {
width: 22px;
height: 22px;
display: block;
margin: 0;
} }
/* Conteneur des informations principales */
.topDescription { .topDescription {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 12px; gap: 16px;
margin-bottom: 20px; width: 100%;
margin-bottom: 20px;
} }
/* Bloc d'informations */
.infoBlock { .infoBlock {
width: 100%; width: 100%;
padding: 12px; padding: 12px;
box-sizing: border-box;
} }
.eventTasks { /* Conteneur pour les paramètres */
max-height: 0; .settingImage {
overflow: hidden; width: 100%;
transition: max-height 0.3s ease, opacity 0.2s ease; display: flex;
opacity: 0; justify-content: center;
padding-left: 16px; margin-top: 16px;
}
.eventTasks.expanded {
max-height: 500px;
opacity: 1;
margin-top: 10px;
} }
/* Adaptation pour tablette et PC */
@media (min-width: 768px) { @media (min-width: 768px) {
.contentWrapper { .contentWrapper {
flex-direction: row; flex-direction: row;
align-items: flex-start; align-items: flex-start;
} gap: 24px;
}
.profilePictureContainer { .profilePictureContainer {
width: 150px; width: 150px;
height: 150px; height: 150px;
margin-right: 24px; margin-right: 0;
margin-bottom: 0; }
}
.description { .description {
width: calc(100% - 180px); width: calc(100% - 180px);
} }
.topDescription { .topDescription {
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
} flex-wrap: wrap;
}
.infoBlock { .infoBlock {
width: 48%; flex: 1;
} min-width: calc(50% - 8px);
max-width: calc(50% - 8px);
}
.description h2 { .editPictureButton {
font-size: 1.8rem; margin: 16px auto 0 auto;
} display: block;
}
.headerProfile h2 {
font-size: 1.8rem;
}
} }
/* Adaptation pour grand écran */
@media (min-width: 1024px) { @media (min-width: 1024px) {
.container { .container {
max-width: 1200px; max-width: 1200px;
margin: 0 auto; padding: 24px;
padding: 24px; }
}
.profileboard { .profileboard {
padding: 28px; padding: 28px;
} }
.profilePictureContainer { .profilePictureContainer {
width: 180px; width: 180px;
height: 180px; height: 180px;
} }
.description { .description {
width: calc(100% - 220px); width: calc(100% - 220px);
} }
.description h2 { .headerProfile h2 {
font-size: 2rem; font-size: 2rem;
} }
} }
+2 -2
View File
@@ -67,7 +67,8 @@ function ProfilePage() {
alt="Photo de profil" alt="Photo de profil"
className={styles.profilePicture} className={styles.profilePicture}
/> />
<button </div>
<button
onClick={handleEditPictureClick} onClick={handleEditPictureClick}
className={styles.editPictureButton} className={styles.editPictureButton}
> >
@@ -80,7 +81,6 @@ function ProfilePage() {
accept="image/*" accept="image/*"
style={{ display: "none" }} style={{ display: "none" }}
/> />
</div>
<div className={styles.description}> <div className={styles.description}>
<div className={styles.headerProfile}> <div className={styles.headerProfile}>