fix: update hero image URL and improve preload for styles and fonts
This commit is contained in:
+4
-1
@@ -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}')`);
|
||||
}
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user