Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
7c3cf53
Prueba de pull
Laugardc Nov 22, 2022
016a78a
Prueba con dependencias npm
Laugardc Nov 22, 2022
a50b8c1
Muestra en html :name, house (html y main.js)
Laugardc Nov 24, 2022
75685ec
commit con la version 1 del index para desktop
dvnielx Nov 25, 2022
a9b4330
Mostrar imagenes, nombre y casa main.js
Laugardc Nov 28, 2022
4cb3397
pantalla de inicio desktop con logos y boton para mostrar personajes
dvnielx Nov 28, 2022
39b34d5
Merge pull request #1 from dvnielx/feature-dani-html
Laugardc Nov 28, 2022
b922a1d
Merge de pag inicio y api mostrada con imagenes
Laugardc Nov 28, 2022
abd2bbd
Borramos algunas imagenes
Laugardc Nov 28, 2022
f9abcc0
commit previo de hacer merge en vsc
dvnielx Nov 29, 2022
174f83c
borramos zip de tinyfied
dvnielx Nov 29, 2022
aa93a38
Merge branch 'main' of https://github.com/Laugardc/DEV002-data-lovers…
dvnielx Nov 29, 2022
5b16bf1
prueba merge
dvnielx Nov 29, 2022
13fe042
prueba merge js2
dvnielx Nov 29, 2022
ea461c1
Start Filter Function y sin Wallpaper
Laugardc Nov 29, 2022
aa28801
Merge branch 'main' into feature-dani-html
dvnielx Nov 29, 2022
884a644
logos comprimidos, wallpaper en jpeg y merge completo
dvnielx Nov 29, 2022
ffc8199
mover func fetch a data.js
Laugardc Dec 1, 2022
2fbaaff
commit con pagina de inicio responsive, css para desktop y css para m…
dvnielx Dec 2, 2022
cdadc92
4 filtros hechos
Laugardc Dec 6, 2022
86b084a
commit para merge #2. agregue favicon y main/data vacios para evitar …
dvnielx Dec 6, 2022
d8bfdb4
4 filtros sin css
Laugardc Dec 6, 2022
4b7cf3d
Merge branch 'feature-lau-filter' into feature-dani-html
Laugardc Dec 6, 2022
5779f7d
Merge pull request #3 from dvnielx/feature-dani-html
Laugardc Dec 6, 2022
2801ad6
commit navbar en mobile y desktop y boton para recargar la pagina
dvnielx Dec 7, 2022
449e6a4
commit con bug resuelto y hover en los logos
dvnielx Dec 7, 2022
4d9179f
Merge pull request #4 from dvnielx/feature-dani-html
Laugardc Dec 7, 2022
b7b9002
formato html
Laugardc Dec 7, 2022
bff45ff
Mostrar data en cards con filtros
Laugardc Dec 8, 2022
03f3330
commit para merge de cards
dvnielx Dec 8, 2022
6699cbd
Listo para hacer merge con Dan, datos en cards, createElement y appen…
Laugardc Dec 8, 2022
c745d4a
Merge branch 'feature-lau-filter' into feature-dani-html
Laugardc Dec 8, 2022
443672d
Merge pull request #5 from dvnielx/feature-dani-html
Laugardc Dec 8, 2022
443f2fc
Muestra la data, window. onload
Laugardc Dec 8, 2022
0b2a69f
cards en contenedores.
dvnielx Dec 8, 2022
d8148b7
cards con logo
dvnielx Dec 8, 2022
3a661da
Cards con estilo e icono en htm a->z
Laugardc Dec 8, 2022
c33bbd3
icono a-z
dvnielx Dec 9, 2022
63e30e8
funcion ordenar AZ lista
dvnielx Dec 9, 2022
63d817c
modificaciones semanticas
dvnielx Dec 9, 2022
80566da
Cambios en estilo y reacomodo semantico
Laugardc Dec 9, 2022
a153293
Merge branch 'feature-lau-filter' into feature-dani-html
Laugardc Dec 9, 2022
0e08b9f
Merge pull request #6 from dvnielx/feature-dani-html
Laugardc Dec 9, 2022
8df61ac
test de funcion orderAZ
dvnielx Dec 10, 2022
883132f
commit con test de la funcion filtrar
dvnielx Dec 10, 2022
fc0e3ae
Merge branch 'feature-dani-html' of https://github.com/dvnielx/DEV002…
dvnielx Dec 10, 2022
b100aec
funcion de calcularPorcentaje
dvnielx Dec 11, 2022
b7c8bc2
ocultar/mostrar icono de filtrado
dvnielx Dec 12, 2022
f974bfa
funcion calcularPorcentaje sin errores
dvnielx Dec 12, 2022
45aed2c
Funcion porcentaje para hacer merge
Laugardc Dec 12, 2022
42a1261
Merge branch 'feature-lau-filter' into feature-dani-html
Laugardc Dec 12, 2022
6e3bdb3
Merge pull request #7 from dvnielx/feature-dani-html
Laugardc Dec 12, 2022
92b3685
modificaciones de disenio en la interfaz
dvnielx Dec 12, 2022
c684689
Merge branch 'feature-dani-html' of https://github.com/dvnielx/DEV002…
dvnielx Dec 12, 2022
037d082
modificaciones en padding y margins
dvnielx Dec 12, 2022
c761455
commit previo al merge
dvnielx Dec 12, 2022
5b546f6
test completos y corregidos
dvnielx Dec 13, 2022
6c5c231
Tests al 83%
Laugardc Dec 13, 2022
c33c8bb
Merge branch 'feature-lau-filter' into feature-dani-html
Laugardc Dec 13, 2022
2f5c722
Merge pull request #8 from dvnielx/feature-dani-html
Laugardc Dec 13, 2022
43e01d2
read.me parte 1
dvnielx Dec 13, 2022
ee70c79
readme
dvnielx Dec 13, 2022
ce0bec6
funcion de calcularPorcentajePorEscuela
dvnielx Dec 14, 2022
2674503
Mejorando UE, mostrando % por casa y ordenado. Red
Laugardc Dec 14, 2022
ecbdebd
commit before merge
dvnielx Dec 14, 2022
a2dd8be
test de z-a
Laugardc Dec 14, 2022
a345953
Merge branch 'feature-lau-filter' into feature-dani-html
Laugardc Dec 14, 2022
10602cd
Merge pull request #9 from dvnielx/feature-dani-html
Laugardc Dec 14, 2022
af5e331
Funciones completas y tests
Laugardc Dec 14, 2022
8e129a3
read.me con prototipo de alta fidelidad
dvnielx Dec 14, 2022
a3a7935
Readme prototipo baja f. y castle con mejorpx
Laugardc Dec 14, 2022
5ff1106
Merge pull request #10 from dvnielx/main
Laugardc Dec 15, 2022
96ad605
Deploy . HP Terminado
Laugardc Dec 15, 2022
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
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
Empty file added FETCH_HEAD
Empty file.
625 changes: 76 additions & 549 deletions README.md

