Skip to content

Commit 734b5f5

Browse files
authored
Merge pull request #136 from sakshamsharma/mobile-view-stack
Fix mobile view of the homepage: vertically stack logo
2 parents 0577e97 + d007545 commit 734b5f5

2 files changed

Lines changed: 35 additions & 8 deletions

File tree

src/pages/index.module.css

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,20 @@
2626
display: flex;
2727
align-items: center;
2828
justify-content: center;
29-
gap: 10px; /* Adjust the space between images and text */
29+
gap: 10px;
3030
}
3131

32-
.taglineImage {
33-
height: 50px; /* Reduce the height of the images */
34-
width: auto; /* Ensure the width adjusts automatically to maintain the aspect ratio */
35-
object-fit: contain; /* Maintain aspect ratio of the SVGs */
32+
.leftLogo,
33+
.rightLogo {
34+
width: 400px;
35+
height: 400px;
36+
object-fit: contain;
37+
}
38+
39+
.taglineText {
40+
display: inline-block;
41+
max-width: 32rem;
42+
line-height: 1.35;
3643
}
3744

3845
.hero__subtitle {
@@ -42,3 +49,23 @@
4249
text-align: center;
4350
margin-top: 10px;
4451
}
52+
53+
@media screen and (max-width: 996px) {
54+
.taglineContainer {
55+
flex-direction: column;
56+
gap: 12px;
57+
}
58+
59+
.rightLogo {
60+
display: none;
61+
}
62+
63+
.leftLogo {
64+
width: min(70vw, 260px);
65+
height: auto;
66+
}
67+
68+
.taglineText {
69+
max-width: 18rem;
70+
}
71+
}

src/pages/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ function HomepageHeader() {
2222
/* TODO: check if we can use SVG images*/
2323
src="./img/beman_logo.png"
2424
alt="Left Logo"
25-
style={{ width: "400px", height: "400px" }}
25+
className={styles.leftLogo}
2626
/>
27-
<span>{siteConfig.tagline}</span>
27+
<span className={styles.taglineText}>{siteConfig.tagline}</span>
2828
<img
2929
/* TODO: check if we can use SVG images*/
3030
src="./img/beman_logo_reversed.png"
3131
alt="Right Logo"
32-
style={{ width: "400px", height: "400px" }}
32+
className={styles.rightLogo}
3333
/>
3434
</div>
3535
</div>

0 commit comments

Comments
 (0)