Skip to content
This repository was archived by the owner on Jul 11, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
14a806d
Ingreso de data y algunas imagenes
MilenaPacheco Dec 29, 2023
8c3346d
verificación de data e img
olicrea Dec 31, 2023
fa360b1
se incluyeron rutas de imágenes faltantes
olicrea Jan 2, 2024
fbc5cb9
Merge pull request #1 from olicrea/main
MilenaPacheco Jan 2, 2024
fbdf146
se acomodó la data en formato jest
olicrea Jan 2, 2024
3b13b0f
Merge pull request #2 from olicrea/main
MilenaPacheco Jan 3, 2024
bc5cf15
data con imágenes correctas y uso de sort en js
olicrea Jan 4, 2024
9eebd07
Merge pull request #3 from olicrea/main
MilenaPacheco Jan 4, 2024
e0d7ecd
Para corregir Data en formato Jest
MilenaPacheco Jan 4, 2024
ab88736
Merge branch 'main' of github.com:MilenaPacheco/DEV013-dataverse
MilenaPacheco Jan 4, 2024
e3bec60
se inició función de renderizado y algunas reglas css
olicrea Jan 5, 2024
7bc9e18
Merge pull request #4 from olicrea/main
MilenaPacheco Jan 6, 2024
6540ee3
Merge branch 'main' of https://github.com/MilenaPacheco/DEV013-dataverse
MilenaPacheco Jan 7, 2024
1de9efc
Agregando algunas funciones de ordenado
MilenaPacheco Jan 7, 2024
b6bf1a9
Se agrego una renderización defiltro a modo de prueba
MilenaPacheco Jan 7, 2024
df0d669
fusión de códigos render y funciones sort además de ccs con tarjetas …
olicrea Jan 8, 2024
81a985c
Merge branch 'main' into main
olicrea Jan 8, 2024
beed447
Merge pull request #5 from olicrea/main
MilenaPacheco Jan 9, 2024
a0a03fe
Un filtro con renderizado
MilenaPacheco Jan 9, 2024
5f7ee3b
Merge branch 'main' of https://github.com/MilenaPacheco/DEV013-dataverse
MilenaPacheco Jan 9, 2024
ab0bec1
Ingreso de URL de imagenes pendientes
MilenaPacheco Jan 9, 2024
e35ab80
Funcion Boton
MilenaPacheco Jan 9, 2024
96d9941
Label y Selects del Header oculto ajustes de CSS y adición de género …
MilenaPacheco Jan 9, 2024
501e326
css con tarjetas
olicrea Jan 9, 2024
889711f
Merge branch 'main' of github.com:olicrea/DEV013-dataverse
olicrea Jan 9, 2024
52e8c4d
Merge branch 'main' of https://github.com/MilenaPacheco/DEV013-dataverse
olicrea Jan 9, 2024
216a9ca
ajuste de css con tarjetas del mismo tamaño
olicrea Jan 10, 2024
b699186
Merge pull request #6 from olicrea/main
MilenaPacheco Jan 10, 2024
5bfddf6
Resolver conflictos
MilenaPacheco Jan 10, 2024
6588dd0
Se agrego función sortData() y algo de computeStats()
MilenaPacheco Jan 11, 2024
81e7966
Adición Botón estadísticas y funciones generales
MilenaPacheco Jan 11, 2024
fa0e522
se modificó:data, funciones filter y sort, index, main, css y view
olicrea Jan 12, 2024
db50b21
Función de estadística y header con menú hambuerguesa
MilenaPacheco Jan 17, 2024
8a36ae7
funciones de estadística, html con botón hamburguesa, main con create…
olicrea Jan 17, 2024
e930462
se incluyó map, queryselector, se quitó biblioteca de hamburguer, se …
olicrea Jan 17, 2024
1cd03f5
Arreglo de Filtrado con estadísticas
MilenaPacheco Jan 17, 2024
a5f1d15
se organizaron las cards para que no se solapen
olicrea Jan 19, 2024
f47c0d7
avance en los tests
olicrea Jan 19, 2024
ef39c2f
TEST y Readme
MilenaPacheco Jan 23, 2024
95b9040
Readme actualizado
MilenaPacheco Jan 23, 2024
1cbcd7f
Readme algunos arreglos
MilenaPacheco Jan 23, 2024
32f1026
proyecto listo para pf
olicrea Jan 23, 2024
2556b77
se agregó visual de pantalla para desktop y para móvil en readme
olicrea Jan 23, 2024
05c8162
se agregó en html etiqueta de responsividad
olicrea Jan 24, 2024
42cba13
Merge branch 'main' into main
olicrea Jan 24, 2024
8e2e31d
Create jekyll-gh-pages.yml
olicrea Jan 24, 2024
4fb76ce
Create jekyll-gh-pages.yml
MilenaPacheco Jan 25, 2024
7bd1f3c
Update README.md
olicrea Jan 26, 2024
d9c8837
Update README.md
olicrea Jan 26, 2024
eec3164
Update README.md
olicrea Jan 26, 2024
bf03161
Update README.md
olicrea Jan 26, 2024
4af6057
Actualizar README.md
olicrea Jan 26, 2024
40bb79d
Actualizar README.md
olicrea Jan 26, 2024
fada11b
Actualizar README.md
olicrea Jan 26, 2024
cc8e488
Actualizar README.md
olicrea Jan 26, 2024
5c25e06
Actualizar README.md
olicrea Jan 26, 2024
d912a05
Actualizar README.md
olicrea Jan 26, 2024
3e424dc
Actualizar README.md
olicrea Jan 26, 2024
bad4b41
Actualizar README.md
olicrea Jan 26, 2024
dff5fca
Actualizar README.md
olicrea Jan 26, 2024
5faa66e
Actualizar README.md
olicrea Jan 26, 2024
c087ac5
Actualizar README.md
olicrea Jan 26, 2024
e4ae2d2
Update README.md
olicrea Jan 26, 2024
ba422df
Merge pull request #8 from olicrea/main
MilenaPacheco Jan 26, 2024
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
51 changes: 51 additions & 0 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll with GitHub Pages dependencies preinstalled

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./src
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
14 changes: 14 additions & 0 deletions .hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": [
"development"
],
"hints": {
"axe/language": [
"default",
{
"html-has-lang": "off"
}
],
"meta-viewport": "off"
}
}
1,113 changes: 491 additions & 622 deletions README.md

