Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f38580d
Add: select filter and search
sofia-torres-v Mar 17, 2023
e540014
Add:filter by gender
sofia-torres-v Mar 17, 2023
66f1e4b
Merge pull request #1 from Sofiauldemia/sofy
andrenavas Mar 17, 2023
2cf86d4
Add: order by alphabet
andrenavas Mar 17, 2023
a7677ca
Merge pull request #2 from Sofiauldemia/andre
sofia-torres-v Mar 17, 2023
287bf3e
Add: styles
sofia-torres-v Mar 17, 2023
d66a80f
Merge pull request #3 from Sofiauldemia/sofy
andrenavas Mar 17, 2023
e1e99b6
Add: functions on data and new readme
andrenavas Mar 17, 2023
29b333f
Merge pull request #4 from Sofiauldemia/andre
sofia-torres-v Mar 17, 2023
59bf173
Add: main.js
sofia-torres-v Mar 17, 2023
ce6df51
Merge pull request #5 from Sofiauldemia/sofy
andrenavas Mar 17, 2023
05ed625
Add: info back card in main, test for functions and images readme
andrenavas Mar 17, 2023
967ce3d
Merge pull request #6 from Sofiauldemia/andre
sofia-torres-v Mar 17, 2023
5d3be2f
Function calculate percentage by gender
andrenavas Mar 22, 2023
37091f1
Merge pull request #7 from Sofiauldemia/andre
sofia-torres-v Mar 22, 2023
7c5facb
statisctics function bye gender
sofia-torres-v Mar 22, 2023
7293cdb
Merge branch 'main' into sofy
andrenavas Mar 22, 2023
09beee8
Merge pull request #8 from Sofiauldemia/sofy
andrenavas Mar 22, 2023
dc742d9
Function general filter, limited characters
andrenavas Mar 22, 2023
d779d58
Merge pull request #9 from Sofiauldemia/andre
sofia-torres-v Mar 22, 2023
478d353
changes in main.js
sofia-torres-v Mar 22, 2023
338b3e5
changes
sofia-torres-v Mar 23, 2023
ffd409d
Resolviendo conflictos main.js
sofia-torres-v Mar 23, 2023
23157ca
save changes
sofia-torres-v Mar 24, 2023
6c5549c
Merge pull request #10 from Sofiauldemia/sofy
andrenavas Mar 24, 2023
a908938
nesting the filters and completing the tests
andrenavas Mar 24, 2023
a8f2e1a
Merge branch 'main' into andre
andrenavas Mar 24, 2023
49ee547
Merge pull request #11 from Sofiauldemia/andre
sofia-torres-v Mar 24, 2023
047649a
latest code indentation fix
sofia-torres-v Mar 24, 2023
1c7d478
Merge pull request #12 from Sofiauldemia/sofy
andrenavas Mar 24, 2023
efd8af6
final fix in readme
andrenavas Mar 24, 2023
7d4e6dd
Merge remote-tracking branch 'origin/main' into andre
andrenavas Mar 24, 2023
54748ce
final readme
andrenavas Mar 24, 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
618 changes: 89 additions & 529 deletions README.md

Large diffs are not rendered by default.

7,515 changes: 7,515 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

43 changes: 38 additions & 5 deletions src/data.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,42 @@
// estas funciones son de ejemplo
export const searchByName = (data,name) => {
return data.filter((characters) => {
return characters.name.toLowerCase().includes(name.toLowerCase());
})
};

export const example = () => {
return 'example';
export const filterGeneral = (data,propiedad,option) => {
return data.filter((characters) => {
return characters[propiedad].includes(option);
})
};

export const anotherExample = () => {
return 'OMG';
export const filterByGender = (data,gender) => {
return data.filter((characters) => {
return characters.gender.includes(gender);
})
};


export const filterByOrderAZ = (characters) => {
return characters.sort((a,b) => {
if (a.name < b.name) {
return -1;
}
})
};

export const filterByOrderZA = (characters) => {
return characters.sort((a,b) => {
if (a.name > b.name) {
return -1;

}
})
}

export const calculate = (param,data) => {
const percentage = param.length / data.length * 100

return percentage.toFixed(2)
}

Binary file added src/images/characters.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/figma-hu1.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/figma-hu2.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/figma-hu3.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/figma-hu4.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/figma-hu5.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/filter.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/flip.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/fondo4.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/github.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/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/images/order.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/prototipo-baja-hu1.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/prototipo-baja-hu2.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/prototipo-baja-hu3.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/prototipo-baja-hu4.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/prototipo-baja-hu5.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/rickandmorty.webp
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/rmlogo1.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/rym.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/search.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/statistics.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/test.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
129 changes: 123 additions & 6 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,129 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Data Lovers</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rick and Morty Lovers</title>
<link rel="shortcut icon" href="./images/rmlogo1.png"/>
<link rel="stylesheet" href="style.css" />
</head>

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

<div class="content-nav" >

<nav class="nav container">
<ul class="link" >
<li><a class="items" href="">Home</a></li>
<li id="showCharacters"><a class="items" href="">Characters</a></li>
<li id="statistics"><a class="items" href="">Statistics</a></li>
</ul>

<div class="content-inp-icon">
<input class="inp" id="search" type="search" placeholder="Search Characters">
<img src="./images/search.png" class="icon" alt="search">
</div>
</nav>

</div>

<img src="./images/rym.png " alt="logoRickAndMorty" class="logo">

<div class="content-select-all container ">

<div class="group-select">
<label class="label" for="">Filter by</label>
<select name="filter" class="select" id="select-species">
<option disabled selected value="-SPECIES-">-SPECIES-</option>
<option value="Humanoid">Humanoid</option>
<option value="Robot">Robot</option>
<option value="Human">Human</option>
<option value="Alien">Alien</option>
<option value="Cronenberg">Cronenberg</option>
<option value="Disease">Disease</option>
<option value="Parasite">Parasite</option>
<option value="Mytholog">Mytholog</option>
<option value="Animal">Animal</option>
</select>
</div>

<div class="group-select">
<label class="label" for="">Filter by</label>
<select name="filter" class="select" id="select-gender">
<option disabled selected value="-GENDER-">-GENDER-</option>
<option value="Female">Female</option>
<option value="Male">Male</option>
<option value="unknown">unknown</option>
<option value="Genderless">Genderless</option>
</select>
</div>

<div class="group-select">
<label class="label" for="">Order by</label>
<select name="order" class="select" id="select-order">
<option disabled selected>-ALPHABET-</option>
<option value="Ascending">Ascending</option>
<option value="Descending">Descending</option>
</select>
</div>

</div>

</header>

<main>

<section class="content ">
<div class="container-cards" id="container-cards"></div>
</section>

<section>
<div class="characters" id="characters"></div>
</section>

<section class="modal">

<div class="modal_container">
<h2 class="modal_title"> Character stats by gender </h2>

<div id="box-statistics">
</div>

<button type="button" class="modal_close">Close</button>
</div>

</section>

</main>

<footer class="footer">

<div class="content-footer container">

<div class="sofy">
<img src="./images/github.png" class="logoGitHub" alt="logoGitHub">
<span>
<a href="https://github.com/Sofiauldemia/" target="_blank" class="link-github"> Sofía Torres </a>
</span>
</div>

<div class="andre">
<img src="./images/github.png" class="logoGitHub" alt="logoGitHub">
<span>
<a href="https://github.com/andrenavas/" target="_blank" class="link-github"> Andre Navas </a>
</span>
</div>

</div>

</footer>


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

</body>
</html>

</html>
Loading