Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5483ac0
Se hizo coambio en la estructura HTML y CSS, también se agrega la car…
ValenParaguatey Apr 4, 2023
6f290c1
Merge pull request #1 from ValenParaguatey/rama-valentina
MontserratPoblano Apr 4, 2023
959ab5b
Se actualizaron enlaces de fuentes e iconos
MontserratPoblano Apr 5, 2023
5b14e34
Se crea la segunda pagina y se hace una modificación en el logotipo d…
ValenParaguatey Apr 5, 2023
a8b764e
Se modificó el error de las imágenes, se crea pág tiposPokemon, se ca…
ValenParaguatey Apr 8, 2023
d988a1e
prueba
ValenParaguatey Apr 8, 2023
88d8a6f
Merge pull request #2 from ValenParaguatey/rama-valentina
MontserratPoblano Apr 10, 2023
11a5258
no se hicieron cambios
MontserratPoblano Apr 10, 2023
cd7be75
Merge branch 'main' of github.com:MontserratPoblano/DEV006-data-lovers
MontserratPoblano Apr 10, 2023
3d5507e
Se modificó archivos html, se crea función de filtrado por tipo en da…
ValenParaguatey Apr 10, 2023
8184ddb
Merge branch 'main' into rama-ValenTrabajo2
MontserratPoblano Apr 11, 2023
02b6d31
Merge pull request #3 from ValenParaguatey/rama-ValenTrabajo2
MontserratPoblano Apr 11, 2023
0f642e9
pequeños cambios en funciones modal
MontserratPoblano Apr 12, 2023
67766ba
modal funcionando en su totalidad
MontserratPoblano Apr 17, 2023
2500f49
se hace menu pagina responsive y funciones en js de busqueda, se arre…
MontserratPoblano Apr 24, 2023
e860751
Merge pull request #4 from MontserratPoblano/rama-Montse
MontserratPoblano Apr 24, 2023
f562969
Funciones completas y con test terminados y cambios en botones de car…
MontserratPoblano Apr 26, 2023
303c781
Merge pull request #5 from MontserratPoblano/rama2-Montse
MontserratPoblano Apr 26, 2023
eb83a3c
Se suben cambios en funciones de ordenar y test
ValenParaguatey Apr 26, 2023
fde7eb1
Merge branch 'main' into rama-ValenTrabajo
MontserratPoblano Apr 26, 2023
c6d66ba
Merge pull request #6 from ValenParaguatey/rama-ValenTrabajo
MontserratPoblano Apr 26, 2023
6dce3a9
trabajo de calculo agregado al 60%
MontserratPoblano Apr 28, 2023
27e8e0f
se deja funcion de agregar pokemon a pokebola y contabilizar pokemone…
MontserratPoblano Apr 29, 2023
df03c5e
Diseño del modal para revisión
MontserratPoblano May 1, 2023
8844e7c
Merge pull request #7 from MontserratPoblano/rama-Montse4
MontserratPoblano May 1, 2023
0dcbe4e
Modificaciones en README pendiente link zeplin
MontserratPoblano May 1, 2023
223ba6d
Se integra link Zeplin al readme y se corrige en error de la imagen d…
MontserratPoblano May 1, 2023
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
*.swp
coverage/
node_modules/
.hintrc
package-lock.json
641 changes: 44 additions & 597 deletions README.md

Large diffs are not rendered by default.

211 changes: 204 additions & 7 deletions src/data.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,206 @@
// estas funciones son de ejemplo
import {Objetos} from './data/pokemon/pokemon.js';

