Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #27

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c3061ac
Primer modificación al README para el primer sprint. Agrega el archiv…
LMVR90 Jun 28, 2019
15b24e1
Merge pull request #2 from LMVR90/develop
MonicaTorresVite Jun 28, 2019
8cb0683
Actualizo codigos para que podamos trabajar en lo mismo
Jul 2, 2019
0b8d46c
:c
Jul 2, 2019
15b45ba
Navega por ventanas usando funciones del DOM, pinta la data usando un…
LMVR90 Jul 4, 2019
66b599a
Merge branch 'Develop' into develop
MonicaTorresVite Jul 4, 2019
b5860be
Merge pull request #3 from LMVR90/develop
MonicaTorresVite Jul 4, 2019
fcc0c28
Navega entre pantallas con eventos del DOM. Añade estilos en CSS, fun…
LMVR90 Jul 4, 2019
389f0b9
Realiza modificaciones de estilo. Funcionan los botones del DOM para …
LMVR90 Jul 4, 2019
ad15c98
Merge pull request #4 from LMVR90/develop
MonicaTorresVite Jul 4, 2019
ab2deeb
Elimina y comenta líenas de código muertas. Crea funciones básicas de…
LMVR90 Jul 5, 2019
e1a9a7c
Implementa métodos de filtrado básicos, de un solo atributo cada uno.…
LMVR90 Jul 5, 2019
6c58908
aparece y desaparece botón de filtrar, lo deja sólo en pantalla de pe…
LMVR90 Jul 5, 2019
2be6dd4
Merge pull request #5 from LMVR90/develop
MonicaTorresVite Jul 5, 2019
a68e8ff
Update Read.Me Sprint #2
MonicaTorresVite Jul 5, 2019
13a3782
Borrando error de sintaxis en button filter en main.js
MonicaTorresVite Jul 5, 2019
55dc7ca
Resuleve navegación entre pantallas con class, comienza a dar formato…
LMVR90 Jul 8, 2019
fe3f7f9
Merge branch 'master' into develop
MonicaTorresVite Jul 8, 2019
c2fd7ff
Merge pull request #6 from LMVR90/develop
MonicaTorresVite Jul 8, 2019
3daa76e
Revert ":)"
MonicaTorresVite Jul 8, 2019
1f2c141
Merge pull request #7 from MonicaTorresVite/revert-6-develop
MonicaTorresVite Jul 8, 2019
6d1d4c1
Ajusta estilos de CSS. La data se presenta en cards. Aun no se alinean
LMVR90 Jul 8, 2019
c233d78
Navega por pantallas con classList, estilos cards de data personajes,…
LMVR90 Jul 8, 2019
c90958c
Merge pull request #8 from LMVR90/develop
MonicaTorresVite Jul 8, 2019
b4016a6
centra y reduce margen del botón de reinicio, ya no estorba para hace…
LMVR90 Jul 9, 2019
0c67074
Aparece el botón de filtrar en pantalla. Desalinea cards. ajusta márg…
LMVR90 Jul 9, 2019
8775f0f
Ajusta posición de input filtrar. Mantiene posición de cards. Aún no …
LMVR90 Jul 9, 2019
5909fb3
Merge pull request #9 from LMVR90/develop
MonicaTorresVite Jul 9, 2019
1df167f
Pinta data filtrada en categoría allDead. Aplica primer efecto :hover…
LMVR90 Jul 9, 2019
2e1a302
Merge pull request #10 from LMVR90/develop
MonicaTorresVite Jul 9, 2019
3adbe4e
Filtra todas las categorías
LMVR90 Jul 9, 2019
60fb481
Merge pull request #11 from LMVR90/develop
MonicaTorresVite Jul 9, 2019
1513404
Pequeñas ediciones al diseño de la pantalla de bienvenida
Jul 9, 2019
14befd1
Reduce el código del template string
LMVR90 Jul 9, 2019
5e30bcc
Código con errores en estilos. Lo subo para poder hacer fetch del mas…
LMVR90 Jul 9, 2019
d83f791
Actualizar. Reduce texto de función printData. Ajusta tamaños de gifs…
LMVR90 Jul 10, 2019
af81602
Ajusta estilos en html y CSS
LMVR90 Jul 10, 2019
e5edee4
Merge pull request #12 from LMVR90/develop
MonicaTorresVite Jul 10, 2019
f49cee8
Agrega contenido a la pantala Explorar
LMVR90 Jul 10, 2019
49e960e
Merge pull request #13 from LMVR90/develop
MonicaTorresVite Jul 10, 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
407 changes: 19 additions & 388 deletions README.md