Large diffs are not rendered by default.

Binary file added fonts/lumos/lumos.ttf
Binary file not shown.
11,855 changes: 11,855 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

59 changes: 50 additions & 9 deletions src/data.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,50 @@
// estas funciones son de ejemplo

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

export const anotherExample = () => {
return 'OMG';
};
export const filtro = (arr = [], casa) => {
return arr.filter((element) => element.house === casa);
};

export async function obtenerDatos() {
const url = './data/harrypotter/harry.json';
const respuesta = await fetch(url);
const resultado = await respuesta.json();
return resultado.characters;//.characters, porque en esta ocasion estoy trayendo solo los personajes por la carpeta json
}

export const orderAZ = (arr) => {
let ascendent = arr.sort(function(a, b) {
return((a.name < b.name)? -1: ((a.name > b.name)? 1: 0));
})
return ascendent;
}

export const orderZA = (arr) => {
let descendent = arr.sort(function(a, b) {
if(a.name > b.name) { return -1; }
if(a.name < b.name) { return 1; }
return 0;
})
return descendent;
}


export function calcularPorcentaje(datos) {
console.log(calcularPorcentaje)
let hombres = 0;
let mujeres = 0;
for(let i = 0; i < datos.length; i++) {
if(datos[i].gender === 'Female') {
mujeres++;
} else {
hombres++;
}
}

let porcentajeMujeres = (mujeres / datos.length) * 100;
porcentajeMujeres = porcentajeMujeres.toFixed(1);
let porcentajeHombres = (hombres / datos.length) * 100;
porcentajeHombres = porcentajeHombres.toFixed(1);
return { porcentajeMujeres, porcentajeHombres };

}



126 changes: 126 additions & 0 deletions src/desktop.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
*{
box-sizing: border-box;
padding: 0%;
margin: 0%;
}

html {
font-size: 62.5%;
}

body{
background-repeat: no-repeat;
background-size: cover;
}
header {
height: 1rem;
}
h4 {
color: #D4D9D8;
font-family: 'Indie Flower', sans-serif;
font-size: 2.5rem;
}
.home-icon {
width: 2.9rem;
height: 2.9rem;
margin-top: .6rem;
margin-right: 90%;
margin-left: 1rem;
}

