Modify the layout of logos with respect to the experience title

This commit is contained in:
Murtadha 2024-07-13 17:41:37 -04:00
parent 250a6b7020
commit 3cbab68b54
2 changed files with 32 additions and 18 deletions

View file

@ -2,7 +2,6 @@ import React from "react";
import styles from "./InfoSection.module.css"; import styles from "./InfoSection.module.css";
function InfoSection({ title, data, isEducation }) { function InfoSection({ title, data, isEducation }) {
// Sort the data array based on ID in descending order (newest first)
const sortedData = [...data].sort((a, b) => b.id - a.id); const sortedData = [...data].sort((a, b) => b.id - a.id);
return ( return (
@ -10,14 +9,18 @@ function InfoSection({ title, data, isEducation }) {
<h2 className={styles.sectionTitle}>{title}</h2> <h2 className={styles.sectionTitle}>{title}</h2>
{sortedData.map((item) => ( {sortedData.map((item) => (
<div key={item.id} className={styles.entry}> <div key={item.id} className={styles.entry}>
<div className={styles.logoContainer}> <div className={styles.headerSection}>
<img src={item.logo} alt={`${item.organization} logo`} className={styles.logo} /> <div className={styles.logoContainer}>
<img src={item.logo} alt={`${item.organization} logo`} className={styles.logo} />
</div>
<div className={styles.titleSection}>
<h3 className={styles.title}>{item.title}</h3>
<p className={styles.organizationInfo}>
{item.organization} | {item.location} | {item.duration}
</p>
</div>
</div> </div>
<div className={styles.content}> <div className={styles.content}>
<h3 className={styles.title}>{item.title}</h3>
<p className={styles.organizationInfo}>
{item.organization} | {item.location} | {item.duration}
</p>
<p className={styles.description}>{item.description}</p> <p className={styles.description}>{item.description}</p>
<div className={styles.additionalInfo}> <div className={styles.additionalInfo}>
{isEducation && item.achievements && item.achievements.length > 0 && ( {isEducation && item.achievements && item.achievements.length > 0 && (

View file

@ -13,25 +13,32 @@
} }
.entry { .entry {
display: flex;
position: relative; position: relative;
margin-bottom: 40px; margin-bottom: 40px;
padding-left: 20px; padding-left: 20px;
border-left: 2px solid var(--accent-color); border-left: 2px solid var(--accent-color);
} }
.headerSection {
display: flex;
align-items: center;
margin-bottom: 15px;
}
.logoContainer { .logoContainer {
flex: 0 0 80px; flex: 0 0 auto;
margin-right: 20px; margin-right: 20px;
height: 60px; /* Adjust this value to match your desired logo height */
width: 60px; /* Adjust this value to maintain aspect ratio */
} }
.logo { .logo {
width: 100%; width: 100%;
height: auto; height: 100%;
object-fit: contain; object-fit: contain;
} }
.content { .titleSection {
flex: 1; flex: 1;
} }
@ -44,10 +51,13 @@
.organizationInfo { .organizationInfo {
font-size: 1.1rem; font-size: 1.1rem;
margin-bottom: 10px;
color: #333; color: #333;
} }
.content {
margin-left: 80px; /* This should match the logoContainer width + its right margin */
}
.description { .description {
font-size: 1rem; font-size: 1rem;
line-height: 1.6; line-height: 1.6;
@ -62,8 +72,8 @@
} }
.skillSection { .skillSection {
flex: 1 1 30%; /* This allows for 3 columns with some flexibility */ flex: 1 1 30%;
min-width: 200px; /* Ensures readability on smaller screens */ min-width: 200px;
margin-bottom: 15px; margin-bottom: 15px;
} }
@ -94,16 +104,17 @@
padding: 30px 5%; padding: 30px 5%;
} }
.entry { .headerSection {
flex-direction: column; flex-direction: row;
align-items: flex-start;
} }
.logoContainer { .logoContainer {
margin-bottom: 15px; margin-right: 15px;
} }
.content { .content {
padding-left: 0; margin-left: 0;
} }
.additionalInfo { .additionalInfo {