fix: update hero image URL and improve preload for styles and fonts

This commit is contained in:
Lago
2026-05-09 23:48:47 +02:00
parent aca60696ae
commit b4258edb91
3 changed files with 12 additions and 7 deletions
+4 -1
View File
@@ -543,6 +543,9 @@ loadVehicles();
(async () => {
const { data } = await supabase.from("site_settings").select("value").eq("key", "hero_image_url").single();
if (data && data.value) {
document.querySelector(".hero").style.setProperty("--hero-bg", `url('${data.value}')`);
const heroUrl = data.value.includes("/images/ferrari-main-car.png")
? "/images/ferrari-main-car-mobile.jpg"
: data.value;
document.querySelector(".hero").style.setProperty("--hero-bg", `url('${heroUrl}')`);
}
})();