nav {
position: fixed;
height: 4rem;
top: 0;
left: 0;
right: 0;
z-index: 10;
background-color: #D4D9D8;
}
nav img {
position: absolute;
top: 0;
left: 0;
padding: 10px;
}
.title {
width: 56rem;
height: 14rem;
padding: 2rem;
text-align: center;
margin-top: 2rem;
}
.subtitle {
width: 58rem;
height: 10.5rem;
padding: 2rem;
margin-right: 33rem;
}

.container {
width: 80%;
margin: 3% auto 0;
display: inline-block;
gap: 1rem;
}

.logos-escuelas {
width: 20%;
margin: 2.2%;
position: relative;
cursor: pointer;
float: left;
transition: 0.3s ease-out;
}

.logos-escuelas:hover {
top: -5px;
}

button[type=button] {
font-size: 1.6rem;
cursor:pointer;
padding: .4rem;
width: 28%;
margin-bottom: 2rem;
border-width: 2px;
border-color: rgb(15, 56, 110);
border-radius: 1.3rem;
margin: 3rem 2% 1rem
}


.cardsContainer {
display: grid;
grid-template-columns: 200px 200px 200px 200px;
padding: 1rem;
place-content: center;
color: black;
}

.card {
box-shadow: 0 4px 8px 0 #1d5dab57;
transition: 0.3s;
padding: 1rem;
border-radius: 25px;
display:inline-table;
margin: 10px;
}

.card:hover {
box-shadow: 0 8px 16px 0 rgba(201, 169, 28, 0.915);
}

.infoCard {
padding: 2px 16px;
}

.hat-icon {
width: 6rem;
height: 7rem;
}

img {
border-radius: 5px 5px 0 0;
}

Binary file added src/images/Prototipos/HU Casas .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/images/Prototipos/HU Personajes Filtrados.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/Prototipos/HU Personajes.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.
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/tinified/castleHoghwarts.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/images/tinified/favicon_io/favicon-16x16.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/tinified/favicon_io/favicon-32x32.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/tinified/favicon_io/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions src/images/tinified/favicon_io/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
Binary file added src/images/tinified/gryfindor.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/tinified/haticon.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/tinified/homeicon3.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/tinified/hufflepuff.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/tinified/icono-az.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/tinified/iconoHP.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/tinified/logo-titulo.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/tinified/ravenclaw.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/tinified/slytherin.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/tinified/sort (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 53 additions & 3 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,62 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<title>Data Lovers</title>
<link rel="stylesheet" href="style.css" />
<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 Dani y Lau</title>
<link rel="stylesheet" href="./style.css" />
<link href="https://fonts.cdnfonts.com/css/harry-potter" rel="stylesheet">
<link rel="stylesheet" href="./desktop.css" media="screen and (min-width: 800px)">
<link rel="shortcut icon" href="./images/tinified/favicon_io/favicon-32x32.png" type="image/x-icon">
<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=Barlow:wght@100&family=Indie+Flower&family=Oswald:wght@200&family=Raleway:wght@100&display=swap" rel="stylesheet">

</head>
<body>
<header>
<nav>
<input type="image" class="home-icon" src="./images/tinified/castleHoghwarts.png" value="Reload Page" id="btn-refresh">
</nav>
</header>
<main>
<section id="indexOne">
<figure>
<img class="title" src="./images/tinified/logo-titulo.png" alt="Colegio Hogwarts">
</figure>

<h4>Wanna learn more about all the characters from Harry Potter? <br>
You are in the right place! ⚡️ </h4>
</section>

<section id="indexTwo">
<figure class="container">
<img class="logos-escuelas" id="gryfindor" src="./images/tinified/gryfindor.png" alt="Logo Gryfindor">
<img class="logos-escuelas" id="hufflepuff" src="./images/tinified/hufflepuff.png" alt="Logo Hufflepuff">
<img class="logos-escuelas" id="ravenclaw" src="./images/tinified/ravenclaw.png" alt="Logo Ravenclaw">
<img class="logos-escuelas" id="slytherin" src="./images/tinified/slytherin.png" alt="Logo Slytherin">
</figure>

<div>
<button type="button" id="cargarAPI"> Display all the characters from the Harry Potter
books.</button>
</div>

<div id="percentageBox"> Women <span id="spanPorcentajeMujeres"> </span> | Men <span id="spanPorcentajeHombres"> </span></div>

<figure>
<img src="./images/tinified/sort (1).png" alt="icono-ordenar" class="orderAZ" id="orderAZ">
</figure>

<div id="cards" class="cardsContainer"> </div>
</section>

</main>


<div id="root"></div>
<script src="main.js" type="module"></script>
</body>
</html>
</html>
Loading