Spaces:
Running
Running
thibaud frere
commited on
Commit
·
d8d4124
1
Parent(s):
ec58330
feat(images): switch to astro:assets responsive Image for banner
Browse files- app/astro.config.mjs +2 -1
- app/src/pages/index.astro +2 -1
app/astro.config.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
import { defineConfig } from 'astro/config';
|
| 2 |
|
| 3 |
export default defineConfig({
|
| 4 |
-
output: 'static'
|
|
|
|
| 5 |
});
|
| 6 |
|
| 7 |
|
|
|
|
| 1 |
import { defineConfig } from 'astro/config';
|
| 2 |
|
| 3 |
export default defineConfig({
|
| 4 |
+
output: 'static',
|
| 5 |
+
integrations: []
|
| 6 |
});
|
| 7 |
|
| 8 |
|
app/src/pages/index.astro
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
import banner from "../assets/images/banner.png";
|
| 3 |
const title = 'Hello Astro on HF Spaces';
|
| 4 |
---
|
|
@@ -13,7 +14,7 @@ const title = 'Hello Astro on HF Spaces';
|
|
| 13 |
<h1 style="margin:0 0 16px;">🚀 Hello World</h1>
|
| 14 |
<p>Astro est déployé statiquement via Nginx sur le port 8080.</p>
|
| 15 |
<figure>
|
| 16 |
-
<
|
| 17 |
</figure>
|
| 18 |
</main>
|
| 19 |
</body>
|
|
|
|
| 1 |
---
|
| 2 |
+
import { Image } from 'astro:assets';
|
| 3 |
import banner from "../assets/images/banner.png";
|
| 4 |
const title = 'Hello Astro on HF Spaces';
|
| 5 |
---
|
|
|
|
| 14 |
<h1 style="margin:0 0 16px;">🚀 Hello World</h1>
|
| 15 |
<p>Astro est déployé statiquement via Nginx sur le port 8080.</p>
|
| 16 |
<figure>
|
| 17 |
+
<Image src={banner} alt="FineTasks banner" widths={[480,768,1080,1440]} formats={["avif","webp","png"]} sizes="(max-width: 768px) 100vw, 720px" loading="lazy" decoding="async" />
|
| 18 |
</figure>
|
| 19 |
</main>
|
| 20 |
</body>
|