diff --git a/.husky/pre-commit b/.husky/pre-commit old mode 100644 new mode 100755 diff --git a/package.json b/package.json index e528998f9..fc16b274d 100644 --- a/package.json +++ b/package.json @@ -16,17 +16,17 @@ "prepare": "husky install && bash -c 'chmod ug+x .husky/*'" }, "dependencies": { - "@astrojs/db": "0.11.2", + "@astrojs/db": "0.11.3", "@auth/core": "0.18.6", "@fontsource-variable/jost": "5.0.19", "@vercel/analytics": "1.2.2", - "astro": "4.8.4", + "astro": "4.8.6", "auth-astro": "4.1.1", "valibot": "0.30.0" }, "devDependencies": { "@antfu/eslint-config": "0.43.1", - "@astrojs/check": "0.6.0", + "@astrojs/check": "0.7.0", "@astrojs/sitemap": "3.1.4", "@astrojs/tailwind": "5.1.0", "@astrojs/vercel": "7.6.0", @@ -38,7 +38,7 @@ "eslint-plugin-astro": "1.2.0", "eslint-plugin-jsx-a11y": "6.8.0", "husky": "9.0.11", - "lightningcss": "1.24.1", + "lightningcss": "1.25.0", "lint-staged": "15.2.2", "postcss-import": "16.1.0", "postcss-nesting": "12.1.4", diff --git a/src/components/ClipsModal.astro b/src/components/ClipsModal.astro index 3f1be351d..02875b61f 100644 --- a/src/components/ClipsModal.astro +++ b/src/components/ClipsModal.astro @@ -63,15 +63,27 @@ const $clipContainer = $$(".clip-container") const $clipDialog = $(".clip-dialog") as HTMLDialogElement const $closeButton = $(".close-dialog") - const $ytFrame = $(".yt-iframe") + let $ytFrame = $(".yt-iframe") + const ytFrameCopy = $ytFrame if (!$clipDialog) return $clipDialog.addEventListener("close", () => { - $ytFrame?.setAttribute("src", "") + if ($ytFrame !== null) { + $ytFrame.setAttribute("src", "") + } else { + ytFrameCopy?.setAttribute("src", "") + } }) - $closeButton?.addEventListener("click", () => $clipDialog.close()) + $closeButton?.addEventListener("click", () => { + $clipDialog.close() + if ($ytFrame !== null) { + $ytFrame.remove() + } else { + ytFrameCopy?.remove() + } + }) $clipDialog.addEventListener("click", (event) => { const target = event.target as HTMLElement @@ -83,7 +95,15 @@ const currentTarget = event.currentTarget as HTMLElement const { url } = currentTarget.dataset if (!url) return - $ytFrame?.setAttribute("src", `${url}&autoplay=1`) + $ytFrame = $(".yt-iframe") as HTMLIFrameElement + if ($ytFrame !== null) { + $ytFrame.setAttribute("src", `${url}&autoplay=1`) + } else { + if (ytFrameCopy) { + $clipDialog?.querySelector("div")?.prepend(ytFrameCopy) + ytFrameCopy.setAttribute("src", `${url}&autoplay=1`) + } + } $clipDialog.showModal() }) }) diff --git a/src/components/Combates/BackgroundVideo.astro b/src/components/Combates/BackgroundVideo.astro index d652b99f9..5fe2edacc 100644 --- a/src/components/Combates/BackgroundVideo.astro +++ b/src/components/Combates/BackgroundVideo.astro @@ -4,29 +4,28 @@ interface Props { } const { id } = Astro.props + +const url = `https://cdn.lavelada.dev/${id}-corto.mp4` ---
- diff --git a/src/components/Header.astro b/src/components/Header.astro index c1d584edd..749f60bd8 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -16,9 +16,8 @@ const pages = [ { name: "Combates", href: "/combates", active: normalizedPathName.startsWith("/combates") }, { name: "Pronósticos", href: "/pronosticos" }, { - name: "Entradas", - href: "https://www.entradas.com/artist/la-velada-del-ano/?affiliate=LVL", - soonDate: "¡Agotadas!", + name: "Tienda", + href: "https://lavelada.store/", disabled: true, target: "_blank", }, @@ -33,7 +32,7 @@ const isCombatIntern = normalizedPathName.startsWith("/combates/")