diff --git a/README.md b/README.md index 2ccfa8a..cfb5f00 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ A fully local, open-source multi-board emulator. Write Arduino C++ or Python, co **19 boards · 5 CPU architectures**: AVR8 (ATmega / ATtiny), ARM Cortex-M0+ (RP2040), RISC-V RV32IMC/EC (ESP32-C3 / CH32V003), Xtensa LX6/LX7 (ESP32 / ESP32-S3 via QEMU), and ARM Cortex-A53 (Raspberry Pi 3 Linux via QEMU). + [](https://velxio.dev) [](https://github.com/davidmonterocrespo24/velxio/pkgs/container/velxio) [](https://github.com/davidmonterocrespo24/velxio/stargazers) diff --git a/frontend/nginx.conf b/frontend/nginx.conf index b522fd3..7efaa01 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -18,9 +18,24 @@ server { proxy_set_header X-Forwarded-Proto $scheme; } - # Cache static assets - location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { + # Cache JS/CSS/fonts + location ~* \.(js|css|woff|woff2|ttf|eot)$ { expires 1y; add_header Cache-Control "public, immutable"; } + + # Serve WebP automatically when browser supports it + location = /image.png { + expires 30d; + add_header Cache-Control "public"; + add_header Vary Accept; + if ($http_accept ~* "webp") { + rewrite ^ /image.webp break; + } + } + + location ~* \.(png|jpg|jpeg|gif|ico|svg|webp)$ { + expires 30d; + add_header Cache-Control "public"; + } } diff --git a/frontend/public/image.png b/frontend/public/image.png index e3ded59..888b2e1 100644 Binary files a/frontend/public/image.png and b/frontend/public/image.png differ diff --git a/frontend/public/image.webp b/frontend/public/image.webp new file mode 100644 index 0000000..acda56d Binary files /dev/null and b/frontend/public/image.webp differ diff --git a/frontend/src/pages/LandingPage.tsx b/frontend/src/pages/LandingPage.tsx index be07a3e..e69b86e 100644 --- a/frontend/src/pages/LandingPage.tsx +++ b/frontend/src/pages/LandingPage.tsx @@ -509,7 +509,10 @@ export const LandingPage: React.FC = () => {
+
+