Large diffs are not rendered by default.

416 changes: 416 additions & 0 deletions presentacion-proyecto.md

Large diffs are not rendered by default.

107 changes: 101 additions & 6 deletions src/data.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,103 @@
// esta es una función de ejemplo
// puedes ver como agregamos la función a nuestro objeto global window
const data = RICKANDMORTY.results;
console.log(data);

const allAlive = data.filter(element => element.status === "Alive");
console.log(allAlive);

const allDead = data.filter(element => element.status === "Dead");
console.log(allDead);

const allFemale = data.filter(element => element.gender === "Female");
console.log(allFemale);

const allMale = data.filter(element => element.gender === "Male");
console.log(allMale);

const ordenarData = () => {
let newArray = data.forEach (element => element.name);
console.log(newArray)}
ordenarData();


window.allAlive = allAlive;
window.allDead = allDead;
window.allMale = allMale;
window.allFemale = allFemale;



/*const filterName = () => {
let allRick = data.filter(element => element.name === "Rick Sanchez");
console.log(allRick);
return allRick;
}
filterName();*/

/*const filterPersonajes = (data, filterValue) => {
let filterData = data.filter (element => element.status == filterValue);
console.log(filterData)
return filterPersonajes;
}

window.filterPersonajes = filtrarPersonajes;
/*

const filtrarPersonajes = (data) => {
let filterData = data.filter (element => element.status[0] == filterValue);
console.log(filterData)
printDataPersonajes(filterData);
}

const filtrarPersonajes = (data) => {
let filterData = data.filter (element => element.status.includes(filterValue));
}

window.filtrarPersonajes = filtrarPersonajes;
--

selectType.addEventListener('change', () => {
const selectUser = selectType.value
const pokeTierra = data.filter(tierra => tierra.type.includes(selectUser));

const pokeTierra = data.filter(tierra => tierra.type[0] == selectUser);

console.log(pokeTierra);
printPokemons(pokeTierra)
})*/


/*const newArray = data.filter( element => console.log(element.key[0])) (regresa cada uno de los elementos del array, con el key invocado)

const pokemonEgg = newArray.filter(pokemonEgg => console.log(havegg))*/


/*let filterData2 = () => {
let filterResult = "";
let filterValue = buttonFilter.value;
let filterResult = window.filterPersonajes(data,filterValue);
printDataPersonajes(filterResult);
console.log(filterData2);*/























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

