Skip to content

Commit d99bf17

Browse files
committed
feat: 💄 adapt header for mobile
1 parent 5396901 commit d99bf17

File tree

2 files changed

+34
-9
lines changed

2 files changed

+34
-9
lines changed

src/components/header.js

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,28 @@ let NavWrapper = styled.nav`
5454

5555
let ImagesWrapper = styled.div`
5656
position: relative;
57-
margin-bottom: 60px;
57+
margin-bottom: 70px;
58+
59+
@media screen and (min-width: 52em) {
60+
margin-bottom: 60px;
61+
}
5862
`
5963

6064
let AvatarWrapper = styled.div`
6165
position: absolute;
62-
bottom: -50px;
66+
bottom: -70px;
67+
68+
@media screen and (min-width: 52em) {
69+
bottom: -50px;
70+
}
71+
6372
padding: 0 20px;
6473
width: 100%;
6574
`
6675

6776
let Avatar = styled(Img)`
6877
background: #fff;
6978
border: 3px solid #fff;
70-
width: 150px;
7179
`
7280

7381
let Header = () => (
@@ -78,13 +86,30 @@ let Header = () => (
7886
<Img fluid={background} style={{ height: 250 }} />
7987

8088
<Flex as={AvatarWrapper} alignItems="flex-end">
81-
<Avatar fluid={avatar} />
89+
<Box as={Avatar} fluid={avatar} width={[100, 150]} />
8290

83-
<Box as="h1" m={0} ml={20} fontSize={24}>
84-
Nikita Kirsanov
85-
</Box>
91+
<Flex
92+
flexDirection={['column', 'row']}
93+
justifyContent="space-between"
94+
alignItems="flex-end"
95+
flex={1}
96+
>
97+
<Box
98+
as="h1"
99+
m={0}
100+
ml={20}
101+
fontSize={24}
102+
css={`
103+
white-space: nowrap;
104+
`}
105+
>
106+
Nikita Kirsanov
107+
</Box>
86108

87-
<SocialLinks />
109+
<Box mt={[10, 0]}>
110+
<SocialLinks />
111+
</Box>
112+
</Flex>
88113
</Flex>
89114
</ImagesWrapper>
90115
)}

src/pages/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const IndexPage = ({ data: { about, portfolio, talks } }) => {
3535
let [label, value] = s.split('|')
3636

3737
return (
38-
<Box mr="10px">
38+
<Box mr={[0, 10]} mb={['5px', 0]}>
3939
<Shield {...{ label, value }} />
4040
</Box>
4141
)

0 commit comments

Comments
 (0)