Skip to content

Commit c9eeed1

Browse files
committed
employer list. style tweaks
1 parent 334af1d commit c9eeed1

File tree

4 files changed

+36
-22
lines changed

4 files changed

+36
-22
lines changed

dist/content/employers.json

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,36 @@
11
[
22
{
33
"name": "The Orchard",
4-
"link": "http://www.theorchard.com/"
4+
"link": "http://www.theorchard.com/",
5+
"dates": "Sept 2017 - present"
56
},
7+
{
8+
"name": "Typedef",
9+
"link": "http://www.theorchard.com/",
10+
"dates": "Mar 2014 - present"
11+
},
612
{
713
"name": "Huge",
8-
"link": "http://www.hugeinc.com/"
14+
"link": "http://www.hugeinc.com/",
15+
"dates": "May 2014 - Sept 2017"
916
},
1017
{
1118
"name": "Stink",
12-
"link": "https://www.stinkstudios.com/"
19+
"link": "https://www.stinkstudios.com/",
20+
"dates": "Sep 2013 - Mar 2014"
1321
},
1422
{
1523
"name": "Your Majesty",
16-
"link": "https://yourmajesty.co/"
24+
"link": "https://yourmajesty.co/",
25+
"dates": "Aug 2011 - Mar 2013"
1726
},
1827
{
1928
"name": "Pentagram",
20-
"link": "https://www.pentagram.com/"
29+
"link": "https://www.pentagram.com/",
30+
"dates": "Aug 2010 - Mar 2011"
2131
},
2232
{
23-
"name": "The Map Office"
33+
"name": "The Map Office",
34+
"dates": "Aug 2010 - Mar 2011"
2435
}
2536
]

src/components/StuffList/index.js

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,23 @@ class StuffListInner extends React.Component<WithDispatch<OwnProps>> {
3232
);
3333
}
3434

35-
renderItem(item: { name: string, link?: string }) {
36-
if (item.link)
37-
return (
38-
<a href={item.link} target="_blank">
39-
{item.name}
40-
</a>
41-
);
42-
return item.name;
43-
}
44-
4535
render() {
36+
const dir =
37+
this.props.list && this.props.list[0].dates !== undefined
38+
? "column"
39+
: "row";
4640
return (
47-
<ListWrapper>
41+
<ListWrapper style={{ flexDirection: dir }}>
4842
{this.props.list &&
4943
this.props.list.map((item, i) => (
5044
<ListItem key={`${item.name}-${i}`}>
51-
{this.renderItem(item)}
45+
{item.link && (
46+
<a href={item.link} target="_blank">
47+
{item.name}
48+
</a>
49+
)}
50+
{!item.link && item.name}
51+
{item.dates && <span>&nbsp;&ndash;&nbsp;{item.dates}</span>}
5252
</ListItem>
5353
))}
5454
</ListWrapper>
@@ -61,7 +61,6 @@ export default connect(mapStateToProps)(StuffListInner);
6161
const ListWrapper = styled.ul`
6262
list-style: none;
6363
display: flex;
64-
flex-direction: row;
6564
flex-wrap: wrap;
6665
justify-content: stretch;
6766
padding: 0 2rem;
@@ -74,4 +73,7 @@ const ListItem = styled.li`
7473
&:hover {
7574
color: ${colors.red};
7675
}
76+
span {
77+
font-size: 0.85rem;
78+
}
7779
`;

src/components/Work/Project.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { WithDispatch } from "@src/store";
77
import * as Types from "@src/types";
88
import * as ProjectActions from "./actions";
99
import Nervous, { type NervousPoint } from "./Nervous";
10-
import { breakLg, colors } from "@src/styles";
10+
import { breakLg } from "@src/styles";
1111
import { withRouter, type WithRouter } from "react-router-dom";
1212

1313
type Props = {|
@@ -233,7 +233,7 @@ const Project = styled.div`
233233
margin: 0.61rem 0;
234234
}
235235
&:focus {
236-
outline: 1px dotted ${colors.red};
236+
outline: none;
237237
}
238238
&.dis-true {
239239
opacity: 0.1;

src/types.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ export type Project = {
4545

4646
export type List = Array<{|
4747
name: string,
48-
link?: string
48+
link?: string,
49+
dates?: string
4950
|}>;
5051

5152
export type Bio = {|

0 commit comments

Comments
 (0)