From 86a25cce324443a6af5e682cc449aef67feedcbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Sp=C3=B6rk?= Date: Sat, 7 Sep 2024 13:35:55 +0200 Subject: [PATCH] Remove theme button from print. rearrange work info --- src/components/education/education.tsx | 3 +- src/components/header/header.css | 15 ++++---- src/components/header/header.tsx | 1 - src/components/work/work.css | 12 +++---- src/components/work/work.tsx | 49 +++++++++++++------------- src/index.css | 9 +++++ 6 files changed, 48 insertions(+), 41 deletions(-) diff --git a/src/components/education/education.tsx b/src/components/education/education.tsx index 28754fd..49f3517 100644 --- a/src/components/education/education.tsx +++ b/src/components/education/education.tsx @@ -30,7 +30,8 @@ function renderEducation(education: Education): JSX.Element {
{renderLogo( education.institute.logo, - education.institute.link + education.institute.link, + "logo-sm" )}
diff --git a/src/components/header/header.css b/src/components/header/header.css index e95cdb7..1fdd01e 100644 --- a/src/components/header/header.css +++ b/src/components/header/header.css @@ -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; @@ -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; @@ -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 { diff --git a/src/components/header/header.tsx b/src/components/header/header.tsx index 9416dd4..9d76c5e 100644 --- a/src/components/header/header.tsx +++ b/src/components/header/header.tsx @@ -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 ( diff --git a/src/components/work/work.css b/src/components/work/work.css index a6f7d24..d028333 100644 --- a/src/components/work/work.css +++ b/src/components/work/work.css @@ -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; @@ -60,7 +54,11 @@ } .projects { - flex: 2; + flex: 1; +} + +.job-description { + flex: 1; flex-basis: 15rem; } diff --git a/src/components/work/work.tsx b/src/components/work/work.tsx index 479646b..da39918 100644 --- a/src/components/work/work.tsx +++ b/src/components/work/work.tsx @@ -164,35 +164,34 @@ function renderWork(work: Work): JSX.Element { className="timeline-card timeline-card-primary col card pagebreak" key={work.id} > -
-
-
- {renderLogo(work.company.logo, work.company.link)} -
-
-
-

- {work.company.name} -

-

{work.company.location}

-

- {work.jobTitle} -

-

{work.jobSubtitle}

-
-
{work.years}
-
{work.duration}
-
+
+
+
+
+
+ {renderLogo(work.company.logo, work.company.link)}
-
- {renderAchievements(work.achievements)} +
+
+

+ {work.company.name} +

+

{work.company.location}

+

+ {work.jobTitle} +

+

{work.jobSubtitle}

+
+
{work.years}
+
{work.duration}
+
+
+ {renderProjects(work.projects)}
-
-
- {renderProjects(work.projects)} -
+
+ {renderAchievements(work.achievements)} {renderScope(work.scope)} {renderTech(work.tech)}
diff --git a/src/index.css b/src/index.css index f6ba033..489cd71 100644 --- a/src/index.css +++ b/src/index.css @@ -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); @@ -65,6 +67,7 @@ --timeline-point-size: 1.5rem; --timeline-point-hadjust: -1rem; --timeline-point-border: 3px solid; + --max-header-size: 15rem; } @@ -90,6 +93,9 @@ @media print { :root { + + --max-header-size: 8rem; + --font-xx-large: 12pt; --font-x-large: 10pt; --font-large: 8pt; @@ -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); } }