Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
547a2e3
Creacion del readme con Objetivo Definicion de usuario y Prototipo de…
ivongarduno Jun 28, 2019
5b5a207
Merge pull request #1 from BLANK-TECH/ivon
TaniaTenorio Jun 28, 2019
b7dfe87
se corrigió la ruta de las imágenes
TaniaTenorio Jun 28, 2019
4a494d7
Merge pull request #2 from TaniaTenorio/Tania
TaniaTenorio Jun 28, 2019
60eb606
coreeción de la ruta de una imagen de la seccion Prototipado
TaniaTenorio Jun 28, 2019
1368eb3
Merge pull request #3 from TaniaTenorio/Tania
TaniaTenorio Jun 28, 2019
ccd902a
correción de la ruta de las imagenes en la sección de Prototipado
TaniaTenorio Jun 28, 2019
cf4d103
Merge pull request #4 from TaniaTenorio/Tania
TaniaTenorio Jun 28, 2019
9415687
se agrega codigo para mostrar la data y estilos en la pagina principal
ivongarduno Jul 1, 2019
887d082
Merge pull request #5 from BLANK-TECH/ivon
TaniaTenorio Jul 1, 2019
789d564
se pasa codigo al main.js y scroll a la seccion1
ivongarduno Jul 2, 2019
9051a3c
Merge pull request #6 from BLANK-TECH/ivon
TaniaTenorio Jul 2, 2019
b02449d
se agrega funcion para busqueda por nombre de pokemon
ivongarduno Jul 2, 2019
936b821
Merge pull request #7 from BLANK-TECH/ivon
TaniaTenorio Jul 2, 2019
863f2a8
se creó función de ordenar en data.js Se agregaron los elementos de b…
TaniaTenorio Jul 2, 2019
a2c91d2
Merge pull request #8 from TaniaTenorio/Tania
TaniaTenorio Jul 2, 2019
d2dfb84
se modificó funcion de ordenar, para incluir ordenar por numero desce…
TaniaTenorio Jul 2, 2019
814c76d
Merge pull request #9 from TaniaTenorio/Tania
TaniaTenorio Jul 2, 2019
0a07b05
intentando bajar los cambios que hicimos ayer
ivongarduno Jul 3, 2019
0a5a9f1
Merge branch 'master' of https://github.com/TaniaTenorio/MEX-Data-Lov…
ivongarduno Jul 3, 2019
f5bc49c
se implementa funcion que permite guardar el tipo con el evento click…
ivongarduno Jul 4, 2019
96dde43
Merge pull request #10 from BLANK-TECH/ivon
TaniaTenorio Jul 4, 2019
84a8b56
se dio estilo grid al css, se renombraron secciones en html, se creó …
TaniaTenorio Jul 4, 2019
6f0a33b
Merge pull request #11 from TaniaTenorio/Tania
TaniaTenorio Jul 4, 2019
413ef66
Ya funciona Filtrar por tipos y agregamos eventos que muestran y ocul…
ivongarduno Jul 5, 2019
470da05
Merge pull request #12 from BLANK-TECH/ivon
TaniaTenorio Jul 5, 2019
fcdaf49
se muestra pantalla de orden ascen y descen, se elimina header y se m…
ivongarduno Jul 5, 2019
dde21ef
se actualizó el readme para final del segundo sprint
TaniaTenorio Jul 5, 2019
e25c163
se añadió la imagen con la captura de pantalla de la pagina de bienve…
TaniaTenorio Jul 5, 2019
4d773b4
Merge pull request #13 from TaniaTenorio/Tania
TaniaTenorio Jul 5, 2019
6a3172a
Merge pull request #14 from BLANK-TECH/ivon
TaniaTenorio Jul 5, 2019
5a53a6d
se corrigió la funcion de ordenar en la opcion de la Z-A
TaniaTenorio Jul 5, 2019
827a25d
Merge pull request #15 from TaniaTenorio/Tania
TaniaTenorio Jul 5, 2019
82241c8
Se arregla funcion que ordena, se agrega funcion que filtra por debil…
ivongarduno Jul 8, 2019
1b2be77
Merge branch 'master' into ivon
TaniaTenorio Jul 8, 2019
6d33c7c
Merge pull request #16 from BLANK-TECH/ivon
TaniaTenorio Jul 8, 2019
be8606a
se agrega funcion de estadisticas y se corrige la funcion que imprime…
ivongarduno Jul 8, 2019
1aa395b
se agrega funcion de estadisticas, aun no corre el metodo reduce
ivongarduno Jul 9, 2019
01ed461
Merge pull request #17 from BLANK-TECH/ivon
TaniaTenorio Jul 9, 2019
c4a7331
se actualizaron los archivos data.js, index.html, main.js y style.css…
TaniaTenorio Jul 9, 2019
26283fd
Merge pull request #18 from TaniaTenorio/Tania
TaniaTenorio Jul 9, 2019
a0b10ea
se corrigieron las rutas de las imágenes en los archivos index.html y…
TaniaTenorio Jul 9, 2019
1d7a219
Merge pull request #19 from TaniaTenorio/Tania
TaniaTenorio Jul 9, 2019
9114ef0
se arregla funcion que calcula estadisticas
ivongarduno Jul 9, 2019
902f802
se hace merge con los cambios en la interfaz que subio Tania
ivongarduno Jul 9, 2019
8767b71
se agregan los elementos a la pantalla curiosidades y se separa funci…
ivongarduno Jul 10, 2019
8630ed0
Merge pull request #20 from BLANK-TECH/ivon
TaniaTenorio Jul 10, 2019
fded8bf
se modificó el archivo en la línea 10 para indicarle que usamos POKEM…
TaniaTenorio Jul 10, 2019
26ad184
se crearon funciones para probar las funciones del main.js
TaniaTenorio Jul 10, 2019
868ae4e
se modificó el modo de llamar a las funciones puras: window.pokemon.f…
TaniaTenorio Jul 10, 2019
e846045
se convirtió el archivo en un objeto de funciones
TaniaTenorio Jul 10, 2019
bd7eae0
se añadieron media queries para smartphone y tablet en el archivo sty…
TaniaTenorio Jul 10, 2019
80ac07c
Merge branch 'master' into Tania
TaniaTenorio Jul 10, 2019
2b7d104
Merge pull request #22 from TaniaTenorio/Tania
TaniaTenorio Jul 10, 2019
387870a
se agrego el coverage al jest
TaniaTenorio Jul 11, 2019
90a961d
se agregó el evento de desaparecer el boton de regresar y aparecer el…
TaniaTenorio Jul 11, 2019
42c235d
se corrigio el cierre de una etiqueta h3 en la seccion de preguntas c…
TaniaTenorio Jul 11, 2019
87d52e5
se corrigió la sintaxis de la funcion de estádisticas, para que fuera…
TaniaTenorio Jul 11, 2019
52ebf1b
se corrigió el archivo para que fuera responsive
TaniaTenorio Jul 11, 2019
bbeced6
Merge pull request #23 from TaniaTenorio/Tania
TaniaTenorio Jul 11, 2019
e8d39ec
se agregaron algunos ; que faltaban y otros errores de sintaxis
TaniaTenorio Jul 12, 2019
6015834
se crearon los tests para las funciones puras
TaniaTenorio Jul 12, 2019
eda7c60
Merge pull request #24 from TaniaTenorio/Tania
TaniaTenorio Jul 12, 2019
a4844f7
ya imprime la estadistica % de pokemon por tipo y por debilidad
ivongarduno Jul 12, 2019
fef0c87
se corrigen los ID de la busqueda por debilidades y la funcion para a…
ivongarduno Jul 13, 2019
08a2c37
Merge branch 'master' into ivon
ivongarduno Jul 13, 2019
dd5fad1
Merge pull request #25 from BLANK-TECH/ivon
TaniaTenorio Jul 13, 2019
8d9173d
se corrigieron los errores arrojados durante npm run test. solo fuero…
TaniaTenorio Jul 13, 2019
ffff2db
se corrigió el tamaño del input type de la pantalla buscar
TaniaTenorio Jul 13, 2019
4eabac1
se corrigió la sintaxis de las pruebas
TaniaTenorio Jul 13, 2019
d097a6b
Se corriegieron los tests y ya pasan las funciones de ordenar y filta…
TaniaTenorio Jul 13, 2019
a439db0
Merge pull request #26 from TaniaTenorio/Tania
TaniaTenorio Jul 13, 2019
11a7a3f
V2
ivongarduno Jul 13, 2019
6694ea0
V3
ivongarduno Jul 13, 2019
0590b45
se agrego Math.floor a la funcion que calcula el promedio de candy count
TaniaTenorio Jul 13, 2019
f6ec6aa
se agregó el testa para la función estadística, falta completarla
TaniaTenorio Jul 13, 2019
93f39ac
Merge pull request #27 from TaniaTenorio/Tania
TaniaTenorio Jul 13, 2019
1099572
V3
ivongarduno Jul 13, 2019
68ce7f7
Merge remote-tracking branch 'upstream/master' into ivon
ivongarduno Jul 13, 2019
29c311c
se realizaron cambios para ajustar el estilo a responsive
TaniaTenorio Jul 15, 2019
f5d34a5
Merge pull request #28 from TaniaTenorio/Tania
TaniaTenorio Jul 15, 2019
1acf31f
se añadió estilo al botón de estadística en las pantallas de resultad…
TaniaTenorio Jul 15, 2019
78e70e4
se añadió estilo a la pantalla de estadisticas
TaniaTenorio Jul 15, 2019
6ba8046
Merge pull request #29 from TaniaTenorio/Tania
TaniaTenorio Jul 15, 2019
1e24765
se agrega codigo para las graficas de Google Charts, corren cada vez …
ivongarduno Jul 15, 2019
22f2307
se arregla funcion de busqueda por nombre y se arreglan los estilos d…
ivongarduno Jul 15, 2019
18481a3
Merge pull request #30 from BLANK-TECH/ivon
TaniaTenorio Jul 15, 2019
b6ccb89
cambios antes del demo
TaniaTenorio Jul 15, 2019
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
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"extends": "eslint:recommended",
"globals": {
"example": false
"POKEMON": false
},
"rules": {
"no-console": 0,
Expand Down
459 changes: 87 additions & 372 deletions README.md

Large diffs are not rendered by default.

5,584 changes: 5,584 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"htmlhint": "htmlhint src/*.html test/*.html",
"eslint": "eslint --ext .js src/ test/",
"pretest": "npm run eslint --silent && npm run htmlhint --silent",
"test": "jest"
"test": "jest --coverage"
},
"dependencies": {
"eslint": "^5.9.0",
Expand Down
Binary file added src/Imagenes/App.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Caracteristicas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Edad-app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Edad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Genero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Interfaz-pokéxpert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Pantalla-ayuda.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Pantalla-buscar.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Pokebola2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Pokedex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Pokemon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Producto-final.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Tipos/TipoAcero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Tipos/TipoAgua.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Tipos/TipoDragon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Tipos/TipoElectrico.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Tipos/TipoFantasma.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Tipos/TipoHada.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Tipos/TipoHielo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Tipos/TipoInsecto.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Tipos/TipoNormal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Tipos/TipoPelea.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Tipos/TipoPlanta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Tipos/TipoPsiquico.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Tipos/TipoRoca.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imagenes/Tipos/TipoSiniestro.png
Binary file added src/Imagenes/Tipos/TipoTierra.png
Binary file added src/Imagenes/Tipos/TipoVeneno.png
Binary file added src/Imagenes/Tipos/TipoVolador.png
Binary file added src/Imagenes/Tipos/tipoFuego.png
Binary file added src/Imagenes/apps-maestros.png
Binary file added src/Imagenes/buscar-por-nombre.jpg
Binary file added src/Imagenes/candy.png
Binary file added src/Imagenes/curiosidades.png
Binary file added src/Imagenes/fondobase.jpg
Binary file added src/Imagenes/pantalla-base.gif
Binary file added src/Imagenes/pokebola.png
Binary file added src/Imagenes/pokexpert.png
71 changes: 69 additions & 2 deletions src/data.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,75 @@
// esta es una función de ejemplo
// puedes ver como agregamos la función a nuestro objeto global window

const example = () => {
/*const example = () => {
return 'example';
};

window.example = example;
window.example = example;*/
window.pokemon = {

// FUNCION QUE ORDENA
ordenar : (data,propiedad,orden) => {
let resultado = {};
if(orden === "ascendente" || orden === "numAscendente") {
resultado = data.sort((a,b) => (a[propiedad] > b[propiedad] ? 1 : -1));
}
else if(orden === "descendente" || orden === "numDescendente") {
resultado = data.sort ((a,b) => (a[propiedad] > b[propiedad] ? -1 : 1));
}
return resultado;
},

//Funcion que filtra por tipo
filterByType : (data,condicion) => {
let filtro = data.filter(pokemon => {
for( let i = 0; i < pokemon.type.length; i++){
if (pokemon.type[i] === condicion){
return true;
}
}
return false;
});
return filtro;
},

//Funcion que filtra por debilidad

filterByWeaknesses : (data,condicion) => {
let filtro = data.filter(pokemon => {
return pokemon.weaknesses.find((arr) => arr === condicion);
});
return filtro;
},


//Funcion datos curiosos
estadistica : (data,propiedad) => {
//el mas pesado y el mas alto
if(propiedad === "weight" || propiedad === "height"){
let result = data.sort((a,b) => (a[propiedad] > b[propiedad] ? -1 : 1));
let primero = result.shift();
return (primero);
}
//promedio de candy_count para evolucionar
else if(propiedad === "candy_count"){
let result = data.reduce((total,item)=>{
if (data.hasOwnProperty(item.candy_count)){
return total + item.candy_count;
}
return total + 0;
},0);
//console.log(result);
//console.log(data.length);
result = Math.floor(result/data.length);
//console.log(result);
return result;
}
}
};


// window.ordenar= ordenar;
// window.filterByType = filterByType;
// window.filterByWeaknesses = filterByWeaknesses;
// window.estadistica = estadistica;
Loading