diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..72a188b1 Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md index 1613a3b0..56e25191 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,21 @@ # 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, we have created a place to keep track of the GitHub repos that we are crating at Technigo. We have continued practicing on JavaScript and 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? +Process +designed page using figma +Fetched data from API and displayed it to fulfill the requirements. +Created a chart for the progress. +Styled the page. + +I started by adding my token to the project. I then collected all the info about my repos with the fetch() method. +I then builded functions to us the information I needed and displayed it on my page. I also created a chart showing +how many projects I have done and have left to do during my technigo education. + +If I had more time I would add more information about every repo: languages used for the project, review comments and link to netlify. ## 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-bymimmi.netlify.app/ diff --git a/code/.gitignore b/code/.gitignore new file mode 100644 index 00000000..9a0d7760 --- /dev/null +++ b/code/.gitignore @@ -0,0 +1,29 @@ +# Personal token +secret.js +# why can't I put code/ boefore secret.js lite the tutorial ? + + +# # 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 +# token.js \ No newline at end of file diff --git a/code/chart.js b/code/chart.js index 92e85a30..1cef237c 100644 --- a/code/chart.js +++ b/code/chart.js @@ -1,4 +1,29 @@ -//DOM-selector for the canvas 👇 -const ctx = document.getElementById('chart').getContext('2d') +const showChart = (countRepos) => { + const ctx = document.getElementById("chart").getContext("2d"); -//"Draw" the chart here 👇 + const labels = [`Finished projects`, `Projects left`]; + + const data = { + labels: labels, + datasets: [ + { + label: "My Technigo projects", + backgroundColor: ["#9E9FCF", "#484B76"], + borderColor: "rgb(66, 66, 66)", + data: [countRepos, 19 - countRepos], + }, + ], + }; + + Chart.defaults.font.family = "Source Serif Pro"; + Chart.defaults.font.size = "20"; + Chart.defaults.color = "#000000"; + + const config = { + type: "pie", + data: data, + options: {}, + }; + + const myChart = new Chart(ctx, config); +}; diff --git a/code/index.html b/code/index.html index 2fb5e0ae..8f011e04 100644 --- a/code/index.html +++ b/code/index.html @@ -1,21 +1,39 @@ -
- - - -