Skip to content

Commit 3dae05e

Browse files
Kara HowesKara Howes
authored andcommitted
added assets and played with displaying lists
1 parent bd7c3fb commit 3dae05e

8 files changed

Lines changed: 11 additions & 3 deletions

File tree

code/.DS_Store

6 KB
Binary file not shown.
4.17 KB
Loading

code/assets/GitHub-Mark-32px.png

1.67 KB
Loading

code/assets/GitHub-Mark-64px.png

2.56 KB
Loading

code/assets/GitHub_Logo.png

12.7 KB
Loading

code/assets/GitHub_Logo_White.png

30.4 KB
Loading

code/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
<body>
1111
<h1>GitHub Tracker</h1>
1212
<h2>Projects:</h2>
13-
<main id="projects"></main>
13+
<main id="projects">
14+
15+
</main>
1416

1517
<!-- This will be used to draw the chart 👇 -->
1618
<canvas id="chart"></canvas>

code/script.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
const repoURL = 'https://api.github.com/users/KaraHowes/repos'
22

3+
34
fetch(repoURL)
45
.then((response)=>{
56
return response.json()
67
})
7-
.then((data)=>{
8-
console.log('DATA', data)
8+
.then((repo)=>{
9+
console.log(repo)
10+
projects.innerHTML = `The name of your first project was ${repo[0].name}`
11+
12+
repo.forEach(reponames => {
13+
projects.innerHTML += `<p> Project name ${reponames.name}</p>`
14+
});
915

1016
})

0 commit comments

Comments
 (0)