Skip to content

Commit

Permalink
Merge pull request #92 from fedecarboni7/feature-ai-formaciones
Browse files Browse the repository at this point in the history
Feature ai formaciones
  • Loading branch information
fedecarboni7 authored Oct 15, 2024
2 parents 9af9838 + c63c04e commit 0153bb2
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 562 deletions.
127 changes: 0 additions & 127 deletions app/utils/parse_formations.py

This file was deleted.

1 change: 1 addition & 0 deletions proyect_structure.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Listado de rutas de carpetas
| index.html
| landing-page.html
| login.html
| results.html
| signup.html
|
+---tests
Expand Down
7 changes: 7 additions & 0 deletions static/css/styles-v1.0.3.css
Original file line number Diff line number Diff line change
Expand Up @@ -558,3 +558,10 @@ tr:last-child {
.popup-content {
position: relative;
}

/* Ajustar el tamaño de las flechas del Swiper */
.swiper-button-prev, .swiper-button-next {
--swiper-navigation-size: 30px;
--swiper-navigation-sides-offset: 2px;
--swiper-navigation-color: #e0e0e0b5;
}
40 changes: 26 additions & 14 deletions static/js/script-v1.0.6.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function validateForm(event) {
if (nameInput) {
let playerName = nameInput.value.trim();
if (names.has(playerName)) {
alert('Los nombres de los jugadores deben ser distintos. Nombre duplicado: ' + playerName);
alert('Los nombres de los jugadores deben ser distintos. Nombre repetido: ' + playerName);
event.preventDefault();
return false;
}
Expand Down Expand Up @@ -199,6 +199,17 @@ function validateForm(event) {
document.querySelector('#teams-container').innerHTML = data.html;
playerDataDict = data.player_data_dict;
teams = data.teams;

// Hacer que los inputs se vuelvan readonly
document.querySelectorAll('input[name="names"]').forEach(input => {
input.readOnly = true;
});

// Hacer scroll hasta el div de los resultados
const resultsContainer = document.querySelector('#teams-container');
if (resultsContainer) {
resultsContainer.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
})
.catch(error => {
alert('Hubo un error al enviar los datos.');
Expand Down Expand Up @@ -894,15 +905,23 @@ function createBarChart(contentContainer) {
datasets: [{
label: 'Equipo 1',
data: team1Data,
backgroundColor: 'rgba(54, 162, 235, 0.5)', // Azul
backgroundColor: 'rgba(54, 162, 235, 0.2)', // Azul
borderColor: 'rgb(54, 162, 235)',
borderWidth: 1
borderWidth: 3,
pointBackgroundColor: 'rgb(54, 162, 235)',
pointBorderColor: '#fff',
pointHoverBackgroundColor: '#fff',
pointHoverBorderColor: 'rgb(54, 162, 235)'
}, {
label: 'Equipo 2',
data: team2Data,
backgroundColor: 'rgba(255, 99, 132, 0.5)', // Rojo
backgroundColor: 'rgba(255, 99, 132, 0.2)', // Rojo
borderColor: 'rgb(255, 99, 132)',
borderWidth: 1
borderWidth: 3,
pointBackgroundColor: 'rgb(255, 99, 132)',
pointBorderColor: '#fff',
pointHoverBackgroundColor: '#fff',
pointHoverBorderColor: 'rgb(255, 99, 132)'
}]
},
options: {
Expand All @@ -913,7 +932,7 @@ function createBarChart(contentContainer) {
x: {
beginAtZero: true,
grid: {
color: 'rgba(255, 255, 255, 0.2)',
color: 'rgba(255, 255, 255, 0.4)',
lineWidth: 1
},
ticks: {
Expand All @@ -928,6 +947,7 @@ function createBarChart(contentContainer) {
color: '#e0e0e0',
font: {
size: 14,
weight: 500,
family:'Segoe UI'
}
}
Expand All @@ -944,14 +964,6 @@ function createBarChart(contentContainer) {
}
}
}
},
layout: {
padding: {
left: 20,
right: 20,
top: 20,
bottom: 20
}
}
}
});
Expand Down
4 changes: 2 additions & 2 deletions templates/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ <h2>Equipo 2</h2>
</div>
</div>
<div class="swiper-slide">
<div class="bar-chart-container">
<div class="chart-container">
<canvas></canvas>
</div>
</div>
<div class="swiper-slide">
<div class="chart-container">
<div class="bar-chart-container">
<canvas></canvas>
</div>
</div>
Expand Down
Loading

0 comments on commit 0153bb2

Please sign in to comment.