diff --git a/README.md b/README.md index 1613a3b0..952f5a32 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,11 @@ -# GitHub Tracker +# 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. +This weeks project was to create a GitHub tracker using JavaScript and GitHub API. ## 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 started the project by fetching the data and filtered the repositories I wanted to show on my site. My main struggle this week was JavaScript, I found it hard to create more structure of it. To solve my problem I discussed a lot with my team and asked questions in StackOverflow. If I had more time I would like to fetch more data to display on my page, and also make it even more responsive. ## 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-emmajosefina.netlify.app/ diff --git a/code/.gitignore b/code/.gitignore new file mode 100644 index 00000000..da320979 --- /dev/null +++ b/code/.gitignore @@ -0,0 +1,2 @@ +// .gitignore file +secret.js \ No newline at end of file diff --git a/code/chart.js b/code/chart.js index 92e85a30..b2b4020c 100644 --- a/code/chart.js +++ b/code/chart.js @@ -1,4 +1,34 @@ -//DOM-selector for the canvas 👇 -const ctx = document.getElementById('chart').getContext('2d') +const ctx = document.getElementById('chart').getContext('2d') + +const renderChart = (completedProjects) => { + + + const labels = [ + 'Projects done', + 'Projects left to do' + ]; + + const data = { + labels: labels, + datasets: [{ + backgroundColor: 'rgb(217, 169, 165)', + label: 'Technigo Projects', + borderColor: 'rgb(192, 113, 106)', + data: [completedProjects, 19-completedProjects], + }] + }; + + const config = { + type: 'bar', + data: data, + options: { + responsive: true, + } + }; + + + new Chart( + document.getElementById('chart'), + config +)} -//"Draw" the chart here 👇 diff --git a/code/images/github-logo-extra-big.png b/code/images/github-logo-extra-big.png new file mode 100644 index 00000000..192846a1 Binary files /dev/null and b/code/images/github-logo-extra-big.png differ diff --git a/code/images/github-logo-small.png b/code/images/github-logo-small.png new file mode 100644 index 00000000..628da97c Binary files /dev/null and b/code/images/github-logo-small.png differ diff --git a/code/index.html b/code/index.html index 2fb5e0ae..c5af9a72 100644 --- a/code/index.html +++ b/code/index.html @@ -4,18 +4,59 @@ -
+
+