Skip to content

Commit 790b026

Browse files
committed
improved hero for mobile devices
1 parent 99cb0b7 commit 790b026

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@
6868
<div class="hero">
6969
<img width="2560" height="1440" draggable="false" src="./assets/main/hero.webp" alt="wedding couple under sakura trees">
7070
</div>
71+
<div class="mobile-hero">
72+
<img width="500" height="1080" draggable="false" src="./assets/main/hero_mobile.webp" alt="wedding couple under sakura trees">
73+
</div>
7174
<!-- content -->
7275
<div class="grid-container">
7376
<!-- venues -->

style.css

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,16 +190,21 @@ nav {
190190
transform: translateY(0) rotate(-45deg);
191191
}
192192
/* hero */
193-
.hero {
193+
.hero,
194+
.mobile-hero {
194195
position: relative;
195196
}
196-
.hero img {
197+
.hero img,
198+
.mobile-hero img {
197199
width: 100%;
198200
height: auto;
199201
mask-image: linear-gradient(180deg,
200202
rgba(0, 0, 0, 1) 50%,
201203
transparent 90%);
202204
}
205+
.mobile-hero img {
206+
display: none;
207+
}
203208
/* grid layout */
204209
.grid-container {
205210
display: grid;
@@ -548,6 +553,10 @@ footer .container .section.social i {
548553
padding: 0 .5rem;
549554
}
550555
.hero img {
556+
display: none;
557+
}
558+
.mobile-hero img {
559+
display: block;
551560
height: 50vh;
552561
object-fit: cover;
553562
}

0 commit comments

Comments
 (0)