-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/gablon29/Devoloper.Proyect
- Loading branch information
Showing
3 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
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,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<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>Document</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script src="index.js" type="module"></script> | ||
</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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
const API_URl = 'https://jsonplaceholder.typicode.com'; | ||
|
||
const HTMLResponse = document.querySelector("#app"); | ||
const ul = document.createElement('ul'); | ||
|
||
fetch(`${API_URl}/users`) | ||
.then((response) => response.json()) | ||
.then((users) => { | ||
users.forEach(user => { | ||
let elem = document.createElement('li'); | ||
elem.appendChild(document.createTextNode(`${user.name} 💌 ${user.email}`)) | ||
ul.appendChild(elem); | ||
}) | ||
|
||
HTMLResponse.appendChild(ul); | ||
|
||
// const tpl = users.map((user) => `<li>${user.name} 💌 ${user.email}</li>`); | ||
// HTMLResponse.innerHTML = `<ul>${tpl}</ul>`; | ||
}) | ||
|
||
|
||
// const xhr = new XMLHttpRequest(); | ||
|
||
// function onRequestHandler() { | ||
// if(this.readyState === 4 && this.status === 200){ | ||
// const data = JSON.parse(this.response); | ||
// const HTMLResponse = document.querySelector("#app"); | ||
|
||
// const tpl = data.map(user => `<li>${user.name} 💌 ${user.email}</li>`); | ||
|
||
|
||
// HTMLResponse.innerHTML = `<ul>${tpl}</ul>`; | ||
// } | ||
// } | ||
// xhr.addEventListener('load', onRequestHandler) | ||
// xhr.open('GET', `${API_URl}/users`); | ||
// xhr.send(); |
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 |
---|---|---|
|
@@ -50,7 +50,7 @@ | |
</div> | ||
</nav> | ||
|
||
<h1> Comision 5I</h1> | ||
<h1>Comision 5I</h1> | ||
|
||
<!--aqui comienza el carousel--> | ||
|
||
|