From 4cff710f915f3f1c08443e35d2b041cc70856bc9 Mon Sep 17 00:00:00 2001 From: Sergio401 Date: Wed, 13 Mar 2024 00:21:57 -0500 Subject: [PATCH 1/4] Change CSS properties to Tailwind classes in SelectYourBoxer --- src/sections/SelectYourBoxer.astro | 43 +++++++----------------------- 1 file changed, 10 insertions(+), 33 deletions(-) diff --git a/src/sections/SelectYourBoxer.astro b/src/sections/SelectYourBoxer.astro index e5e7796c9..0df024c2d 100644 --- a/src/sections/SelectYourBoxer.astro +++ b/src/sections/SelectYourBoxer.astro @@ -151,12 +151,11 @@ const msFadeLuchador = 150 () => { const boxerSrc = `/img/boxers/${id}-big` - boxerPhoto.getElementsByTagName("source")[0].srcset = `${boxerSrc}.avif` - boxerPhoto.getElementsByTagName("img")[0].src = `${boxerSrc}.webp` + boxerPhoto.querySelector("source:first-of-type").srcset = `${boxerSrc}.avif` + boxerPhoto.querySelector("img").src = `${boxerSrc}.webp` boxerTitle.innerText = name?.toLocaleLowerCase() ?? "" boxerCountry.src = `/img/flags/${country}.webp` - - boxerPhoto.getElementsByTagName("img")[0].alt = `Fotografía de ${name}` + boxerPhoto.querySelector("img").alt = `Fotografía de ${name}` boxerCountry.alt = `Bandera de ${countryName}` }, article.getAttribute("data-transition-duration") as unknown as number @@ -170,57 +169,40 @@ const msFadeLuchador = 150