Skip to content

Commit

Permalink
Remove theme button from print. rearrange work info
Browse files Browse the repository at this point in the history
  • Loading branch information
DarwinsBuddy committed Sep 7, 2024
1 parent 100f654 commit 86a25cc
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 41 deletions.
3 changes: 2 additions & 1 deletion src/components/education/education.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ function renderEducation(education: Education): JSX.Element {
<div className="col">
{renderLogo(
education.institute.logo,
education.institute.link
education.institute.link,
"logo-sm"
)}
</div>
<div className="col">
Expand Down
15 changes: 8 additions & 7 deletions src/components/header/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
display: flex;
flex-direction: row;
position: sticky;
max-height: var(--max-header-size);
top: 0;
box-shadow: var(--header-box-shadow);
z-index: 2;
Expand All @@ -13,8 +14,8 @@
.theme-button {
display: flex;
justify-content: center;
background-color: var(--header-bg-color);
color: var(--fg-color);
background-color: var(--theme-button-bg);
color: var(--theme-button-fg);
align-items: center;
max-height: 2rem;
max-width: 2rem;
Expand All @@ -30,26 +31,26 @@
display: flex;
flex-direction: row;
justify-content: start;
flex-grow: 5;
margin-top: 1rem;
flex: 4;
margin-top: 0.5rem;
border-right: var(--fg-color) 1px solid;
}

.contact-container {
justify-content: space-around;
align-items: center;
flex-grow: 1;
flex: 1;
flex-wrap: wrap;
}

.contact {
width: 100%;
padding: 1rem;
padding: 0.25rem 0.5rem;
}

.address {
width: 100%;
padding: 1rem;
padding: 0.25rem 0.5rem;
}

.title-container {
Expand Down
1 change: 0 additions & 1 deletion src/components/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export function Header() {
const [darkMode, setDarkMode] = useState(true);
useEffect(() => {
document.documentElement.setAttribute("data-theme", darkMode ? "dark" : "light");
console.log("Switched theme", darkMode ? "dark" : "light");
}, [darkMode]);

return (
Expand Down
12 changes: 5 additions & 7 deletions src/components/work/work.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@
flex-wrap: wrap;
}

.achievements-container {
flex-basis: 15rem;
padding: 0 0.5rem 0.5rem 0;
flex: 1;
}

.achievements {
display: flex;
flex-direction: row;
Expand All @@ -60,7 +54,11 @@
}

.projects {
flex: 2;
flex: 1;
}

.job-description {
flex: 1;
flex-basis: 15rem;
}

Expand Down
49 changes: 24 additions & 25 deletions src/components/work/work.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,35 +164,34 @@ function renderWork(work: Work): JSX.Element {
className="timeline-card timeline-card-primary col card pagebreak"
key={work.id}
>
<div className="timeline-head">
<div className="row">
<div className="col">
{renderLogo(work.company.logo, work.company.link)}
</div>
<div className="work-header">
<div className="col work-info">
<p className="title">
<b>{work.company.name}</b>
</p>
<p className="location">{work.company.location}</p>
<p className="title">
<b>{work.jobTitle}</b>
</p>
<p className="sub-title">{work.jobSubtitle}</p>
<div className="time">
<div className="years">{work.years}</div>
<div className="duration">{work.duration}</div>
</div>
<div className="timeline-head"></div>
<div className="timeline-body row">
<div className="job-description col">
<div className="row">
<div className="col">
{renderLogo(work.company.logo, work.company.link)}
</div>
<div className="achievements-container">
{renderAchievements(work.achievements)}
<div className="work-header">
<div className="col work-info">
<p className="title">
<b>{work.company.name}</b>
</p>
<p className="location">{work.company.location}</p>
<p className="title">
<b>{work.jobTitle}</b>
</p>
<p className="sub-title">{work.jobSubtitle}</p>
<div className="time">
<div className="years">{work.years}</div>
<div className="duration">{work.duration}</div>
</div>
</div>
</div>
</div>
{renderProjects(work.projects)}
</div>
</div>
<div className="timeline-body row flex-wrap">
{renderProjects(work.projects)}
<div className="additional-info">
<div className="additional-info col">
{renderAchievements(work.achievements)}
{renderScope(work.scope)}
{renderTech(work.tech)}
</div>
Expand Down
9 changes: 9 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
--card-bg: var(--bg);
--link-color: #d9d9d9;
--link-color-hover: #aaaed9;
--theme-button-bg: var(--header-bg-color);
--theme-button-fg: var(--fg-color);

color: var(--fg-color);
background-color: var(--bg-color);
Expand Down Expand Up @@ -65,6 +67,7 @@
--timeline-point-size: 1.5rem;
--timeline-point-hadjust: -1rem;
--timeline-point-border: 3px solid;
--max-header-size: 15rem;
}


Expand All @@ -90,6 +93,9 @@

@media print {
:root {

--max-header-size: 8rem;

--font-xx-large: 12pt;
--font-x-large: 10pt;
--font-large: 8pt;
Expand All @@ -102,6 +108,9 @@
--timeline-point-size: 0.7rem;
--timeline-point-hadjust: -0.54rem;
--timeline-point-border: 2px solid;

--theme-button-bg: var(--header-bg-color);
--theme-button-fg: var(--header-bg-color);
}
}

Expand Down

0 comments on commit 86a25cc

Please sign in to comment.