File tree 2 files changed +15
-1
lines changed
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1
1
import InfoBox from "@/components/InfoBox" ;
2
+ import ExportedImage from "next-image-export-optimizer" ;
2
3
3
4
export default function Home ( ) {
4
5
return (
5
6
< >
6
7
< div className = "home-hero" >
8
+ < ExportedImage
9
+ className = "home-hero-image"
10
+ src = "/home-hero.jpg"
11
+ alt = "Hero image"
12
+ fill = { true }
13
+ />
7
14
< h1 > Welcome to my website!</ h1 >
8
15
< div className = "subtitle" > Recipes, projects & more </ div >
9
16
</ div >
Original file line number Diff line number Diff line change 2
2
@use " sass:map" ;
3
3
4
4
.home-hero {
5
- background-image : url (/ home-hero.jpg );
6
5
background-color : rgba (0 , 0 , 0 , 0.5 );
7
6
background-blend-mode : overlay ;
8
7
background-size : cover ;
9
8
background-position : center ;
10
9
padding : 0.5em ;
11
10
height : 90vh ;
12
11
12
+ position : relative ;
13
+
13
14
display : flex ;
14
15
flex-direction : column ;
15
16
justify-content : center ;
16
17
align-items : center ;
17
18
19
+ .home-hero-image {
20
+ object-fit : cover ;
21
+ pointer-events : none ;
22
+ z-index : -1 ;
23
+ }
24
+
18
25
h1 {
19
26
font-family : $font-black ;
20
27
font-size : 3rem ;
You can’t perform that action at this time.
0 commit comments