diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..ad08d525 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +code/secret.js diff --git a/README.md b/README.md index 1613a3b0..25bfc5d3 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,21 @@ # GitHub Tracker -Replace this readme with your own information about your project. +Assignment is to build a site that shows info about our github account and the projects we've created to far. +The following points is what is required to be shown. -Start by briefly describing the assignment in a sentence or two. Keep it short and to the point. +- A list of all repos that are forked ones from Technigo +- Your username and profile picture +- Most recent update (push) for each repo +- Name of your default branch for each repo +- URL to the actual GitHub repo +- Number of commit messages for each repo +- All pull requests +- A chart of how many projects you've done so far, compared to how many you will have done. ## The problem -Describe how you approached to problem, and what tools and techniques you used to solve it. How did you plan? What technologies did you use? If you had more time, what would be next? +I used fetch to get the user data, which required 3 fetches - user data, pull requests, and commits. The styling was kept simple since the focus was to be able to display all the different data that was required. The biggest problem was data retrieval and getting it to actually show up on the site. The second biggest problem I had was that I had set up the fetches to all finish before moving on to displaying the data so the site took a very long time to load. That has been slightly remedied by splitting up the code into separate fetches but it still takes a fairly long time for the site to load. ## View it live -Every project should be deployed somewhere. Be sure to include the link to the deployed project so that the viewer can click around and see what it's all about. +https://github-tracker-at.netlify.app/ diff --git a/code/chart.js b/code/chart.js index 92e85a30..96acf6eb 100644 --- a/code/chart.js +++ b/code/chart.js @@ -2,3 +2,18 @@ const ctx = document.getElementById('chart').getContext('2d') //"Draw" the chart here 👇 + +const myChart = (numberOfProjects) => { + new Chart(ctx, { + type: 'pie', + data: { + labels: ['Completed', 'To be done'], + datasets: [{ + label: 'My First dataset', + backgroundColor: ['#cc5500', '#3a3a3a'], + borderColor: '#F4F4F4', + data: [numberOfProjects, 19 - numberOfProjects], + }] + } + }) +} \ No newline at end of file diff --git a/code/index.html b/code/index.html index 2fb5e0ae..7d613e31 100644 --- a/code/index.html +++ b/code/index.html @@ -6,16 +6,34 @@