export function mostrarPokemon(data) {
const filterByType = data.length > 0 ? data: Objetos.pokemon
let pokemonAgregado=[];
const listaPokemon = document.getElementById('listaPokemon');


filterByType.forEach(pokemon => {
const div = document.createElement('div');
div.classList.add('pokemon');
div.innerHTML = `
<div class="pokemonImagen">
<img src="./img/pokebola.png" id="${pokemon.type}" class="pokebola" alt="imagen pokebola" width="25px" height="25px">
<img src="${pokemon.img}" alt="${pokemon.name}" class="pokemonImg">
</div>
<div class="pokemon-info">
<div class="nombre-contenedor">
<p class="pokemon-id">${pokemon.num}</p>
<h2 class="pokemon-nombre">${pokemon.name}</h2>
</div>
<div class="pokemon-tipos">
<p class="tipo">${pokemon.type}</p>
</div>
<button type="button" class="btn-modal" id="${pokemon.num}">Ver mas</button>
</div>

`
listaPokemon.append(div);

});



const abrir=document.querySelectorAll(".btn-modal");
const modalC=document.querySelector("#contentModal");


abrir.forEach( (btn,index)=>btn.addEventListener("click", (e)=>{
e.preventDefault();


modalC.style.opacity="1";
modalC.style.visibility="visible";
const divDos = document.createElement("div");

divDos.classList.add(".modal");
const modalHtml=`

<div class="modal modal-close" >
<p class="close"><i class="fa-solid fa-circle-xmark"></i><p>

<div class="imagen-pokemon">
<div class="num-size">
<img src="${filterByType[index].img}">
<p class="numeroPokemon" >${filterByType[index].num}</p>
<p class="nombrePokemon">${filterByType[index].name}</p>
</div>
<div class="caja1">
<h3 class="numeroPokemon">Size</h3>
<p class="numeroPokemon">Height:${filterByType[index].size.height}</p>
<p class="numeroPokemon">Weight:${filterByType[index].size.weight}</p>
<h3>Pokemon-rarity</h3>
<p class="ataque">${filterByType[index]["pokemon-rarity"]}
</div>
</div>
<div class="baseDefensa">
<div>
<p class="about">${filterByType[index].about}</p>
</div>
<div class="contenedorResistencia">
<div class="resistencia">
<h3>Resistance</h3>
<p class="resistencia">${filterByType[index].resistant.join("/ ")}</p>
</div>
<div class="weakness">
<h3>Weaknesses</h3>
<p class="debilidad">${filterByType[index].weaknesses.join("/ ")}</p>
</div>
</div>
<div class="contenedorStats">
<div class="stats">
<h3>Stats</h3>
<p class="ataque"><i class="fa-solid fa-check"></i>Base-attack:${filterByType[index].stats["base-attack"]}</p>
<p class="defensa"><i class="fa-solid fa-check"></i></i>Base-defense:</i>${filterByType[index].stats["base-defense"]}</p>
<p class="defensa"><i class="fa-solid fa-check"></i></i>Base-stamina:</i>${filterByType[index].stats["base-stamina"]}</p>
<p class="defensa"><i class="fa-solid fa-check"></i></i>Max-cp:</i>${filterByType[index].stats["max-cp"]}</p>
<p class="defensa"><i class="fa-solid fa-check"></i></i>Max-hp:</i>${filterByType[index].stats["max-hp"]}</p>
</div>
<div class="specialAtack">
<h3>Special special-attack</h3>
<ul>
<li><i class="fa-solid fa-check"></i>Name:${filterByType[index]["special-attack"][0].name}</li>
<li><i class="fa-solid fa-check"></i>Type:${filterByType[index]["special-attack"][0].type}</li>
<li><i class="fa-solid fa-check"></i>Base-Damage:${filterByType[index]["special-attack"][0]["base-damage"]}</li>
<li><i class="fa-solid fa-check"></i>Energy:${filterByType[index]["special-attack"][0].energy}</li>
<li><i class="fa-solid fa-check"></i>Move-duration:${filterByType[index]["special-attack"][0]["move-duration-seg"]}</li>
</ul>
</div>
</div>
<div class="evolution">
<h3>Nex Evolution</h3>
<p class="evolucion"> ${filterByType[index].evolution["next-evolution"]}</p>
<p class="evolucion">${filterByType[index].evolution}</p>
</div>
</div>


`

divDos.innerHTML = modalHtml
modalC.append(divDos);


const modal=document.querySelectorAll(".modal")[0];
const cerrarModal=document.querySelector(".close");
modal.classList.toggle("modal-close");

cerrarModal.addEventListener("click", ()=>{
divDos.innerHTML="";

modal.classList.toggle("modal-close");

modalC.style.opacity="0";
modalC.style.visibility="hidden";



});


}));
}