window.example = example;
2 changes: 1 addition & 1 deletion src/data/rickandmorty/rickandmorty.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const RICKANDMORTY = {
window.RICKANDMORTY = {
"info": {
"count": 493,
"pages": 25,
Expand Down
Binary file added src/images/background-stars.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/images/banner1.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/banner2.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/giphy (1).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/giphy (2).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/giphy(3).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/giphy(4).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/giphy(5).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/giphy.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/morty(2).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/morty.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/plumbus.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/portal png 1(3).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/portal png 1(6).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/portal png 1.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/r&m-banner.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/rick-morty-watch-giphy(2).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/rick-morty-watch-giphy.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/rick-spinning.giphy(2).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/rick-spinning.giphy.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/spacechip.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/yell.giphy.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 97 additions & 10 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,105 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Data Lovers</title>
<link rel="stylesheet" href="style.css" />
<meta charset="utf-8" name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Rick and Morty Lovers</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div id="root"></div>
<!-- <script src="./data/injuries/injuries.js"></script> -->
<!-- <script src="./data/pokemon/pokemon.js"></script> -->
<!-- <script src="./data/steam/steam.js"></script> -->
<!-- <script src="./data/worldbank/worldbank.js"></script> -->
<!-- <script src="./data/lol/lol.js"></script> -->
<body>
<main class="container" id="container">
<header class="row">
<figure>
<a href="">
<img src="images/banner1.png" alt="Rick and Morty Lovers">
</a>
</figure>
</header>

<!--PANTALLA DE BIENVENIDA-->
<section id="pantalla-bienvenida" class="row">
<!--<div id="button-inicio" class="gif-button col-6"><input type="image" alt="Inicio" src="images/portal png 1(6).gif" :hover></div>-->
<div id="button-personajes" class="gif-button col-6"><input type="image" alt="Personajes" src="images/rick-spinning.giphy(2).gif" :hover><div class="nombre-secciones">Personajes</div></div>
<div id="button-planetas" class="gif-button col-6"><input type="image" alt="Planetas" src="images/yell.giphy.gif" :hover><div class="nombre-secciones">Planetas y dimensiones</div></div>
<div id="button-explorar" class="gif-button col-6"><input type="image" alt="Explorar" src="images/rick-morty-watch-giphy(2).gif" :hover><div class="nombre-secciones">Explorar</div></div>
<div id="button-ayuda" class="gif-button col-6"><input type="image" alt="Explorar" src="images/morty(2).gif" :hover><div class="nombre-secciones">Ayuda</div></div>
</section>

<!--PANTALLA DE PERSONAJES-->
<section id="pantalla-personajes" class="row disappear">
<article>
<div class="section-header">
<h1>Personajes</h1>
</div>
</article>
<div class="card-display">
<div id="card-display"></div>
</div>
<div class="row" id="filter-personajes">
<select class="col-2" id="input-filter-personajes">
<option value="filter">Filtrar</option>
<option value="all">Todos</option>
<option value="allAlive">Vivos</option>
<option value="allDead">Muertos</option>
<option value="allMale">Masculinos</option>
<option value="allFemale">Femeninos</option>
</select>
</div>
<!--<div class="row" id="ordenar-personajes">
<select class="col-2" name="ordenar" id="input-ordenar-personajes">
<option value="a-z">A-Z</option>
<option value="z-a">Z-A</option>
</select>
</div>-->
</section>

<!--PANTALLA DE PLANETAS-->
<section id="pantalla-planetas" class="row disappear">
<article class="header">
<h1>Planetas y dimensiones</h1>
</article>
</section>

<!--PANTALLA DE EXPLORAR-->
<section id="pantalla-explorar" class="row disappear">
<article class="row">
<h2 class="col-12">Explorar</h2>
</article>
<article class="col-12 event-videos">
<figure class="event-imageContainer">
<iframe width='560' height='315' src='https://www.adultswim.com/player/embed/AWq749adCorLtcgflqdN' frameborder='0' allowfullscreen>
</iframe>
</figure>
<div class="event-videos">
<h3 class="event-videos-título">Rick ann Morty Temporada 4</h3>
<p class="event-videos-descrip"> La cuarta temporada de Rick and Morty llega en Noviembre de 2019!
Mientras tanto vuelve a ver tus episodios favoritos.
</p>
</div>
</article>
</section>

<!--PANTALLA DE AYUDA-->
<section id="pantalla-ayuda" class="row disappear">
<article class="header">
<h1>Sobre Rick and Morty Lovers</h1>
</article>
</section>

<!--BOTÓN REINICIO-->
<div id="button-reinicio">
<div>
<input id="portal" type="image" alt="Inicio" :hover src="images/portal png 1(3).gif">
</div>
</div>

<footer id="footer" class="row">
<h3>Rick and Morty Lovers - 2019</h3>
</footer>

<script src="./data/rickandmorty/rickandmorty.js"></script>
<script src="data.js"></script>
<script src="main.js"></script>

</main>
</body>
</html>
120 changes: 120 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
const buttonReinicio = document.getElementById("button-reinicio");
const buttonPersonajes = document.getElementById("button-personajes");
const buttonPlanetas = document.getElementById("button-planetas");
const buttonExplorar = document.getElementById("button-explorar");
const buttonAyuda = document.getElementById("button-ayuda");
const buttonFilter = document.getElementById("input-filter-personajes");
const screenBienvenida = document.getElementById("pantalla-bienvenida");
const screenPersonajes = document.getElementById("pantalla-personajes");
const screenPlanetas = document.getElementById("pantalla-planetas");
const screenExplorar = document.getElementById("pantalla-explorar");
const screenAyuda = document.getElementById("pantalla-ayuda");
//const buttonInicio = document.getElementById("button-inicio");

const pantallaBienvenida = () => {
screenBienvenida.classList.remove("disappear");
screenPersonajes.classList.add("disappear");
screenPlanetas.classList.add("disappear");
screenExplorar.classList.add("disappear");
screenAyuda.classList.add("disappear");
buttonReinicio.classList.remove("disappear");
buttonFilter.classList.add("disappear");
}

const pantallaPersonajes = () => {
screenBienvenida.classList.add("disappear");
screenPersonajes.classList.remove("disappear");
screenPlanetas.classList.add("disappear");
screenExplorar.classList.add("disappear");
screenAyuda.classList.add("disappear");
buttonReinicio.classList.remove("disappear");
buttonFilter.classList.remove("disappear");
}

let printDataPersonajes = (data) => {
let str = "";
data.forEach(element => {
str += `<div id="cards">
<div class="col-10">
<div class="row">
<img class="imagen-personaje" src=${element.image}>
</div>
<div class="row data-personajes">
<h3 class="nombre-personaje">${element.name}</h3>
<p>Especie: ${element.species}</p>
<p>Género: ${element.gender}</p>
<p>Origen: ${element.origin.name}</p>
<p>Estatus: ${element.status}</p>
</div>
</div>
</div>`
});
document.getElementById("card-display").innerHTML = str;
}
printDataPersonajes(data);

let filterData1 = () => {
let filterResult = "";
let filterValue = buttonFilter.value;
console.log(filterValue);
if (filterValue === "allAlive") {
let filterResult = window.allAlive;
printDataPersonajes(filterResult);
console.log(filterResult);
} else if (filterValue === "allDead") {
let filterResult = window.allDead;
printDataPersonajes(filterResult);
console.log(filterResult);
} else if (filterValue === "allMale") {
let filterResult = window.allMale;
printDataPersonajes(filterResult);
console.log(filterResult);
} else if (filterValue === "allFemale") {
let filterResult = window.allFemale;
printDataPersonajes(filterResult);
console.log(filterResult);
} else if (filterValue === "all") {
let filterResult = printDataPersonajes();
printDataPersonajes(filterResult);
}
console.log(filterResult);
return filterResult;
}

const pantallaPlanetas = () => {
screenBienvenida.classList.add("disappear");
screenPersonajes.classList.add("disappear");
screenPlanetas.classList.remove("disappear");
screenExplorar.classList.add("disappear");
screenAyuda.classList.add("disappear");
buttonReinicio.classList.remove("disappear");
buttonFilter.classList.add("disappear");
}

const pantallaExplorar = () => {
screenBienvenida.classList.add("disappear");
screenPersonajes.classList.add("disappear");
screenPlanetas.classList.add("disappear");
screenExplorar.classList.remove("disappear");
screenAyuda.classList.add("disappear");
buttonReinicio.classList.remove("disappear");
buttonFilter.classList.add("disappear");
}

const pantallaAyuda = () => {
screenBienvenida.classList.add("disappear");
screenPersonajes.classList.add("disappear");
screenPlanetas.classList.add("disappear");
screenExplorar.classList.add("disappear");
screenAyuda.classList.remove("disappear");
buttonReinicio.classList.remove("disappear");
buttonFilter.classList.add("disappear");
}

//buttonInicio.addEventListener("click", pantallaBienvenida);
buttonReinicio.addEventListener("click", pantallaBienvenida);
buttonPersonajes.addEventListener("click", pantallaPersonajes);
buttonPlanetas.addEventListener("click", pantallaPlanetas);
buttonExplorar.addEventListener("click", pantallaExplorar);
buttonAyuda.addEventListener("click", pantallaAyuda);
buttonFilter.addEventListener("change", filterData1);
Loading