Skip to content

Commit 88fd1ca

Browse files
Merge pull request #125 from Eddie992/makevideoresponsive
chore: make the video on home responsive #121
2 parents 7f6c32c + f6cc90c commit 88fd1ca

File tree

2 files changed

+29
-7
lines changed

2 files changed

+29
-7
lines changed

src/app/components/heroSection/heroSection.module.css

+28-6
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@
3030
text-align: center;
3131
font-weight: 700;
3232
font-size: 2rem;
33-
width: 17rem;
34-
height: 10rem;
35-
padding: 2rem;
33+
width: 33rem;
34+
height: 19rem;
35+
padding: 0.25rem;
3636
background-color: #333;
3737
color: white;
3838
display: flex;
3939
align-items: center;
4040
justify-content: center;
4141
border-radius: 10px;
4242
z-index: 2;
43-
margin-right: 1rem;
44-
max-width: 400px; /* Ensure the videoPlaceholder has a max width */
43+
margin-left: 5rem;
44+
max-width: 600px; /* Ensure the videoPlaceholder has a max width*/
4545
}
4646

4747
.intro {
@@ -71,6 +71,20 @@
7171
margin-right: 1rem;
7272
} */
7373

74+
@media (max-width: 1350px) {
75+
.videoPlaceholder {
76+
width: 39vw;
77+
height: auto;
78+
}
79+
}
80+
81+
@media (max-width: 1200px) {
82+
.videoPlaceholder {
83+
width: 33vw;
84+
height: auto;
85+
}
86+
}
87+
7488
@media (max-width: 850px) {
7589
.hero {
7690
background: var(
@@ -101,9 +115,17 @@
101115
.videoPlaceholder {
102116
width: 100%;
103117
max-width: none;
104-
margin-right: 0;
118+
margin-right: 5rem;
105119
margin-top: 1rem;
106120
max-width: 300px;
107121
height: auto;
122+
padding: 1.5rem 1rem;
123+
}
124+
}
125+
126+
@media (max-width: 480px) {
127+
.videoPlaceholder {
128+
width: 60%;
129+
padding: 1rem 0.7rem;
108130
}
109131
}

src/app/components/heroSection/heroSection.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default function HeroSection() {
1111
</div>
1212
<div className={styles.purpleShape}>
1313
<div className={styles.videoPlaceholder}>
14-
<video width='320' loop autoPlay muted>
14+
<video width='100%' loop autoPlay muted>
1515
<source src='/assets/MeetupIntro.mp4' type='video/mp4' />
1616
Your browser does not support the video tag.
1717
</video>

0 commit comments

Comments
 (0)