export function datosTarjeta(pokebo){
const pokebolaInfo={

imagen:pokebo.querySelector(".pokemonImg").src,
nombre: pokebo.querySelector("h2").textContent,
numero: pokebo.querySelector("p").textContent,
tipo: pokebo.querySelector(".tipo").textContent,
cantidad: 1

}
return pokebolaInfo
}



export function filtradoPorTipo(data,type) {
const datosFiltrados = data.filter(elemento => elemento.type.includes(type))
return datosFiltrados
}




export function ordenar(data){
const filterByType = data.length > 0 ? [...data] : [...Objetos.pokemon]

const result=filterByType.sort(function(a, b) {
if (a.name > b.name) {
return 1;
}
if (a.name < b.name) {
return -1;
}
return 0;
});

return result
}





export function ordenarZa(data){

const filterByType = data.length > 0 ? [...data]: [...Objetos.pokemon]

const result=filterByType.sort(function(a, b) {
if (a.name < b.name) {

return 1;
}
if (a.name > b.name) {
return -1;
}
return 0;
});

return result
}



export function busquedaName(){

const input=document.getElementById("busqueda");
const searchName=Objetos.pokemon.filter(pokemon=>pokemon.name.toLowerCase().match((input.value.toLowerCase())))
return searchName
}

export const example = () => {
return 'example';
};

