From 2a92fdf5259b033226c847be26928fbb950f34d1 Mon Sep 17 00:00:00 2001 From: GFrancV Date: Mon, 15 Jul 2024 14:13:22 +0100 Subject: [PATCH 1/3] feat: Add video URLs to combats --- src/consts/combats.ts | 6 ++++++ src/types/Combat.ts | 1 + 2 files changed, 7 insertions(+) diff --git a/src/consts/combats.ts b/src/consts/combats.ts index 342bfc658..d632a0600 100644 --- a/src/consts/combats.ts +++ b/src/consts/combats.ts @@ -8,6 +8,7 @@ export const COMBATS: Combat[] = [ boxers: ["carreraaa", "agustin-51"], titleSize: [1920, 1012], title: "Agustin 51 vs Carreraaa", + videoUrl: "https://www.youtube.com/watch?v=IPbkwObKdlU", }, { id: "2-guanyar-vs-la-cobra", @@ -15,6 +16,7 @@ export const COMBATS: Combat[] = [ boxers: ["guanyar", "la-cobra"], titleSize: [1920, 927], title: "Guanyar vs La Cobra", + videoUrl: "https://www.youtube.com/watch?v=jdchidzFY6Y", }, { id: "3-zeling-y-nissaxter-vs-alana-y-ama-blitz", @@ -23,6 +25,7 @@ export const COMBATS: Combat[] = [ teams: ["zeling-nissaxter", "alana-ama-blitz"], titleSize: [1525, 1525], title: "Zeling y Nissaxter vs Alana y Ama Blitz", + videoUrl: "https://www.youtube.com/watch?v=yF-ahJkOYyI", }, { id: "4-viruzz-vs-shelao", @@ -30,6 +33,7 @@ export const COMBATS: Combat[] = [ boxers: ["viruzz", "shelao"], titleSize: [1623, 1077], title: "Viruzz vs Shelao", + videoUrl: "https://www.youtube.com/watch?v=qW2lfuM8uH4", }, { id: REY_DE_LA_PISTA_ID, @@ -48,6 +52,7 @@ export const COMBATS: Combat[] = [ ], titleSize: [1185, 1139], title: "Rey de la Pista", + videoUrl: "https://www.youtube.com/watch?v=m8Is6KAYIZ4", }, { id: "6-el-mariana-vs-plex", @@ -55,5 +60,6 @@ export const COMBATS: Combat[] = [ boxers: ["plex", "el-mariana"], titleSize: [1920, 950], title: "El Mariana vs Plex", + videoUrl: "https://www.youtube.com/watch?v=WnryYJ0k-_0", }, ] diff --git a/src/types/Combat.ts b/src/types/Combat.ts index b2fa70ed4..f2c31a587 100644 --- a/src/types/Combat.ts +++ b/src/types/Combat.ts @@ -5,4 +5,5 @@ export interface Combat { teams?: string[] titleSize: [number, number] title: string + videoUrl: string } From 625f008f2f5ea7d4e16ab3923e5529e365706076 Mon Sep 17 00:00:00 2001 From: GFrancV Date: Mon, 15 Jul 2024 14:35:06 +0100 Subject: [PATCH 2/3] chore: Add action button to view combat video --- src/pages/combates/[id].astro | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/pages/combates/[id].astro b/src/pages/combates/[id].astro index b3cea2ade..3e3d92bb0 100644 --- a/src/pages/combates/[id].astro +++ b/src/pages/combates/[id].astro @@ -1,6 +1,7 @@ --- import { Image } from "astro:assets" +import Action from "@/components/Action.astro" import BackgroundVideo from "@/components/Combates/BackgroundVideo.astro" import { COMBATS, REY_DE_LA_PISTA_ID } from "@/consts/combats" import Layout from "@/layouts/Layout.astro" @@ -35,7 +36,7 @@ if (!combatData) { } } -const { teams, boxers } = combatData +const { teams, boxers, videoUrl } = combatData const [slug1, slug2] = teams ?? boxers const [image1, image2] = [ { alt: slug1.replaceAll("-", " "), src: createImgRoute(combatData.number, slug1) }, @@ -102,6 +103,19 @@ export const prerender = true {combatData.boxers.length <= 4 && } + +
+ + ¡Ver combate! + +
From c76b5f216aac16765c40b7affba352f9c05e5c7a Mon Sep 17 00:00:00 2001 From: GFrancV Date: Mon, 15 Jul 2024 14:59:23 +0100 Subject: [PATCH 3/3] chore: Add action button to view combat video --- src/sections/Forecasts.astro | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/src/sections/Forecasts.astro b/src/sections/Forecasts.astro index cace2631a..eec387179 100644 --- a/src/sections/Forecasts.astro +++ b/src/sections/Forecasts.astro @@ -1,5 +1,4 @@ --- -import Action from "@/components/Action.astro" import ForecastBoxer from "@/components/ForecastBoxer.astro" import Velocimetro from "@/components/Velocimetro.astro" import { BOXERS } from "@/consts/boxers" @@ -41,16 +40,6 @@ const boxers = combat?.boxers.map((boxer) => BOXERS.find((b) => b.id === boxer)) /> ))} - -
- - ¡Haz tu pronóstico! - -
} @@ -86,16 +75,6 @@ const boxers = combat?.boxers.map((boxer) => BOXERS.find((b) => b.id === boxer)) boxerHref={"/boxers/alana"} class:list={["boxer2"]} /> - -
- - ¡Haz tu pronóstico! - -
)} @@ -132,21 +111,12 @@ const boxers = combat?.boxers.map((boxer) => BOXERS.find((b) => b.id === boxer)) class:list={["boxer2"]} /> )} -
- - ¡Haz tu pronóstico! - -
) }