diff --git a/README.md b/README.md index 1613a3b0..89cbefb6 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,16 @@ # 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 week's assignment is about exploring more about API and JavaScript. +We are suppose to create a GitHub Tracker, to keep track of our repos that we have created at Technigo. +Throughout the Technigo boot camp (24 weeks) we will be doing 19 different projects. ## 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? +When reading this week's project, I did not really know how to start with this assignment. It was a link to GitHub's own documentation and some example of different Endpoints we can use. +We didn't get any particular design or style to get inspired by. So it took some time to think and plan on how to structure the data we get from GitHub. But it was quite nice to try to practice designing yourself without some standard requirements. +The documentation from GitHub was massive! So it was easier to Google and apparently many had the same problems as I did. It helped a lot, especially Stack Overflow. +If I had more time I would want to tackle the higher level requirements such as adding a search field or try to sort the repos. ## 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. +Netlify link: https://katiewu1-githubtracker.netlify.app/ diff --git a/code/assets/Octocat.png b/code/assets/Octocat.png new file mode 100644 index 00000000..91057da4 Binary files /dev/null and b/code/assets/Octocat.png differ diff --git a/code/assets/bg-image.jpg b/code/assets/bg-image.jpg new file mode 100644 index 00000000..669d1852 Binary files /dev/null and b/code/assets/bg-image.jpg differ diff --git a/code/assets/email.png b/code/assets/email.png new file mode 100644 index 00000000..6e410e3a Binary files /dev/null and b/code/assets/email.png differ diff --git a/code/assets/favicon.png b/code/assets/favicon.png new file mode 100644 index 00000000..07deb6d2 Binary files /dev/null and b/code/assets/favicon.png differ diff --git a/code/assets/github.png b/code/assets/github.png new file mode 100644 index 00000000..d0a89ff8 Binary files /dev/null and b/code/assets/github.png differ diff --git a/code/assets/linkedin.png b/code/assets/linkedin.png new file mode 100644 index 00000000..4067bdd7 Binary files /dev/null and b/code/assets/linkedin.png differ diff --git a/code/assets/loading.gif b/code/assets/loading.gif new file mode 100644 index 00000000..7bdae668 Binary files /dev/null and b/code/assets/loading.gif differ diff --git a/code/chart.js b/code/chart.js index 92e85a30..3e235d80 100644 --- a/code/chart.js +++ b/code/chart.js @@ -1,4 +1,84 @@ -//DOM-selector for the canvas 👇 -const ctx = document.getElementById('chart').getContext('2d') +const ctx = document.getElementById('progressChart').getContext('2d'); -//"Draw" the chart here 👇 +// function to draw the Progress Chart, we have passed in amount of repos as an argument +const drawProgressChart = (amountOfRepos) => { + const data = { + labels: ['Finished Projects', 'Unfinished Projects'], + datasets: [ + { + label: 'Technigo boot camp projects', + data: [amountOfRepos, 19 - amountOfRepos], + // length of the repo array, total 19 projects minus length of the repo array + backgroundColor: ['rgb(255, 99, 132)', 'rgb(255, 205, 86)'], + hoverOffset: 4, + }, + ], + }; + const config = { + type: 'doughnut', + data: data, + options: { + plugins: { + legend: { + labels: { + color: 'white', + font: { + size: 12, + }, + }, + }, + }, + }, + }; + const progressChart = new Chart(ctx, config); +}; + +// function to draw the Language Chart with three arguments +const drawLanguagesChart = (html_percent, css_percent, js_percent) => { + // put the variable for the second canvas here because + // the id="languageChart" hasn't been created yet because of innerHTML in script.js + // if we put it at start of the chart.js, we wouldn't know what languageChart is + const ctx_languages = document.getElementById('languagesChart'); + const data_2 = { + labels: ['HTML', 'CSS', 'Javascript'], + datasets: [ + { + label: 'Language use (percentage)', + data: [html_percent, css_percent, js_percent], + backgroundColor: [ + 'rgb(255, 159, 64)', + 'rgb(128, 0, 128)', + 'rgb(255, 205, 86)', + ], + borderColor: [ + 'rgba(255, 159, 64, 0.2)', + 'rgb(128, 0, 128, 0.2)', + 'rgba(255, 205, 86, 0.2)', + ], + borderWidth: 2, + }, + ], + }; + + const stackedBar = new Chart(ctx_languages, { + type: 'bar', + data: data_2, + options: { + scales: { + y: { + beginAtZero: true, + }, + }, + plugins: { + legend: { + labels: { + color: 'black', + font: { + size: 12, + }, + }, + }, + }, + }, + }); +}; diff --git a/code/index.html b/code/index.html index 2fb5e0ae..098c2378 100644 --- a/code/index.html +++ b/code/index.html @@ -1,21 +1,59 @@ -
- - - -
+
GitHub
+ Tracker
+