-
Notifications
You must be signed in to change notification settings - Fork 62
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
Dupla colaborativa: Olimpia Coria- Dianyela Maldonado #43
Open
DianyelaMaldonado
wants to merge
63
commits into
Laboratoria:master
Choose a base branch
from
DianyelaMaldonado:gh-pages
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
0ba6fc6
cambios realizados en index.html style.ccs main.js data.js
DianyelaMaldonado b120cc2
cambios
oo-li 73c59c5
cambios realizados en style.css
DianyelaMaldonado 9c3c216
src/style.css
oo-li 6f6e826
cambioooos
oo-li b3bc7f6
probandocambios con colaboradora
DianyelaMaldonado 16bb29b
Se hicieron cambios en style.css se corrigieron conflictos, se modifi…
DianyelaMaldonado 85897cc
Cambios en README.md se cambió información en el link de las imagenes…
DianyelaMaldonado 051811f
se agregaron cambios en README.md en imagenes de prototipo final, se …
DianyelaMaldonado c80e0db
En README.md en la línea 13 hasta la 18 de manifiesto se editó inform…
DianyelaMaldonado dd7e715
Se añadió informaciónen README.md en cuanto a historias de usuario y …
DianyelaMaldonado 905220f
Se añadieron cambios al archivo README.md, salto de línea
DianyelaMaldonado bbe9ebe
cambios realizados en Readme.md se añadió imagen prototipo en baja ca…
DianyelaMaldonado 4f91a63
Seañadió cambio en Readme.md nombre de imagen
DianyelaMaldonado 442deeb
cambios en readme.md
DianyelaMaldonado ab9def5
Se realizaron cambios en descripcion, archivo README.md
DianyelaMaldonado 7831eb3
cambios en README.md finalizando
DianyelaMaldonado 4e8fece
Se agregó en README.md contenido de objetivos de aprendizaje.
DianyelaMaldonado 7c99868
se agregaron cambios en README.md se editaron detalles en identación …
DianyelaMaldonado aa201e7
Merge pull request #1 from DianyelaMaldonado/feature/Cambios-readme
DianyelaMaldonado 4f85635
se agregaron cambios en style.css cambios en botones se cambió la ima…
DianyelaMaldonado 0738062
se agregó logo faltante de la app en readme.md
DianyelaMaldonado de59430
Merge pull request #2 from DianyelaMaldonado/feature/Cambios-readme
DianyelaMaldonado 9a1ec4f
cambios en carpetas index.html y style.css trabajando con responsive …
DianyelaMaldonado 883d141
Merge branch 'master' of https://github.com/DianyelaMaldonado/CDMX009…
DianyelaMaldonado 3e32739
cambis realizados en index.html, se añadió información para slider, y…
DianyelaMaldonado c7bb410
Merge pull request #3 from DianyelaMaldonado/feature/slider
DianyelaMaldonado 722f75b
cambios realizados en style.css en cuanto al responsive de la app, fa…
DianyelaMaldonado 744143d
Merge pull request #4 from DianyelaMaldonado/hotfix/ajustes-responsive
DianyelaMaldonado 8cda734
se añadió información en carpeta index.html section bottons, se había…
DianyelaMaldonado f865256
se añadieron imagenes en carpeta de readme, capturas muestra, referen…
DianyelaMaldonado 8e76d83
cambios en readme.md se añadió descripción y ejemplos en imagenes de …
DianyelaMaldonado 1f7d881
se agregaron cambios a readme.md se cambió informacion en nombre de l…
DianyelaMaldonado b1b12b3
se cambió nombre de imagen para hacer prueba de carga en readme.md
DianyelaMaldonado 9704815
cambios realizados en redme.md siguen pruebas para visualización de i…
DianyelaMaldonado 3c82f4d
cargando foto en archivo readme.md pruebas
DianyelaMaldonado c6525fd
cambios en readme.md se cambio el nombre del merch para probar si por…
DianyelaMaldonado a0582ff
en readme.md se cambio el link de imagen en la carpeta readme se añad…
DianyelaMaldonado 691718f
Merge pull request #5 from DianyelaMaldonado/feacture/descripcion-res…
DianyelaMaldonado 810732e
se añadieron cambios en readme.md intentando cargar imagen
DianyelaMaldonado 27ef100
Merge pull request #6 from DianyelaMaldonado/feacture/descripcion-res…
DianyelaMaldonado c48cf39
se añadieron cambios en data.js y en index.html la función del filtro…
DianyelaMaldonado 2cc3d6c
Merge pull request #7 from DianyelaMaldonado/feature/filtros
DianyelaMaldonado 16a9aed
se añadió cambio en readme.md se cambió en enlace de la imagen del pr…
DianyelaMaldonado a40369e
se agregaron cambios en dat.js en links de imagenes para la funcional…
DianyelaMaldonado 0de7354
Merge pull request #8 from DianyelaMaldonado/feature/probando-link-api
DianyelaMaldonado 6bb08aa
se agrego nueva línea de código al archivo data.js
DianyelaMaldonado 1f9f079
Merge pull request #9 from DianyelaMaldonado/feature/probando-link-api
DianyelaMaldonado 5f97122
probando carpeta docs
DianyelaMaldonado bb7d156
cambios en data.js docs https
DianyelaMaldonado e0cfe57
se eliminó carpeta docs
DianyelaMaldonado 839e8af
Merge pull request #10 from DianyelaMaldonado/gh-pages
DianyelaMaldonado 1c26f2f
se añadió en redme.md link de git hub pages con la app funcional
DianyelaMaldonado 2b84e6f
se corrigió información en readme.md con respecto al link de la app f…
DianyelaMaldonado 50fe255
Merge pull request #11 from DianyelaMaldonado/feacture/readme-cambio-…
DianyelaMaldonado fca2bdb
I created a new helpers folder where I separated the functions that w…
DianyelaMaldonado a3c86d2
In file data.js
DianyelaMaldonado 4a4c3b5
Some dependencies in package.json were removed to test
DianyelaMaldonado 50ea97f
add changes in readme.md
DianyelaMaldonado 9feb35b
Merge pull request #12 from DianyelaMaldonado/feature/new-changes--co…
DianyelaMaldonado bfe0a15
move position of image in readme.md
DianyelaMaldonado 4f673a8
Merge pull request #13 from DianyelaMaldonado/feature/new-changes--co…
DianyelaMaldonado 161a273
Merge pull request #14 from DianyelaMaldonado/master
DianyelaMaldonado File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
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.
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.
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.
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,25 @@ | ||
{ | ||
"name": "data-lovers", | ||
"version": "1.0.0", | ||
"main": "src/index.html", | ||
"license": "MIT", | ||
"scripts": { | ||
"htmlhint": "htmlhint src/*.html test/*.html", | ||
"eslint": "eslint --ext .js src/ test/", | ||
"pretest": "npm run eslint && npm run htmlhint", | ||
"test": "jest --verbose --coverage", | ||
"open-coverage-report": "opener ./coverage/lcov-report/index.html", | ||
"start": "serve ./src" | ||
}, | ||
"dependencies": { | ||
"@babel/core": "^7.6.2", | ||
"@babel/plugin-transform-modules-commonjs": "^7.6.0", | ||
"babel-jest": "^24.9.0", | ||
"htmlhint": "^0.11.0", | ||
"jest": "^24.9.0", | ||
"opener": "^1.5.1", | ||
"serve": "^11.0.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^6.5.1", | ||
"eslint-config-airbnb-base": "^14.0.0", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-jest": "^22.19.0" | ||
} | ||
"name": "data-lovers", | ||
"version": "1.0.0", | ||
"main": "src/index.html", | ||
"license": "MIT", | ||
"scripts": { | ||
"test": "jest --verbose --coverage", | ||
"start": "serve ./src" | ||
}, | ||
"dependencies": { | ||
"@babel/core": "^7.6.2", | ||
"@babel/plugin-transform-modules-commonjs": "^7.6.0", | ||
"babel-jest": "^24.9.0", | ||
"htmlhint": "^0.11.0", | ||
"jest": "^24.9.0", | ||
"opener": "^1.5.1", | ||
"serve": "^11.0.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^6.5.1", | ||
"eslint-config-airbnb-base": "^14.0.0", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-jest": "^22.19.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
// import data from './data/injuries/injuries.js'; | ||
// import data from './data/lol/lol.js'; | ||
// import data from './data/patient/patient.js'; | ||
// import data from './data/pokemon/pokemon.js'; | ||
// import data from './data/rickandmorty/rickandmorty.js'; | ||
// import data from './data/steam/steam.js'; | ||
// import data from './data/steam/worldbank.js'; | ||
import { cargarJSON } from './helpers/cargarjsonone.js'; | ||
|
||
// esta es una función de ejemplo | ||
|
||
export const example = () => { | ||
return 'example'; | ||
}; | ||
document.addEventListener("DOMContentLoaded", function() { | ||
let cardsprueba = document.querySelector('#cardsprueba'); | ||
cargarJSON(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { championDetail } from './championdetail.js'; | ||
import { filterChamps } from './filterchamps.js'; | ||
|
||
function cargarJSON() { | ||
fetch('https://ddragon.leagueoflegends.com/cdn/10.6.1/data/en_US/champion.json') | ||
.then(res => { | ||
return res.json() | ||
}) | ||
.then(function(result_json) { | ||
let html = ''; | ||
let champions = result_json.data; | ||
window.champions = champions; | ||
for (let champion in champions) { | ||
let data_champion = champions[champion]; | ||
|
||
html += `<div class="tarjeta-wrap"> | ||
<div class="tarjeta" data-nombre="${data_champion['id']}"> | ||
<div class="adelante card1"> | ||
<h2>${data_champion['name']}</h2> | ||
<img class="img-fluid" src="https://ddragon.leagueoflegends.com/cdn/img/champion/splash/${data_champion['id']}_0.jpg" alt=""> | ||
</div> | ||
<div class="atras"> | ||
<p class="card-text">#${data_champion['blurb']}</p> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
} | ||
cardsprueba.innerHTML = html; | ||
}) | ||
.then(function() { | ||
championDetail(); | ||
}) | ||
.then(function() { | ||
filterChamps(); | ||
}) | ||
} | ||
|
||
export { cargarJSON } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
function cargarJSONdos(nombreCampeon) { | ||
let onlyChampion = document.querySelector('#onlyChampion'); | ||
fetch('https://ddragon.leagueoflegends.com/cdn/10.5.1/data/en_US/champion/' + nombreCampeon + '.json') | ||
.then(res2 => { | ||
return res2.json() | ||
}) | ||
.then(function(result_json2) { | ||
let html2 = ""; | ||
let data_avat = result_json2.data[nombreCampeon]; | ||
html2 += ` <div class="contentChampionInfo"> | ||
<div> | ||
<div class="imgprincipal"> | ||
<img class="ImgChampionInfo" src="https://ddragon.leagueoflegends.com/cdn/img/champion/splash/${nombreCampeon}_0.jpg" alt=""> | ||
<div class="sobrelaimagen"> | ||
<div class="nametitle"> | ||
<h2 class="positionName">${data_avat['name']}</h2> | ||
</div> | ||
|
||
<div class="positionRol"> | ||
<p class="tags">${data_avat['tags']}</p> | ||
</div> | ||
<div class="positionTitle"> | ||
<p class="title">${data_avat['title']}"</p> | ||
</div> | ||
</div> | ||
<div class="sombra"></div> | ||
</div> | ||
</div> | ||
<div class="listahabilidades"> | ||
<p class="infohabilidades">ABILITIES</p> | ||
<ul> | ||
<li class="attack"> | ||
<img class="imghab" src="imagenes/atacke.png" alt=""> | ||
<p>Attak ${data_avat['info'].attack}</p> | ||
</li> | ||
<li class="defense"> | ||
<img class="imghab" src="imagenes/escudo.png" alt=""> | ||
<p>defense ${data_avat['info'].defense} </p> | ||
</li> | ||
<li class="magic"> | ||
<img class="imghab" src="imagenes/maguc.png" alt=""> | ||
<p>magical ${data_avat['info'].magic}</p> | ||
</li> | ||
<li class="difficulty"> | ||
<img class="imghab" src="imagenes/flame.png" alt=""> | ||
<p>difficulty ${data_avat['info'].difficulty}</p> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="bioLoreBlurb"> | ||
<p class="lore"> ${data_avat['lore']}</p> | ||
</div> | ||
|
||
<button id="buttonback" class="buttonchamps">COME BACK</button> | ||
</div> `; | ||
|
||
onlyChampion.innerHTML = html2; | ||
|
||
}).then(function() { | ||
window.scrollTo(0, 0); | ||
}) | ||
|
||
.then(function() { | ||
back(); | ||
}) | ||
} | ||
|
||
export { cargarJSONdos } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { cargarJSONdos } from './cargarjsontwo.js'; | ||
|
||
function championDetail() { | ||
let callcard = document.querySelectorAll(".tarjeta"); | ||
callcard.forEach(function(card) { | ||
card.onclick = function() { | ||
cargarJSONdos(this.getAttribute("data-nombre")); | ||
} | ||
}); | ||
} | ||
|
||
export { championDetail } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { championDetail } from './championdetail.js'; | ||
|
||
function filterChamps() { | ||
let html3 = ""; | ||
let filteredChamps = ""; | ||
const champsToFilter = Object.entries(window.champions); | ||
let filterButtons = document.querySelectorAll(".filter"); | ||
for (const filterButton of filterButtons) { | ||
filterButton.addEventListener('click', function() { | ||
html3 = ""; | ||
let championType = this.getAttribute("data-type"); | ||
if (championType == "All") { | ||
filteredChamps = champsToFilter; | ||
} else { | ||
filteredChamps = champsToFilter.filter(function(item) { | ||
let tags = item[1]["tags"]; | ||
return tags.includes(championType); | ||
}); | ||
|
||
} | ||
|
||
for (let key in filteredChamps) { | ||
let data_champion = filteredChamps[key][1]; | ||
html3 += `<div class="tarjeta-wrap"> | ||
<div class="tarjeta" data-nombre="${data_champion['id']}"> | ||
<div class="adelante card1"> | ||
<h2>${data_champion['name']}</h2> | ||
<img class="img-fluid" src="https://ddragon.leagueoflegends.com/cdn/img/champion/splash/${data_champion['id']}_0.jpg" alt=""> | ||
</div> | ||
<div class="atras"> | ||
<p class="card-text">#${data_champion['blurb']}</p> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
} | ||
cardsprueba.innerHTML = html3; | ||
championDetail(); | ||
}); | ||
} | ||
} | ||
export { filterChamps } |
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.
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.
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.
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.
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.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,74 @@ | ||
<!DOCTYPE html> | ||
<html lang="es"> | ||
<head> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Data Lovers</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Data Lovers </title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="viewport" content="user-scalable=no, initial-scale=1, minimun-scale=1,width=device-width"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<link rel="stylesheet" href="style.css" /> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="main.js"></script> | ||
</body> | ||
</html> | ||
<link href="https://fonts.googleapis.com/css?family=Russo+One&display=swap" rel="stylesheet"> | ||
</head> | ||
|
||
<body> | ||
<div class="container"> | ||
<section class="encabezado"> | ||
<header class="header"> | ||
<div class="center"> | ||
<!-- LOGO --> | ||
<div class="logo"> | ||
<br><img src="imagenes/logofinal.png" alt=""> | ||
<span class="brand"> | ||
<!--el titulo del sitio--> | ||
ON-RANKEDS | ||
</span> | ||
</div> | ||
<div class="clearfix"></div> | ||
</div> | ||
</header> | ||
</section> | ||
|
||
|
||
<section id="top"> | ||
<h2 class="title"> CHALLENGE <br> YOURSELF </h2> | ||
|
||
<div id="sliderall" class="slider"> | ||
<div id="contentslider" class="slidecontent"> | ||
<ul id="sliderlist" class="slidecontentlist"> | ||
<li id="one" class="slide1"> <img src="imagenes/Emblem_Challenger8.png"></li> | ||
</ul> | ||
</div> | ||
<div class="buttons"> | ||
<button id="prev" class="buttonprev"> < </button> | ||
<button id="next" class="buttonext"> > </button> | ||
</div> | ||
</div> | ||
<div id="reflector"> </div> | ||
<div> | ||
<h1 class="probandotitulo">ACTIVATE THE GREATEST POWER WE ARE <br> IT WAS GRANTED OF KNOWLEDGE</h1> | ||
</div> | ||
</section> | ||
<section id="bottons"> | ||
<div class="botonera"> | ||
<nav class="menu"> | ||
<ul> | ||
<li> <button class="filter" data-type="Assassin">ASSASSIN <img class="b1" src="imagenes/assassin2.png"> </button> </li> | ||
<li> <button class="filter" data-type="Fighter">FIGHTER <img class="b2" src="imagenes/fighter2.png"> </button> </li> | ||
<li> <button class="filter" data-type="Mage">MAGE <img class="b3" src="imagenes/mage2.png"> </button> </li> | ||
<li> <button class="filter" data-type="Marksman">MARKSMAN<img class="b4" src="imagenes/marksman2.png"> </button> </li> | ||
<li> <button class="filter" data-type="Support"> SUPPORT<img class="b5" src="imagenes/support2.png"> </button> </li> | ||
<li> <button class="filter" data-type="Tank"> TANK<img class="b6" src="imagenes/tank2.png"> </button> </li> | ||
<li> <button class="filter" data-type="All"> ALL CHAMPS<img class="b7"> </button> </li> | ||
</ul> | ||
</nav> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hay que ser más consistentes con los espacios. |
||
</div> | ||
</section> | ||
<div id="cardsprueba" class="wrap"></div> | ||
<div id="onlyChampion"></div> | ||
<script type="text/javascript" src="main.js"></script> | ||
<script type="module" src="data.js"></script> | ||
</div> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,51 @@ | ||
import { example } from './data.js'; | ||
function back() { | ||
let buttonBack = document.getElementById("buttonback"); | ||
buttonBack.onclick = function() { | ||
document.getElementById("onlyChampion").innerHTML = ""; | ||
} | ||
} | ||
|
||
console.log(example); | ||
let buttonnext = document.getElementById("next"); | ||
let buttonprev = document.getElementById("prev"); | ||
let encounter = document.querySelector("div#sliderall div#contentslider ul#sliderlist li#one img"); | ||
let nextimage = 1; | ||
let previmage = 7; | ||
let slider = new Array(); | ||
slider[0] = "imagenes/Emblem_Challenger8.png"; | ||
slider[1] = "imagenes/Emblem_Grandmaster7.png"; | ||
slider[2] = "imagenes/Emblem_Master6.png"; | ||
slider[3] = "imagenes/Emblem_Diamond5.png"; | ||
slider[4] = "imagenes/Emblem_Gold4.png"; | ||
slider[5] = "imagenes/Emblem_Silver3.png"; | ||
slider[6] = "imagenes/Emblem_Bronze2.png"; | ||
slider[7] = "imagenes/Emblem_Iron1.png"; | ||
let total = slider.length - 1; | ||
|
||
|
||
buttonnext.onclick = function() { | ||
encounter.src = slider[nextimage]; | ||
if (nextimage == total) { | ||
nextimage = 0; | ||
} else { | ||
nextimage++; | ||
} | ||
if (previmage == total) { | ||
previmage = 0; | ||
} else { | ||
previmage++; | ||
} | ||
} | ||
|
||
buttonprev.onclick = function() { | ||
encounter.src = slider[previmage]; | ||
if (previmage == 0) { | ||
previmage = total; | ||
} else { | ||
previmage--; | ||
} | ||
if (nextimage == 0) { | ||
nextimage = total; | ||
} else { | ||
nextimage--; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Borrar espacions y comentarios innecesarios.