Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
3c966bf
primerparrafo
erika-nath Nov 13, 2019
5d01b31
se agrega parrafo
erika-nath Nov 13, 2019
a4e672a
agregar fondo
erika-nath Nov 13, 2019
d6ecb93
Insercion imagen_pokebolapoder
Nov 13, 2019
ca40750
se acomodan letras y fondo
erika-nath Nov 13, 2019
9567887
Merge pull request #1 from erika-nath/ramaErika
eugynias Nov 13, 2019
e8462d7
Merge branch 'master' of https://github.com/eugynias/GDL004-data-love…
erika-nath Nov 13, 2019
0abd9ee
Cambio de pokebola
Nov 15, 2019
0d4c01a
resuelve conflictos
Nov 15, 2019
4da4605
se agregan botones abc
erika-nath Nov 19, 2019
51b9359
cambia tam. de div
erika-nath Nov 19, 2019
1a56419
Merge pull request #2 from erika-nath/ramaErika
eugynias Nov 19, 2019
18882a6
Comienzo filter
Nov 19, 2019
90f7c3c
import y export
erika-nath Nov 20, 2019
fa11595
Filtrado con Angie,si algo sale mal regresar
erika-nath Nov 20, 2019
31e30f1
Para poder hacer merge
Nov 20, 2019
fcff1c3
Merge pull request #3 from erika-nath/ramaErika
eugynias Nov 20, 2019
96bb335
filtrado y muestra grass
erika-nath Nov 22, 2019
dc2dd51
Borrar todo
Nov 22, 2019
1e32301
Flexbox contenedor
Nov 24, 2019
da9ceb0
flex a grass
erika-nath Nov 25, 2019
73bb1fa
boton a prueba
erika-nath Nov 25, 2019
4764672
se agregan los tipos agua
erika-nath Nov 26, 2019
3697bf2
Sort
Nov 26, 2019
fee08bc
filter water
erika-nath Nov 26, 2019
c8c2527
Merge pull request #4 from erika-nath/ramaErika
eugynias Nov 26, 2019
ebfda53
Sort,filter,ocultar,mostrar
Nov 26, 2019
5818558
Merge pull request #5 from eugynias/ramaEugenia
eugynias Nov 26, 2019
422986c
Merge pull request #1 from eugynias/master
erika-nath Nov 26, 2019
748ef0f
Distribucion de botones
Nov 28, 2019
f4371c2
se hace flex en ambos divs
erika-nath Nov 28, 2019
915ac9a
Merge branch 'ramaErika' into ramaEugenia
erika-nath Nov 28, 2019
4a0d625
Merge pull request #2 from eugynias/ramaEugenia
erika-nath Nov 28, 2019
c4ad957
se quita seccion
erika-nath Nov 28, 2019
08cf85b
div cards
erika-nath Nov 29, 2019
0189383
filtroRock
Nov 29, 2019
3bd818a
Divs se bloquean al mostrar uno
erika-nath Nov 29, 2019
08f5ff4
Merge branch 'ramaErika' into ramaEugenia
eugynias Nov 29, 2019
113527b
Merge pull request #3 from eugynias/ramaEugenia
erika-nath Nov 29, 2019
5237feb
Resolver error
Nov 29, 2019
4f7f75e
Merge branch 'ramaEugenia' of https://github.com/eugynias/GDL004-data…
Nov 29, 2019
25cf8a2
Despues de primer merge ocultar
Nov 29, 2019
92dc1ab
Merge pull request #7 from erika-nath/ramaErika
eugynias Nov 29, 2019
df6ed86
css style
erika-nath Dec 2, 2019
e47ec78
Responsive
Dec 2, 2019
dff0f98
entrega
erika-nath Dec 2, 2019
49b557e
Merge branch 'ramaEugenia' into ramaErika
erika-nath Dec 2, 2019
924af09
Merge pull request #8 from erika-nath/ramaErika
eugynias Dec 2, 2019
e0d1517
Casi Listo
Dec 2, 2019
19fd10c
se agrega imagenes para readme
erika-nath Dec 2, 2019
d982a53
Merge branch 'ramaErika' of https://github.com/erika-nath/GDL004-data…
erika-nath Dec 2, 2019
d5c67a5
res conflicto
erika-nath Dec 2, 2019
20bb0fd
Merge branch 'ramaErika' into ramaEugenia
eugynias Dec 2, 2019
b149502
Readme
Dec 2, 2019
7a0c419
Merge branch 'ramaEugenia' of https://github.com/eugynias/GDL004-data…
Dec 2, 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
6 changes: 2 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ module.exports = {
es6: true,
'jest/globals': true,
},
extends: [
'airbnb-base',
],

globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
Expand All @@ -28,4 +26,4 @@ module.exports = {
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
},
};
};
473 changes: 31 additions & 442 deletions README.md

Large diffs are not rendered by default.

45 changes: 41 additions & 4 deletions src/data.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,44 @@
/* Manejo de data */

// esta es una función de ejemplo
export const filterType = (Pokemon) => {
const type = Pokemon.filter((pkm) => {
//console.log(pkm.type)
return pkm.type[0] === 'Grass' || pkm.type[1] === 'Grass'

export const example = () => {
return 'example';
});
console.log(type)
return type;
};

export const ordenName = (Pokemon) => {
const ordenNam = Pokemon.sort((pk1,pk2) => {
if(pk1.name > pk2.name){
return 1;
}else if(pk1.name < pk2.name){
return -1;
}
return 0
})
//console.log(ordenNam, 'order')
return ordenNam
//console.log(ordenNam)
};

export const filterWater = (Pokemon) => {
const type = Pokemon.filter((pkm) => {
return pkm.type[0] === 'Water' || pkm.type[1] === 'Water'


});
console.log(type)
return type;
};

export const filterRock = (Pokemon) => {
const type = Pokemon.filter((pkm) => {
return pkm.type[0] === 'Rock' || pkm.type[1] === 'Rock'


});
console.log(type)
return type;
};
3 changes: 3 additions & 0 deletions src/data/pokemon/pokemon.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

export default [{

id: 1,
num: '001',
name: 'Bulbasaur',
Expand Down Expand Up @@ -4081,4 +4083,5 @@ export default [{
'Ghost',
'Dark',
],

}];
Binary file added src/images/2363559.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/images/Capturap.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/images/IMG_20191202_080553878.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/images/International_Pokémon_logo.svg.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/images/figmapkm.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/images/finalpk.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/images/pikagif.gif
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/images/pkm-uni.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/images/pokebola.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/images/pokebola_debilidad.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/images/pokebola_poder.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/images/pokebola_poder.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/images/pokebolagrass.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/images/pokebolarock.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/images/pokebolawater.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 75 additions & 4 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,80 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="style.css" />
<link href="https://fonts.googleapis.com/css?family=Heebo&display=swap" rel="stylesheet">

</head>
<body>
<div id="root"></div>
<script type="module" src="main.js"></script>
</body>
<!-- inicia body ,no mover arriba-->

<body>

<!-- NO TOCAR-->
<script type="module" src="main.js"></script>
<div id="root">
<script src="./data/pokemon/pokemon.js" type="module"></script>
<script src="data.js" type="module"></script>
<script src="main.js" type="module"></script>

<!-- logo -->

<header id="logoPKM">
<img src="images/International_Pokémon_logo.svg.png">
</header>
<!-- gif -->
<marquee direction=right scrolldelay="5"><img src="images/pikagif.gif"></marquee>

<!-- botones -->
<div id="pokebolas">
<!-- boton grass -->
<div class="tooltip">
<span class="tooltiptext">Presiona aqui y conoce la debilidad de los pokemones tipo Grass</span>
<div id="TyperGrass" class= "TyperG">
<a id="button" ><img class= "grass" src="images/pokebolagrass.png"></a>
<div id="content1" class="contenedor1 ">

</div>
</div><!-- este div es donde se manda el map no borrar-->
</div>

<!-- boton water -->
<div class="tooltip2">
<span class="tooltiptext2">Presiona aqui y conoce la debilidad de los pokemones tipo Water</span>
<div id="TyperWater" class="TyperW">
<a id="buttonW" ><img class= "water" src="images/pokebolawater.png"></a>
<div id="content2" class="contenedor2 ">
</div>
</div>
</div>

<!-- boton rock -->
<div class="tooltip3">
<span class="tooltiptext3">Presiona aqui y conoce la debilidad de los pokemones tipo Rock</span>
<div id="TyperRock" class="TyperR">
<a id="buttonR" ><img class= "rock" src="images/pokebolarock.png"></a>
<div id="content3" class="contenedor3 ">
</div>
</div>
</div>
</div>

<!-- Pie de pagina -->

<footer>
<div class="contenedorf">
<h2><strong>Redes Sociales </strong></h2>

<a href="TU DIRECCION DE TWITTER" target="_blank" ><img src="http://2.bp.blogspot.com/-KVx3pHuLjTU/UwJJ-nmXAKI/AAAAAAAAL0A/xZOdy-WSGbE/s1600/twitter.png" /></a>

<a href="TU DIRECCION DE GOOGLE+" target="_blank"><img src="http://3.bp.blogspot.com/-PfEM3EjAsaY/UwJJwy7dKyI/AAAAAAAALz4/bSzCTvnPt70/s1600/googleplus.png" /></a>

<a href="TU DIRECCION DE FACEBOOK" target="_blank"><img src="http://3.bp.blogspot.com/-wlgJ5-sFi5Q/UwJKFJU3dsI/AAAAAAAAL0I/wMHiOkPcsMU/s1600/facebook.png" /></a>

<a href="TU DIRECCION DE FEED" target="_blank"><img src="http://3.bp.blogspot.com/-jjhKe8yf2RE/UwJKKmPrxaI/AAAAAAAAL0Q/iwRG2fkix08/s1600/feedrss.png" /></a>
</div><!-- fin de class bar-->

</footer>



</body>
</html>
154 changes: 142 additions & 12 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,145 @@
/**
* import POKEMON from './data/pokemon/pokemon.js'
* import LoL from './data/lol/lol.js'
* import POTTER from './data/potter/potter.js'
*/
import Pokemon from './data/pokemon/pokemon.js'
console.log(Pokemon);
import {filterType, ordenName} from './data.js'//filtro grass
import {filterWater} from './data.js' //filtro water
import {filterRock} from './data.js' //filtro Rock

import { example } from './data.js';

console.log(example);
let poke= filterType(Pokemon);//filterType es nuestro filter y Pokemon es la data con la que trabaja
ordenName(poke)//sort de grass

/*
* console.log(POKEMON);
* console.log(LoL);
* console.log(POTTER)
*/

let pokew= filterWater(Pokemon); //Variable filter water
ordenName(pokew)//sort de agua

let pokeR= filterRock(Pokemon);//filterRock
ordenName(poke)//sort de rock


//mostrando filtro Grass a HTML class con map
poke.map((pkm)=>{
const template = `<div class="card">
<h1>${pkm.name}</h1>
<img src="${pkm.img}"></img>
<h3>Weaknesses:</h3>
<p> ${pkm.weaknesses}</p>
</div>`
document.getElementById('content1').innerHTML += template
}); //En content se muesta el template


//boton grass
var contentVisible = true;
document.addEventListener("click", function(e) {
var clicked = e.target;
var content = document.getElementById("content1");
}, true);

document.getElementById("button").addEventListener("click", function(e) {
var content = document.getElementById("content1");
var content2 = document.getElementById("content2");
var content3 = document.getElementById("content3");

e.preventDefault();

//e.stopPropagation();
if (contentVisible){
content.style.display = "flex";
contentVisible = false;
content2.style.display = "none";
content3.style.display = "none";
} else {
content.style.display = "none";
contentVisible = true;
content2.style.display = "none";
content3.style.display = "none";

}
}, false);// fin boton grass


//mostrando filtro Water a HTML class con map
pokew.map((pkm)=>{
const template1 = `<div class="card2">
<h1>${pkm.name}</h1>
<img src="${pkm.img}"></img>
<h3>Weaknesses:</h3>
<p>${pkm.weaknesses}</p>
</div>`
document.getElementById('content2').innerHTML += template1
});


//boton water
var contentVisible = true;
document.addEventListener("click", function(e) {
var clicked = e.target;
var content = document.getElementById("content2");
}, true);

document.getElementById("buttonW").addEventListener("click", function(e) {
var content = document.getElementById("content2");
var content2 = document.getElementById("content1");
var content3 = document.getElementById("content3");

e.preventDefault();

//e.stopPropagation();
if (contentVisible){
content.style.display = "flex";
contentVisible = false;
content2.style.display = "none";
content3.style.display = "none";
} else {
content.style.display = "none";
contentVisible = true;
content2.style.display = "none";
content3.style.display = "none";

}
}, false);// fin boton water

//mostrando filtro Rock a HTML class con map
pokeR.map((pkm)=>{
const template2 = `<div class="card3">
<h1>${pkm.name}</h1>
<img src="${pkm.img}" ></img>
<h3>Weaknesses:</h3>
<div>${pkm.weaknesses}</div>
</div>`
document.getElementById('content3').innerHTML += template2
}); //En content se muesta el template


//boton rock

var contentVisible = true;
document.addEventListener("click", function(e) {
var clicked = e.target;
var content = document.getElementById("content3");
}, true);

document.getElementById("buttonR").addEventListener("click", function(e) {
var content = document.getElementById("content3");
var content2 = document.getElementById("content1");
var content3 = document.getElementById("content2");


//e.preventDefault();
e.stopPropagation();
if (contentVisible){
content.style.display = "flex";
contentVisible = false;
content2.style.display = "none";
content3.style.display = "none";


} else {
content.style.display = "none";
contentVisible = true;
content2.style.display = "none";
content3.style.display = "none";


}
}, false);// fin boton water
Loading