diff --git a/README.md b/README.md index 1613a3b0..05305f63 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,22 @@ -# GitHub Tracker - -Replace this readme with your own information about your project. - -Start by briefly describing the assignment in a sentence or two. Keep it short and to the point. +# GitHub Tracker๐ +This project was to create a place to keep track of the GitHub repos that I am using at Technigo. It was a good chance to practice JavaScript and API skills with the help of GitHub's own documentation. +# What Does it Include? +- A list of all repos that are forked ones from Technigo +- My username and profile picture +- Most recent update (push) for each repo +- Name of my 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 I've done so far, compared to how many I will do using +- ## 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? +Diving in to an APIโs documentation was a little bit overwhelming. +1. To get started with the project, I fetched all of the repos and log them to the console. +2. Then I filtered out and only show the forked projects another branch. +3. Then I filtered out only the forks from *Technigo*. I could use the fact that Technigo projects *start* with 'project-' and the filtering was based on that. ## 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://haruahn-github-tracker.netlify.app diff --git a/code/assets/background.jpg b/code/assets/background.jpg new file mode 100644 index 00000000..a862b8ef Binary files /dev/null and b/code/assets/background.jpg differ diff --git a/code/chart.js b/code/chart.js index 92e85a30..753876a2 100644 --- a/code/chart.js +++ b/code/chart.js @@ -1,4 +1,21 @@ -//DOM-selector for the canvas ๐ -const ctx = document.getElementById('chart').getContext('2d') +const ctx = document.getElementById("chart").getContext("2d"); -//"Draw" the chart here ๐ +// Chart +const drawChart = (numberOfProjects) => { + const config = { + type: "doughnut", + data: { + labels: ["Finished projects", "Projects left"], + datasets: [ + { + label: "Technigo Projects", + data: [numberOfProjects, 19 - numberOfProjects], + backgroundColor: ["rgb(255, 99, 132)", "rgb(255, 205, 86)"], + hoverOffset: 5, + }, + ], + }, + }; + + const reposChart = new Chart(ctx, config); +}; diff --git a/code/index.html b/code/index.html index 2fb5e0ae..243cdb7e 100644 --- a/code/index.html +++ b/code/index.html @@ -1,21 +1,48 @@ -
- - - -