Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minifix: Actualizar link de ver perfil en el <a> de ver perfil del article #499

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/sections/SelectYourBoxer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const listOfBoxers = BOXERS.map((boxer) => {
<p id="boxer-weight" class="text-lg font-bold">87kg</p>
<a
href="#"
class="mt-10 inline-block font-semibold text-accent transition-transform hover:scale-110"
class="boxer-profile mt-10 inline-block font-semibold text-accent transition-transform hover:scale-110"
>
Ver perfil
</a>
Expand Down Expand Up @@ -134,6 +134,7 @@ const listOfBoxers = BOXERS.map((boxer) => {
const boxerTitle = document.querySelector(".boxer-title") as HTMLImageElement
const boxerPhoto = document.querySelector(".boxer-photo") as HTMLPictureElement
const boxerCountry = document.querySelector(".boxer-flag") as HTMLImageElement
const boxerProfile = document.querySelector(".boxer-profile") as HTMLAnchorElement
const boxerFooter = document.getElementById("boxer-footer") as HTMLElement
const boxerCountryElement = document.getElementById("boxer-country") as HTMLElement
const boxerWeightElement = document.getElementById("boxer-weight") as HTMLElement
Expand All @@ -155,7 +156,7 @@ const listOfBoxers = BOXERS.map((boxer) => {
boxerPhoto.getElementsByTagName("img")[0].src = `${boxerSrc}.webp`
boxerTitle.innerText = name?.toLocaleLowerCase() ?? ""
boxerCountry.src = `/img/flags/${country}.webp`

boxerProfile.href = `/boxers/${id}`
boxerPhoto.getElementsByTagName("img")[0].alt = `Fotografía de ${name}`
boxerCountry.alt = `Bandera de ${countryName}`

Expand Down
Loading