Commit da6b740 1 parent 6f0a7e6 commit da6b740 Copy full SHA for da6b740
File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
---
2
+ import { getImage } from " astro:assets" ;
2
3
import Layout from ' ../layouts/Layout.astro' ;
4
+ import stars from " ../assets/jupiterjak/stars.png" ;
3
5
import jupiter from " ../assets/jupiterjak/jupiter.png" ;
6
+ const starsImage = await getImage ({src: stars , format: ' avif' })
7
+ const jupiterImage = await getImage ({src: jupiter , format: ' avif' })
8
+
4
9
---
5
10
6
11
<Layout >
7
- <div class =" bg" >
8
- <div class =" image" ></div >
12
+ <div class =" bg" style = { ` background-image: url(${ starsImage . src }); ` } >
13
+ <div class =" image" style = { ` background-image: url(${ jupiterImage . src }); ` } ></div >
9
14
</div >
10
15
</Layout >
11
16
@@ -14,10 +19,9 @@ import jupiter from "../assets/jupiterjak/jupiter.png";
14
19
display: flex;
15
20
justify-content: center;
16
21
width: 100%;
17
- background: #231f20 url('../assets/jupiterjak/stars.png') ;
22
+ background-color : #231f20;
18
23
}
19
24
.image {
20
- background-image: url('../assets/jupiterjak/jupiter.png');
21
25
background-repeat: no-repeat;
22
26
width: 100%;
23
27
height: 100%;
You can’t perform that action at this time.
0 commit comments