Skip to content

Commit

Permalink
Merge branch 'midudev:main' into feature/fix-video-playing-error
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroSuero authored May 16, 2024
2 parents 9ca5bfc + e524111 commit d49f001
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 14 deletions.
16 changes: 15 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
npx lint-staged
#!/bin/bash

# Verificar el sistema operativo
if [ "$OSTYPE" = "msys" ] || [ "$OSTYPE" = "win32" ]; then
# Si es Windows, ejecutar npx.cmd lint-staged
npx.cmd lint-staged
else
# Si no es Windows, intentar ejecutar npx lint-staged
if command -v npx 2> /dev/null; then
npx lint-staged
else
echo "El comando 'npx' no está disponible. Por favor, instale 'npx' para continuar."
exit 1
fi
fi
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
"lint:fix": "eslint --ext .astro,.ts,.js,.tsx . --fix",
"format": "prettier --write src",
"format:check": "prettier --check src",
"prepare": "husky"
"prepare": "husky install && bash -c 'chmod ug+x .husky/*'"
},
"dependencies": {
"@astrojs/db": "0.11.1",
"@astrojs/db": "0.11.2",
"@auth/core": "0.18.6",
"@fontsource-variable/jost": "5.0.19",
"@vercel/analytics": "1.2.2",
"astro": "4.8.3",
"astro": "4.8.4",
"auth-astro": "4.1.1",
"valibot": "0.30.0"
},
Expand All @@ -35,7 +35,7 @@
"@typescript-eslint/parser": "7.9.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-astro": "0.34.0",
"eslint-plugin-astro": "1.2.0",
"eslint-plugin-jsx-a11y": "6.8.0",
"husky": "9.0.11",
"lightningcss": "1.24.1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/BoxerBigImage.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const { name, country, countryName, id, loading } = Astro.props
---

<picture
class:list={"boxer-photo aspect-[285/428] h-auto w-full max-w-[460px]"}
class:list={"boxer-photo -z-20 aspect-[285/428] h-auto w-full max-w-[460px]"}
transition:name="boxer-big-image"
>
<img
Expand Down
2 changes: 1 addition & 1 deletion src/components/BoxerDetailInfoRival.astro
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const isVersus = value[0].versus.length === 2
<a
class:list={[
`${isVersus ? "mx-2 p-1" : ""}`,
`${isKingOfTheTrack ? "p-1" : "boxer-link text-xl font-bold text-accent"}`,
`${isKingOfTheTrack ? "p-1" : "boxer-link z-20 text-xl font-bold text-accent"}`,
]}
href={`/boxers/${item.id}`}
title={`Visita la página ${item.gender === "masculino" ? "del boxeador" : "de la boxeadora"} ${item.name}`}
Expand Down
6 changes: 4 additions & 2 deletions src/components/Pronosticos/Vote.astro
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ votes.forEach((vote) => {
<div class="flex items-center justify-center gap-4">
<img class="size-12 rounded-full" src={user.image} alt={`Avatar del usuario ${user.name}`} />
<div class="flex flex-col justify-center">
<h4 class="text-lg font-bold">{user.name}</h4>
<button id="logout" class="text-sm font-light text-yellow-300">Cerrar sesión</button>
<h4 class="-mb-1 text-lg font-bold">{user.name}</h4>
<button id="logout" class="text-sm font-light text-accent hover:underline"
>Cerrar sesión</button
>
</div>
</div>

Expand Down
6 changes: 6 additions & 0 deletions src/consts/combats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,29 @@ export const COMBATS: Combat[] = [
number: 1,
boxers: ["carreraaa", "agustin-51"],
titleSize: [1920, 1012],
title: "Agustin 51 vs Carreraaa",
},
{
id: "2-guanyar-vs-la-cobra",
number: 2,
boxers: ["guanyar", "la-cobra"],
titleSize: [1920, 927],
title: "Guanyar vs La Cobra",
},
{
id: "3-zeling-y-nissaxter-vs-alana-y-ama-blitz",
number: 3,
boxers: ["zeling", "nissaxter", "alana", "ama-blitz"],
teams: ["zeling-nissaxter", "alana-ama-blitz"],
titleSize: [1525, 1525],
title: "Zeling y Nissaxter vs Alana y Ama Blitz",
},
{
id: "4-viruzz-vs-shelao",
number: 4,
boxers: ["viruzz", "shelao"],
titleSize: [1623, 1077],
title: "Viruzz vs Shelao",
},
{
id: REY_DE_LA_PISTA_ID,
Expand All @@ -43,11 +47,13 @@ export const COMBATS: Combat[] = [
"will",
],
titleSize: [1185, 1139],
title: "Rey de la Pista",
},
{
id: "6-el-mariana-vs-plex",
number: 6,
boxers: ["plex", "el-mariana"],
titleSize: [1920, 950],
title: "El Mariana vs Plex",
},
]
2 changes: 1 addition & 1 deletion src/pages/combates/[id].astro
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const prerender = true
---

<Layout
title={`Combate #${combatData.number} - La Velada del Año IV`}
title={`${combatData.titleCombate #${combatData.number} de La Velada del Año IV`}
description={`Combate entre ${formattedBoxerNames} en La Velada del Año IV`}
image={`https://cdn.lavelada.dev/matches/og-${id}-min.jpg`}
>
Expand Down
5 changes: 1 addition & 4 deletions src/sections/CombatFeatures.astro
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,12 @@ const middleIndex = boxers.length / 2
color="neutral"
class:list={"mx-auto mt-4 text-wrap text-center"}
>
Datos relevantes de cada contrincante
Datos relevantes de los boxeadores
</Typography>
<table class="mt-10 w-full text-center text-white lg:text-lg">
<tbody>
{
relevantBoxerData.map(([key, { label, concat }]) => {
// no mostrar el peso hasta el pesaje oficial
if (key === "weight") return null

return (
<tr class="mb-10 bg-gradient-to-b from-black/0 via-transparent/40 to-transparent/40 p-4">
{boxers.map((boxer, index) => {
Expand Down
1 change: 1 addition & 0 deletions src/types/Combat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export interface Combat {
boxers: string[] // es un string porque hace referencia a los ids de los boxeadores
teams?: string[]
titleSize: [number, number]
title: string
}

0 comments on commit d49f001

Please sign in to comment.