Skip to content

Commit b23e038

Browse files
committed
feat: better mobile breaks and wraps
1 parent b5ab5e8 commit b23e038

File tree

5 files changed

+30
-18
lines changed

5 files changed

+30
-18
lines changed

src/components/cv/css/base.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ h2 {
6868

6969
h3 {
7070
border-bottom: 0.1rem solid #ccc;
71-
margin: 1rem 0;
71+
margin: 0.7rem auto;
7272
}
7373

7474
h2,

src/components/cv/sections/education/index.jsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ export default class Education extends Component {
2323
const academyCourses = education.academyCourses.map((entry, i) => {
2424
const info = isVerbose
2525
? entry.info.map((info, i) => (
26-
<>
27-
<span> {info}</span>
28-
</>
29-
))
26+
<>
27+
<span> {info}</span>
28+
</>
29+
))
3030
: null;
3131

3232
const date = isVerbose ? (
@@ -40,7 +40,7 @@ export default class Education extends Component {
4040
<li className='academy-course' key={i}>
4141
<span>{entry.title}</span>
4242

43-
<span className='separator-highlight'> @ </span>
43+
<span className='separator-highlight'> @&nbsp;</span>
4444
<span>
4545
{entry.school}{entry.location}
4646
</span>

src/components/cv/sections/education/style.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ h2#education {
44
.flex-container {
55
display: flex;
66
flex-wrap: wrap;
7-
gap: 1.5rem;
7+
gap: 1rem;
88
}
99
.education section {
10-
flex: 1 0 auto;
10+
flex: 1 1 auto;
1111
}
1212
.education section:last-child {
13-
flex-basis: 25%;
13+
flex-basis: 33%;
1414
}

src/components/cv/sections/experience/index.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ export default class Experience extends Component {
4242

4343
return (
4444
<div className='xp' key={i}>
45-
<h3>
45+
<h3 className='grid-container'>
4646
<div className='job-data'>
4747
<FontAwesomeIcon icon={faLaptopCode} fixedWidth />
4848
<span dangerouslySetInnerHTML={{ __html: positions }} />
49-
<span className='separator-highlight'> @ </span>
49+
<span className='separator-highlight'> @&nbsp;</span>
5050
<span className='org'>{entry.company}</span>
5151
</div>
5252
<div className='period'>

src/components/cv/sections/experience/style.css

+19-7
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@
1818
grid-gap: 1rem;
1919
}
2020

21+
.xp .period {
22+
text-align: right;
23+
}
24+
25+
@media (max-width: 895px) {
26+
.xp .grid-container {
27+
grid-template-columns: none;
28+
grid-auto-flow: row;
29+
grid-gap: 0.1rem;
30+
}
31+
.xp .period {
32+
text-align: left;
33+
margin-left: 0;
34+
}
35+
}
36+
2137
.xp article {
2238
margin: 0.5rem auto;
2339
}
@@ -30,17 +46,13 @@
3046
.separator-highlight {
3147
color: var(--primary-blue);
3248
font-weight: bold;
33-
margin: 0 0.3rem;
49+
margin: 0 0.1rem;
3450
}
3551
.xp .job-data,
3652
.xp .period {
3753
display: inline-block;
38-
}
39-
40-
.xp .period {
41-
float: right;
42-
text-align: right;
43-
margin-left: 0.2rem;
54+
text-indent: -1.5rem;
55+
padding-left: 1.5rem;
4456
}
4557

4658
.volunteer.xp .period {

0 commit comments

Comments
 (0)