Large diffs are not rendered by default.

Binary file added image-1.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 image-2.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 image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
551 changes: 317 additions & 234 deletions src/data/dataset.js

Large diffs are not rendered by default.

130 changes: 125 additions & 5 deletions src/dataFunctions.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,129 @@
// Estas funciones son ejemplos, aquí puedes desarrollar tus propias funciones.
//Función que filtra
export const filterData = (data, filterBy, value) => {
const filterMovie = data.filter(film => film.facts[filterBy] === value);
return filterMovie;
};


//Función que ordena
export const sortData = (data, sortBy, sortOrder) => {
const sortedData = data.sort((a, b) => {
if (sortOrder === "asc") {
if (typeof a.facts[sortBy] === 'number') {
return a.facts[sortBy] - b.facts[sortBy];
} else {
return String(a[sortBy]).localeCompare(String(b[sortBy]));
}
} else {
if (typeof a.facts[sortBy] === 'number') {
return b.facts[sortBy] - a.facts[sortBy];
} else {
return String(b[sortBy]).localeCompare(String(a[sortBy]));
}
}
});
return sortedData;
};




//Función para clasificar películas de la data según score en Rotten Tomatoes.
export const computeStatsScore = (data) => {
// Quitar porcentaje en score data.extraInfo.rottenTomatoesScore
const scoreOut50 = data.filter((film) => {
const score = parseFloat(film.extraInfo.rottenTomatoesScore);
return 50 <= score && score < 70;
});

//console.log("Array de películas con puntaje mayor a 50 y menor a 70:");
//console.log(scoreOut50);

const scoreOut70 = data.filter((film) => {
const score = parseFloat(film.extraInfo.rottenTomatoesScore);
return 70 <= score && score < 90;
});

//console.log("Array de películas con puntaje mayor a 70 y menor a 90:");
//console.log(scoreOut70);

const scoreOut90 = data.filter((film) => {
const score = parseFloat(film.extraInfo.rottenTomatoesScore);
return 90 <= score && score <= 100;
});

//console.log("Array de películas con puntaje mayor o igual a 90 y menor o igual a 100:");
//console.log(scoreOut90);

export const example = () => {
return 'example';
const perOut50 = Math.round((scoreOut50.length * 100) / data.length);
//console.log("Porcentaje de películas con puntaje mayor a 50 y menor a 70:");
//console.log(perOut50);

const perOut70 = Math.round((scoreOut70.length * 100) / data.length);
//console.log("Porcentaje de películas con puntaje mayor a 70 y menor a 90:");
//console.log(perOut70);

const perOut90 = Math.round((scoreOut90.length * 100) / data.length);
//console.log("Porcentaje de películas con puntaje mayor o igual a 90 y menor o igual a 100:");
//console.log(perOut90);

return {
scoreOut50,
scoreOut70,
scoreOut90,
perOut50,
perOut70,
perOut90
};
};

export const anotherExample = () => {
return [];


//Función para calcular frecuencia de países.
export const computeStats = (data) => {
const countryFrequencies = data.map((movie) => {
const country = movie.extraInfo.countryMovie;
const name = movie.name;

return {
country,
movieName: name,
};
});

const countryFrequency = countryFrequencies.reduce((acumulador, movie) => {
const country = movie.country;

// Verificar si el país ya está en el acumulador
if (!acumulador[country]) {
acumulador[country] = {
count: 0,
movies: []
};
}

// Incrementar la frecuencia y agregar la película a la lista
acumulador[country].count += 1;
acumulador[country].movies.push(movie.movieName);

return acumulador;
}, {});

// Devolver la frecuencia de películas por país directamente
return countryFrequency;
};

/*export const filterData = (data, filterBy, value) => {
const filteredData = data.filter(film => film.facts[filterBy] === value);
return filteredData;
};*/

/*export const sortData = (data, sortBy, sortOrder) => {
//console.log(sortBy);
const copyArray = [...data];
if (sortBy === "name") {
return copyArray.sort((a, b) => (sortOrder === "asc" ? a[sortBy].localeCompare(b[sortBy]) : b[sortBy].localeCompare(a[sortBy])));
} else if (sortBy === "yearMovie") {
return copyArray.sort((a, b) => (sortOrder === "asc" ? a.facts[sortBy] - b.facts[sortBy] : b.facts[sortBy] - a.facts[sortBy]));
}
};*/
Binary file added src/img/2001.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/Hackers.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/MovieDev.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/img/algorithm.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/avengers-age-of-ultron.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/blade-runner.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/citizenfour.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/codegirl.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/e-dreams.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/ex-machina.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/ghost-in-the-shell.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/her.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/home.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/icons8-menú-16.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/indie-game-the-movie.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/jobs.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added src/img/menuHamb.svg
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/prompting/data1.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/prompting/data2.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/prompting/data3.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/prompting/data4.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/prompting/data5.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/prompting/revolution-os-prompt.png
Binary file added src/img/prompting/wall-e-prompt.png
Binary file added src/img/ready-player-one.jpeg
Binary file added src/img/revolution-os.jpeg
Binary file added src/img/short-circuit.png
Binary file added src/img/terminator.jpeg
Binary file added src/img/terms-and-conditions-may-apply.jpeg
Binary file added src/img/the-cleaners.png
Binary file added src/img/the-great-hack.jpeg
Binary file added src/img/the-imitation-game.jpeg
Binary file added src/img/the-martian.jpeg
Binary file added src/img/the-matrix.jpeg
Binary file added src/img/the-net.jpeg
Binary file added src/img/the-pirates-of-silicon-valley.jpeg
Binary file added src/img/the-social-dilemma.jpeg
Binary file added src/img/the-social-network.jpeg
Binary file added src/img/trippy-rgb.jpeg
Binary file added src/img/walle.png
Binary file added src/img/wargames.png
84 changes: 68 additions & 16 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,71 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Data Lovers</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header>
<h1>Hello!</h1>
</header>
<label for="women">Women</label>
<select name="women" id="women">

<head>
<meta charset="utf-8">
<title>MovieDev</title>
<link rel="stylesheet" href="style.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

<body>
<header>
<div class="title">
<h1>MovieDev</h1>
<button class="open-menu">
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="40" height="25" viewBox="0 0 24 24">
<path d="M5,7h2h12c1.1,0,2-0.9,2-2s-0.9-2-2-2H7H5C3.9,3,3,3.9,3,5S3.9,7,5,7z" fill="#1F0441"></path><path d="M19,10h-3H5c-1.1,0-2,0.9-2,2s0.9,2,2,2h11h3c1.1,0,2-0.9,2-2S20.1,10,19,10z" fill="#1F0441"></path><path d="M19,17h-6H5c-1.1,0-2,0.9-2,2s0.9,2,2,2h8h6c1.1,0,2-0.9,2-2S20.1,17,19,17z" fill="#1F0441"></path>
</svg>
</button>
</div>
</header>

<div class="inputs">
<label for="genre"><strong>Filtrar por género</strong></label>
<select name="genre" id="genre" data-testid="select-filter">
<option value="a" selected disabled>Selecciona filtro</option>
<option value="fiction">Ciencia Ficción</option>
<option value="animation">Animación</option>
<option value="thriller">Thriller</option>
<option value="documental">Documental</option>
<option value="drama">Drama</option>
</select>
<div id="root"></div>
<footer></footer>
<script src="main.js" type="module"></script>
</body>
</html>

<label for="alfa"><strong>Ordenar alfabéticamente</strong></label>
<select name="alfa" id="alfa" data-testid="select-sort">
<option value="a" selected disabled>Selecciona orden</option>
<option value="asc">A - Z</option>
<option value="desc">Z - A</option>
</select>

<label for="year"><strong>Ordenar por año</strong></label>
<select name="year" id="year" data-testid="select-sort-year">
<option value="a" selected disabled>Selecciona orden</option>
<option value="asc">Ascendente</option>
<option value="desc">Descendente</option>
</select>

<label for="statistics"><strong>Estadísticas RT</strong></label>
<select name="statistics" id="statistics">
<option value="a" selected disabled>Estadísticas</option>
<option value="score50">50% y 70% en RT</option>
<option value="score70">70% y 90% en RT</option>
<option value="score90">90% y 100% en RT</option>
</select>

<label for="statistics-country"><strong>Estadísticas por países</strong></label>
<select name="statistics-country" id="statistics-country">
<option value="a" selected disabled>Estadísticas</option>
<option value="country">Películas por país</option>
</select>

<button id="btn" data-testid="button-clear">Limpiar</button>

</div>

<div id="root"></div>
<footer>M.O.Dev</footer>
<script src="main.js" type="module"></script>
</body>

</html>
Loading