feat: cv styling changes

This commit is contained in:
Aaron Yarborough 2025-06-23 18:43:49 +01:00
parent 188edc999c
commit 94d013efb2
4 changed files with 59 additions and 58 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "www-aaronjy-me", "name": "www-aaronjy-me",
"version": "2.4.0", "version": "2.4.1",
"private": true, "private": true,
"type": "module", "type": "module",
"lint-staged": { "lint-staged": {

View file

@ -51,15 +51,10 @@ function Resume({
position={exp.position} position={exp.position}
start={exp.start} start={exp.start}
end={exp.end} end={exp.end}
skills={exp.skills}
> >
{markdownToHtml(exp.description)} {markdownToHtml(exp.description)}
</WorkExperience> </WorkExperience>
{!!exp.skills?.length && (
<details className="hide-print">
<summary>Competencies</summary>
<>{exp.skills.sort().join(", ")}</>
</details>
)}
</div> </div>
))} ))}
</div> </div>
@ -107,25 +102,9 @@ function Resume({
export default Resume; export default Resume;
function WorkExperience({ position, employer, start, end, children }) { function WorkExperience({ position, employer, start, end, skills, children }) {
return ( return (
// <div className={style["work-experience"]}> <>
// <div>
// <h3 id={position}>
// {position}
// <br />
// <small>{employer}</small>
// </h3>
// <small>
// <time>{start}</time> - <time>{end}</time>
// </small>
// </div>
// <div
// data-test="children"
// dangerouslySetInnerHTML={{ __html: children }}
// />
// </div>
<table className={style.experienceTable}> <table className={style.experienceTable}>
<tbody> <tbody>
<tr> <tr>
@ -137,9 +116,7 @@ function WorkExperience({ position, employer, start, end, children }) {
<span className={style.employer}>{employer}</span> <span className={style.employer}>{employer}</span>
</td> </td>
<td className="text-right"> <td className="text-right">
{/* <small> */}
<time>{start}</time> - <time>{end}</time> <time>{start}</time> - <time>{end}</time>
{/* </small> */}
</td> </td>
</tr> </tr>
<tr> <tr>
@ -147,10 +124,21 @@ function WorkExperience({ position, employer, start, end, children }) {
<div <div
data-test="children" data-test="children"
dangerouslySetInnerHTML={{ __html: children }} dangerouslySetInnerHTML={{ __html: children }}
className={style.experienceContent}
/> />
{!!skills?.length && (
<div className={style.skillList}>
{skills.sort().map((skill) => (
<span key={skill}>{skill}</span>
))}
</div>
)}
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<hr />
</>
); );
} }

View file

@ -9,7 +9,7 @@
.cvContent { .cvContent {
display: flex; display: flex;
flex-direction: row-reverse; flex-direction: row-reverse;
gap: 3rem; gap: 0.5em;
position: relative; position: relative;
} }
@ -30,11 +30,28 @@
margin-bottom: 0; margin-bottom: 0;
} }
.cv ol, .cvContent ol,
.cv ul { .cvContent ul {
padding: 0 1rem; padding: 0 1rem;
} }
.skillList {
font-size: 0.8em;
display: flex;
flex-wrap: wrap;
gap: 0.2em;
}
.skillList span {
background-color: var(--dark);
color: var(--light);
padding: 0 0.5em;
}
.experienceContent > p {
margin-bottom: 0;
}
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
.cvContent { .cvContent {
display: block; display: block;
@ -47,10 +64,6 @@
} }
@media print { @media print {
.cvContent {
gap: 1rem;
}
.cvContent .experience { .cvContent .experience {
flex-basis: 80%; flex-basis: 80%;
} }

View file

@ -37,7 +37,7 @@ td:first-child {
} }
body { body {
font-size: 12px; font-size: 11.5px;
line-height: 1.3; line-height: 1.3;
padding: 0; padding: 0;
} }