Skip to content

Commit 309c84d

Browse files
committed
Fix mobile styling for landing page
1 parent dcba8c5 commit 309c84d

File tree

5 files changed

+42
-17
lines changed

5 files changed

+42
-17
lines changed

frontend/src/components/Header/Header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export default function Header() {
8080
<Space />
8181
</li>
8282
<li className="nav-item">
83-
<NavButton text={"Learn more"} href={"/"} shadow={true} />
83+
<NavButton text={"Edit pictures"} href={"/"} shadow={true} />
8484
</li>
8585
</ul>
8686
</div>

frontend/src/components/LandingPage/LandingBody.js

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ const ContainerBig = styled.div`
1111
border-bottom: 2px solid var(--color-secondary);
1212
1313
img {
14-
max-width: 80vw;
14+
width: 100%;
1515
}
1616
1717
.inside {
1818
display: flex;
19+
flex-direction: column;
1920
justify-content: space-around;
2021
margin: 4em 0;
2122
2223
div {
23-
max-width: 40%;
24+
margin-bottom: 2rem;
2425
}
2526
2627
h4 {
@@ -32,19 +33,31 @@ const ContainerBig = styled.div`
3233
margin-bottom: 0.6rem;
3334
}
3435
}
36+
37+
@media only screen and (min-width: 992px) {
38+
img {
39+
max-width: 80%;
40+
}
41+
42+
.inside {
43+
flex-direction: row;
44+
45+
div {
46+
max-width: 40%;
47+
margin-bottom: 0;
48+
}
49+
}
50+
}
3551
`;
3652

3753
const ContainerMedium = styled.div`
3854
display: flex;
3955
flex-direction: column;
56+
align-items: center;
4057
justify-content: space-around;
4158
padding: 3.2rem 0;
4259
border-bottom: 2px solid var(--color-secondary);
4360
44-
&.reverse {
45-
flex-direction: column-reverse;
46-
}
47-
4861
h3 {
4962
font-family: var(--text-title);
5063
}
@@ -59,12 +72,11 @@ const ContainerMedium = styled.div`
5972
}
6073
6174
img {
62-
width: 40%;
75+
width: 100%;
6376
}
6477
65-
img,
6678
div {
67-
max-width: 40%;
79+
max-width: 100%;
6880
}
6981
7082
@media only screen and (min-width: 992px) {
@@ -73,12 +85,19 @@ const ContainerMedium = styled.div`
7385
&.reverse {
7486
flex-direction: row;
7587
}
88+
img {
89+
width: 40%;
90+
}
91+
92+
div {
93+
max-width: 40%;
94+
}
7695
}
7796
`;
7897

7998
export default function LandingBody() {
8099
return (
81-
<div>
100+
<main>
82101
<ContainerBig>
83102
<img src={placeholder} />
84103
<div class="inside">
@@ -118,7 +137,8 @@ export default function LandingBody() {
118137
</ContainerMedium>
119138
</SlideIn>
120139
<SlideIn>
121-
<ContainerMedium>
140+
<ContainerMedium className="reverse">
141+
<img src={placeholder} />
122142
<div>
123143
<h3>Image manipulation using openCV</h3>
124144
<p>
@@ -129,7 +149,6 @@ export default function LandingBody() {
129149
</p>
130150
<a>Find out more &rarr;</a>
131151
</div>
132-
<img src={placeholder} />
133152
</ContainerMedium>
134153
</SlideIn>
135154

@@ -139,6 +158,6 @@ export default function LandingBody() {
139158
invert={true}
140159
href="/"
141160
/>
142-
</div>
161+
</main>
143162
);
144163
}

frontend/src/components/LandingPage/LandingTitle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default function LandingTitle() {
5454
No sign up required. Instantly add cool effects to your image by
5555
selecting from the available filters we provide at imapulator!
5656
</p>
57-
<NavButton href={"/"} shadow={true} text={"Learn more"} />
57+
<NavButton href={"/"} shadow={true} text={"Edit pictures now!"} />
5858
</Title>
5959
</Container>
6060
);

frontend/src/components/Shared/EndExplore.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const Container = styled.div`
1111
padding: 4.8rem 0 6rem;
1212
1313
div {
14-
max-width: 60%;
14+
width: 100%;
1515
text-align: center;
1616
animation: var(--animation-slide);
1717
@@ -30,6 +30,12 @@ const Container = styled.div`
3030
margin-top: 2rem;
3131
}
3232
}
33+
34+
@media only screen and (min-width: 992px) {
35+
div {
36+
max-width: 60%;
37+
}
38+
}
3339
`;
3440

3541
export default function EndExplore({ title, subtitle, href, invert }) {

frontend/static/frontend/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)