Skip to content

Commit

Permalink
fix: incorrect sizing for home banner image
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenpuglia committed May 18, 2024
1 parent 2047fe1 commit 8dc55d4
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"_site": false
"_site": true
}
}
File renamed without changes.
Binary file added src/assets/images/home-banner-mobile.avif
Binary file not shown.
Binary file added src/assets/images/home-banner-tablet.avif
Binary file not shown.
6 changes: 5 additions & 1 deletion src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ layout: base
title: Home
---

<img class="hero-banner" decoding="async" loading="lazy" src="home-banner.avif" alt="Praveen at VueDay, 2019" fetchpriority="high"/>
<picture class="hero-banner">
<source media="(max-width: 480px)" srcset="/assets/images/home-banner-mobile.avif" />
<source media="(max-width: 767px)" srcset="/assets/images/home-banner-tablet.avif" />
<img src="/assets/images/home-banner-desktop.avif" alt="Speaking at VueDay, Bengaluru, 2019" fetchpriority="high" />
</picture>

## Hello!

Expand Down
1 change: 1 addition & 0 deletions static/css/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
}
.navigation-links {
list-style: none;
font-size: 1.25rem;
margin: 0;
padding: 0;
display: flex;
Expand Down
7 changes: 6 additions & 1 deletion static/css/home.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
.hero-banner img {
.hero-banner {
display: block;
margin: auto;
margin-bottom: 3rem;
max-width: calc(100% - 2rem);
transform: translateX(-1rem);
box-shadow: 1rem 1rem rgba(0, 0, 0, 0.1), 2rem 2rem rgba(0, 0, 0, 0.1);
}
.hero-banner img {
width: 100%;
margin: auto;
display: block;
}

0 comments on commit 8dc55d4

Please sign in to comment.