Sort by:
+ + +
diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..79cc1dbe --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +# Ignore environmental API keys +.env + + +# Other +code/secret.js diff --git a/README.md b/README.md index 1613a3b0..3287f347 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,40 @@ # GitHub Tracker -Replace this readme with your own information about your project. +The GitHub Tracker is gathering data from my repositories and pull requests on GitHub by fetching data from GitHub API and display it on a website. + +### **🔵 Blue Level (Minimum Requirements)** + +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] + -Start by briefly describing the assignment in a sentence or two. Keep it short and to the point. ## 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: +- Prototype in Figma. +- Fetch data from API and display it to fulfill the requirements. +- Created a chart for the progress. +- Style the page. +- Made a sorting function. +- Made a modal to show comments. + +I struggled a lot with the sorting function and the modal. I had to break down the steps in to pieces and solve one thing at the time. +I also had to restructure my code a bit and ask some team mates for help. I am really proud of the outcome of the project this week. +The feeling when it all worked was really good! + +If I had more time I would try to include a search bar and also which languages the projecs includes. + + ## 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. +Link to website: https://emma-github-tracker.netlify.app/ diff --git a/code/chart.js b/code/chart.js index 92e85a30..65264ff0 100644 --- a/code/chart.js +++ b/code/chart.js @@ -1,4 +1,56 @@ //DOM-selector for the canvas 👇 -const ctx = document.getElementById('chart').getContext('2d') +const chart = document.getElementById('chart').getContext('2d') -//"Draw" the chart here 👇 +Chart.defaults.font.family = 'Roboto' +Chart.defaults.font.size = 23 +Chart.defaults.color = 'white' + +progressChart = (projectsDone) => { + + const config = { + type: 'doughnut', + data: { + datasets: [{ + label: '', + backgroundColor: ['rgb(198, 228, 207)', 'rgb(111, 167, 132)'], + borderColor: 'rgb(22, 19, 21)', + hoverOffset: 8, + data: [projectsDone, 19 - projectsDone] + }], + + // These labels appear in the legend and in the tooltips when hovering different arcs + labels: [ + 'done', + 'todo', + ] + }, + + options: { + plugins: { + responsive: true, + legend: { + display: true, + position:'bottom', //change to chartArea if bar chart + labels: { + fontColor: '#FFF', + fontFamily: 'Roboto', + boxWidth: 10, + boxHeight: 10, + } + }, + title: { + display: true, + text: 'BOOT CAMP PROGRESS', + fontSize: 40, + position: 'top', + color: '#FFF', + fontFamily: 'Roboto', + weight: 'bold', + }, + } + } + } + + + const myChart = new Chart(chart, config); +} \ No newline at end of file diff --git a/code/img/hero-img.jpg b/code/img/hero-img.jpg new file mode 100644 index 00000000..3a22663c Binary files /dev/null and b/code/img/hero-img.jpg differ diff --git a/code/index.html b/code/index.html index 2fb5e0ae..fc000588 100644 --- a/code/index.html +++ b/code/index.html @@ -4,18 +4,67 @@ -
Sort by:
+ + +