diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..5b33f64c --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + + +# Ignore Mac system files +.DS_store + +# Ignore node_modules folder +node_modules + +# Ignore all text files +*.txt + +# Ignore files related to API keys +.env + +# misc +/.pnp +.pnp.js +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# other +code/secret.js \ No newline at end of file diff --git a/README.md b/README.md index 1613a3b0..eb0f8fd4 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,23 @@ # GitHub Tracker -Replace this readme with your own information about your project. +Goal wa to create a place to keep track of the GitHub repos done during Technigo Boot Camp. -Start by briefly describing the assignment in a sentence or two. Keep it short and to the point. +Your page should include: + +- A list of all repos that are forked 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 commits for each repo +- It should be responsive (mobile first) +- A visualisation, for example through a pie chart, of how many projects you've done so far, compared to how many you will do (in total it will be 19 weekly projects 🥳) using [Chart.js](https://www.chartjs.org/). ## 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 all my repos and and filtered only the ones that are forked from Technigo. After that I fetched each repo and filtered them with my own username. Fetching again with right URL:s I got also more information about used languages, review comments and my own commits. I also used github token to get unlimited amount of fetches. This was also my first time using chart.js to create simple doughnut chart. + ## 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-kolkri.netlify.app/ diff --git a/code/assets/comment.svg b/code/assets/comment.svg new file mode 100644 index 00000000..07e00b43 --- /dev/null +++ b/code/assets/comment.svg @@ -0,0 +1,3 @@ + diff --git a/code/assets/githubLogo.svg b/code/assets/githubLogo.svg new file mode 100644 index 00000000..ee43aea9 --- /dev/null +++ b/code/assets/githubLogo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/code/chart.js b/code/chart.js index 92e85a30..f2eda107 100644 --- a/code/chart.js +++ b/code/chart.js @@ -1,4 +1,50 @@ -//DOM-selector for the canvas 👇 -const ctx = document.getElementById('chart').getContext('2d') + + + //"Draw" the chart here 👇 +const drawChart = (amount) => { + //DOM-selector for the canvas 👇 +const ctx = document.getElementById("chart").getContext("2d"); + //font for chart + Chart.defaults.font.family = 'Syne Mono, monospace'; + Chart.defaults.font.weight = 'bold'; + Chart.defaults.color = '#fff'; + const config = { + type: "doughnut", + data: { + labels: ["Projects done", "All projects"], + datasets: [ + { + label: "My Technigo projects", + data: [amount, 19 - amount], + backgroundColor: ["rgba(241, 187, 75,0.6)", "rgba(90, 112, 55, 0.1)"], + trans: 0.6, + hoverOffset: 4, + }, + ], + }, + options: { + plugins: { + legend: { + position: 'bottom', + labels: { + font: { + size: 16, + }, + } + }, + } + } + + +} + + + const projectsChart = new Chart(ctx, config); +}; + + + + + diff --git a/code/index.html b/code/index.html index 2fb5e0ae..26bb321e 100644 --- a/code/index.html +++ b/code/index.html @@ -6,16 +6,37 @@