export const anotherExample = () => {
return 'OMG';
};
2 changes: 1 addition & 1 deletion src/data/pokemon/pokemon.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
export const Objetos = {
"pokemon": [{
"num": "001",
"name": "bulbasaur",
Expand Down
Binary file added src/img/187200-tipos-pokemon-maplerose.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/img/Bienvenido.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/img/Captura de pantalla 2023-03-30 154456.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/img/HU1.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/img/HU1SINERROR.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/img/HU2.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/img/HU3.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/img/HU4.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/img/HU5.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/img/Normal.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/img/PrototipoBajafidelidad.jpeg
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/img/Veneno.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/img/acero.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/img/agua.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/img/bicho.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/img/curiosidades.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/img/dragon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/img/electricco.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/img/entrenador-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/img/equipo-pokemon.jpeg
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/img/equipo.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/img/equipo1.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/img/equipo2.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/img/equipo3.jpg
Binary file added src/img/fantasma.png
Binary file added src/img/fuego.png
Binary file added src/img/grupo.jpg
Binary file added src/img/hada.png
Binary file added src/img/hielo.png
Binary file added src/img/insignias.png
Binary file added src/img/lucha.png
Binary file added src/img/lupa.jfif
Binary file not shown.
Binary file added src/img/new-animated-series-169.png
Binary file added src/img/pikachu.png
Binary file added src/img/planta.png
Binary file added src/img/pokebola.png
Binary file added src/img/pokemon-master-journeys-2.jpg
Binary file added src/img/pokemon.jpg
Binary file added src/img/pokemon.webp
Binary file added src/img/pokemonFuego.png
Binary file added src/img/pokemones.jpg
Binary file added src/img/psiquico.png
Binary file added src/img/roca.png
Binary file added src/img/snorlax.png
Binary file added src/img/tierra.png
Binary file added src/img/tipos-de-pokemon.png
Binary file added src/img/titulo.png
Binary file added src/img/volar.png
142 changes: 139 additions & 3 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,147 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>Data Lovers</title>
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="style.css" >
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link href="https://fonts.google.com/specimen/Limelight?query=limel" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Limelight&display=swap" rel="stylesheet">
</head>
<body>
<div id="root"></div>
<body >

<header>
<nav class="navegacion">
<ul class="menu-nav">
<li class="primerItem">
<a href="tiposPoquemon.html">
<img src="./img/pikachu.png" alt="pikachu" class="itemImagen" >
<span class="texto-item">Tipos de pokemon</span>
<span class="down-item"></span>
</a>
</li>
<li>
<a href="#">
<img src="./img/entrenador-pokemon.png" alt="jugador" class="itemImagen" >
<span class="texto-item">Otros jugadores</span >
<span class="down-item"></span >
</a>
</li>
<li>
<a href="#">
<img src="./img/insignias.png" alt="equipo" class="itemImagen">
<span class="texto-item">Tu equipo</span>
<span class="down-item"></span>
</a>
</li>
<li>
<a href="noticiasycuriosidades.html">
<img src="./img/snorlax.png" alt="curiosidades" class="itemImagen">
<span class="texto-item">Noticias y curiosidades</span>
<span class="down-item"></span>
</a>
</li>
</ul>
</nav>

<nav class="navegacion2">
<span class="menu">Menu</span>
<button class="nav-burger"><i class="fa-solid fa-bars"></i></button>
<ul class="menu-nav2">
<li class="lista-menu">
<a href="tiposPoquemon.html" class="link-menu">Tipos de pokemon</a>
</li>
<li class="lista-menu">
<a href="#" class="link-menu">Otros jugadores</a>
</li>
<li class="lista-menu">
<a href="#" class="link-menu">Tu equipo</a>
</li>
<li class="lista-menu">
<a href="noticiasycuriosidades.html" class="link-menu">Noticias y curiosidades</a>
</li>
</ul>
</nav>
</header>

<main>
<section id="Titulo">
<div class="titulo-principal">
<img src="./img/BIENVENIDO-A-MUNDO-POK-MON-22-4-2023 (3).png" alt="imagen-titulo" >
</div>

</section>
<section id="CarruselImagenes">
<div id="conteItemsCarrusel">
<div class="itemCarrusel" id="itemCarrusel-1">
<div class="tarjetaCarrusel" id="tarjetaCarrusel-1">
<img src="./img/tipos-de-pokemon.png" alt="tipos-pokemon">
<div class="texto-Foto">
<h3>Descubre tu pokemon favorito en nuestra sección tipos de pokemon</h3>
</div>
</div>
<div class="flechasCarrusel">
<a href="#itemCarrusel-4"><i class="fa-solid fa-chevron-left fa-3x" style="color:#0000CD;"></i></a>
<a href="#itemCarrusel-2"><i class="fa-solid fa-chevron-right fa-3x" style="color:#0000CD;"></i></a>

</div>
</div>


<div class="itemCarrusel" id="itemCarrusel-2">
<div class="tarjetaCarrusel" id="tarjetaCarrusel-2">
<img src="./img/pokemon-master-journeys-2.jpg" alt="equipo">
<div class="texto-Foto">
<h3>Intercambia pokemones y experiencias con otros maestros pokemon</h3>
</div>
</div>
<div class="flechasCarrusel">
<a href="#itemCarrusel-1"><i class="fa-solid fa-chevron-left fa-3x" style="color:#0000CD;"></i></a>
<a href="#itemCarrusel-3"><i class="fa-solid fa-chevron-right fa-3x" style="color:#0000CD;"></i></a>
</div>

<div class="itemCarrusel" id="itemCarrusel-3">
<div class="tarjetaCarrusel" id="tarjetaCarrusel-3">
<img src="./img/pokemon.jpg" alt="equipo">
<div class="texto-Foto">
<h3>Completa tu equipo y asegurate de estar listo para la batalla!</h3>
</div>
</div>
<div class="flechasCarrusel">
<a href="#itemCarrusel-3"><i class="fa-solid fa-chevron-left fa-3x" style="color:#0000CD;"></i></a>
<a href="#itemCarrusel-4"><i class="fa-solid fa-chevron-right fa-3x" style="color:#0000CD;"></i></a>
</div>
</div>

<div class="itemCarrusel" id="itemCarrusel-4">
<div class="tarjetaCarrusel" id="tarjetaCarrusel-4">
<img src="./img/curiosidades.jpg" alt="equipo">
<div class="texto-Foto">
<h3>Conoce todo sobre las nuevas generaciones</h3>
</div>
</div>
<div class="flechasCarrusel">
<a href="#itemCarrusel-3"><i class="fa-solid fa-chevron-left fa-3x" style="color:#0000CD;"></i></a>
<a href="#itemCarrusel-1"><i class="fa-solid fa-chevron-right fa-3x" style="color:#0000CD;"></i></a>
</div>
</div>
</div>
</div>
</section>

</main>

<footer>
Elaborado por:
-Christian Montserrat - Valentina Paraguatey
</footer>

<div id="root">
</div>
<script src="main.js" type="module"></script>
<script src="pokemon.js"></script>

</body>
</html>
Loading