File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,31 +16,8 @@ <h2>Projects:</h2>
1616 < main id ="projects ">
1717
1818 </ main >
19- < section class ="cards-container ">
20- < section class ="html-card ">
21- < div class ="card-projectname " id ="cardProjectName ">
22- Project Name</ div >
23- < div class ="updated " id ="cardUpdated ">
24- Most recent update:
25- </ div >
26- < div class = "branch " id ="cardBranch ">
27- Name of default branch:
28- </ div >
29- < div class = "URL " id ="cardURL ">
30- URL:
31- </ div >
32- < div class = "number-commits " id ="cardCommits ">
33- Number of commit Messages:
34- </ div >
35- < div class = "blank-line " id ="cardBlank ">
36- blank
37- </ div >
38- < div class = "blank-line " id ="cardBlank ">
39- blank
40- </ div >
19+ < section class ="cards-container " id ="cards-container ">
4120
42-
43- </ section >
4421 </ section >
4522
4623 <!-- This will be used to draw the chart 👇 -->
Original file line number Diff line number Diff line change 11const USER = 'KaraHowes'
22const repoURL = `https://api.github.com/users/${ USER } /repos`
33const projectsContainer = document . getElementById ( 'projects' )
4+ const cardsContainer = document . getElementById ( 'cards-container' )
45
56const getRepos = ( ) => {
67
@@ -10,18 +11,39 @@ const getRepos = ()=>{
1011 console . log ( data )
1112 //projectsContainer.innerHTML = `The name of your first project was ${data[0].name}`
1213
13-
1414 const forkedProjects = data . filter ( repo => repo . fork && repo . name . startsWith ( 'project-' ) )
1515 forkedProjects . forEach ( repo => projectsContainer . innerHTML += `<h3>${ repo . name } </h3>` )
16+
17+ forkedProjects . forEach ( repo => cardsContainer . innerHTML += `
18+ <section class="js-card">
19+ <div class="card-projectname" id="cardProjectName">
20+ Project Name: <span>${ repo . name } </span></div>
21+ <div class="updated" id="cardUpdated">
22+ Most recent update:
23+ </div>
24+ <div class= "branch" id="cardBranch">
25+ Name of default branch: ${ repo . default_branch }
26+ </div>
27+ <div class= "URL" id="cardURL">
28+ URL: ${ repo . url }
29+ </div>
30+ <div class= "number-commits" id="cardCommits">
31+ Number of commit Messages:
32+ </div>
33+ <div class= "blank-line" id="cardBlank">
34+ blank
35+ </div>
36+ <div class= "blank-line" id="cardBlank">
37+ blank
38+ </div>
1639
40+
41+ </section>` )
42+
1743 drawChart ( forkedProjects . length )
1844 console . log ( 'hello' , forkedProjects . length )
1945
20-
21-
2246 }
23-
24-
2547 )
2648}
2749
You can’t perform that action at this time.
0 commit comments