Skip to content

Commit 44eaba9

Browse files
authored
Improve homepage on mobile (#874)
* [gatsby][mobile] center + padding on banner * [gatsby][mobile] ellipsis in searchbar * [gatsby][mobile] reduce size of main header + center + spacing * [gatsby][mobile] reduce padding + decrease icon size on SellingPoints
1 parent 30a7277 commit 44eaba9

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

packages/gatsby/src/components/header.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ const NewsContainer = styled.div`
2525
${ifMobile} {
2626
white-space: pre-wrap;
2727
line-height: 1.5em;
28+
text-align: center;
29+
padding-top: 5px;
2830
}
2931
3032
background: #2188b6;

packages/gatsby/src/components/search/SearchBox.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const SearchInput = styled.input`
3838
font: inherit;
3939
color: #2c8ebb;
4040
margin-left: 0.5em;
41+
text-overflow: ellipsis;
4142
`;
4243

4344
const IconButton = styled.button`
@@ -64,6 +65,7 @@ const IconButton = styled.button`
6465

6566
const SubmitButton = styled(IconButton)`
6667
order: 1;
68+
top: -2px;
6769
svg {
6870
top: 0.2em;
6971
left: 0.2em;

packages/gatsby/src/pages/index.js

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ const sectionStyle = css`
2323

2424
const Section = styled.div`
2525
${sectionStyle}
26+
27+
${ifMobile} {
28+
padding: 0 1em;
29+
}
2630
`;
2731

2832
const sectionContentStyle = css`
@@ -50,6 +54,11 @@ const Hero = styled.div`
5054

5155
const HeroTitle = styled.div`
5256
font-size: 4em;
57+
${ifMobile} {
58+
font-size: 2.2em;
59+
text-align: center;
60+
}
61+
5362
font-weight: bold;
5463
5564
color: #ffffff;
@@ -58,12 +67,16 @@ const HeroTitle = styled.div`
5867

5968
const HeroSubtitle = styled.div`
6069
max-width: 800px;
61-
70+
color: #ffffff;
6271
margin-top: 40px;
63-
6472
font-size: 1.5em;
6573
66-
color: #ffffff;
74+
${ifMobile} {
75+
margin-top: 20px;
76+
font-size: 1.2em;
77+
text-align: center;
78+
margin-bottom: 10px;
79+
}
6780
`;
6881

6982
const SellingPoints = styled.div`
@@ -80,6 +93,9 @@ const SellingPointContainer = styled.div`
8093
${ifDesktop} {
8194
width: calc(50% - 20px);
8295
}
96+
${ifMobile} {
97+
align-items: center;
98+
}
8399
84100
margin-top: 40px;
85101
@@ -91,13 +107,20 @@ const SellingPointContainer = styled.div`
91107
const SellingPointIcon = styled.img`
92108
width: 100px;
93109
height: 100px;
110+
${ifMobile} {
111+
width: 75px;
112+
height: 75px;
113+
}
94114
`;
95115

96116
const SellingPointContent = styled.div`
97117
margin-left: 20px;
98118
99119
h3 {
100120
margin-top: 0;
121+
${ifMobile} {
122+
margin-bottom: .5em;
123+
}
101124
}
102125
`;
103126

0 commit comments

Comments
 (0)