Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b8396c6
add data input from API and some basic styling
emmahogberg88 Feb 21, 2022
ca783f4
add fetch for commits and comments
emmahogberg88 Feb 22, 2022
1482a28
add styling
emmahogberg88 Feb 22, 2022
a26cbfc
add chart
emmahogberg88 Feb 22, 2022
c31e712
Update script.js
emmahogberg88 Feb 22, 2022
56bce23
add toggle switch
emmahogberg88 Feb 22, 2022
0eac84e
add toggle switch
emmahogberg88 Feb 23, 2022
2a7968e
add hidden token
emmahogberg88 Feb 23, 2022
f234335
test
emmahogberg88 Feb 23, 2022
f0d71b5
test
emmahogberg88 Feb 23, 2022
4e0c973
bug
emmahogberg88 Feb 23, 2022
55b1f5c
bug fix
emmahogberg88 Feb 23, 2022
1b1622e
bug fix
emmahogberg88 Feb 23, 2022
01b6f6e
bug netlify
emmahogberg88 Feb 23, 2022
c9d9958
add chart styling
emmahogberg88 Feb 23, 2022
719e9a4
insert buttons to visit website and see comments
emmahogberg88 Feb 24, 2022
afa4317
add comments modal
emmahogberg88 Feb 24, 2022
205cb56
add sorting function
emmahogberg88 Feb 24, 2022
fc7f887
add styling comments
emmahogberg88 Feb 25, 2022
75a7fbf
add media query for positioning cards
emmahogberg88 Feb 25, 2022
e5f2387
add functionality for toggle swich and styling footer
emmahogberg88 Feb 25, 2022
5a86b5d
add toggle bar and chart styling
emmahogberg88 Feb 25, 2022
abe17d4
add styling
emmahogberg88 Feb 25, 2022
5039fc8
change chart style, img styling and color change
emmahogberg88 Feb 25, 2022
3bf331f
add styling for modal
emmahogberg88 Feb 26, 2022
4c8581d
adjust button for modal
emmahogberg88 Feb 26, 2022
68f31f0
adjust button for modal
emmahogberg88 Feb 26, 2022
8f203a1
adjust button for modal
emmahogberg88 Feb 26, 2022
54adf64
adjust toggle switch
emmahogberg88 Feb 26, 2022
5de27ad
change icon for check mark
emmahogberg88 Feb 26, 2022
41703aa
add languages for each project and adjust styling for buttons, commen…
emmahogberg88 Feb 26, 2022
4314f78
change colors
emmahogberg88 Mar 1, 2022
0883544
code fixes
emmahogberg88 Mar 2, 2022
7db636a
adjust colors
emmahogberg88 Mar 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ignore environmental API keys
.env


# Other
code/secret.js
35 changes: 31 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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/
56 changes: 54 additions & 2 deletions code/chart.js
Original file line number Diff line number Diff line change
@@ -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);
}
Binary file added code/img/hero-img.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 56 additions & 7 deletions code/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,67 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Project GitHub Tracker</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@500;700&family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./style.css" />
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://kit.fontawesome.com/c7081c8e9b.js" crossorigin="anonymous"></script>
<title>Emma´s Project GitHub Tracker</title>
</head>
<body>
<h1>GitHub Tracker</h1>
<h2>Projects:</h2>
<main id="projects"></main>
<header class="flex">
<h1>GitHub Tracker</h1>
<h2>Technigo Boot Camp Spring ´22</h2>
<h4 id="username">emmahogberg88</h4>
</header>

<!-- This will be used to draw the chart 👇 -->
<canvas id="chart"></canvas>
<main id="projects">

<section class="section-overwiew flex" id="section-overwiew">
<div id="profile-picture">Profile picture</div>
<div class="chart-container">
<!-- This will be used to draw the chart 👇 -->
<canvas id="chart" class="chart"></canvas>
</div>
</section>

<script src="./script.js"></script>
<section class="section-projects">
<div class="toggle-switch flex">
<p class="toggle-text bold-text">Sort by:<p>
<input type="checkbox" name="switch" id="switch">
<label for="switch"></label>
</div>

<div class="section-projects__container" id="section-projects">
</div>
</section>

<section id="modal-wrapper" class="modal-wrapper">
<div>
<button id="modal-btn" class="modal-btn filled-button">Close</button>
<div id="modal" class="modal-content"></div>
</div>
</section>

</main>

<footer>
<div class="footer-items">
<a class="a-footer" href="https://github.com/emmahogberg88">
<i class="fab fa-github"></i>
</a>
<a class="a-footer" href="https://www.linkedin.com/in/emmahogberg/">
<i class="fab fa-linkedin-in"></i>
</a>
<a class="a-footer" href="https://twitter.com/Emm4_dev">
<i class="fab fa-twitter"></i>
</a>
</div>
</footer>

<script src="./secret.js"></script>
<script src="./chart.js"></script>
<script src="./script.js"></script>
</body>
</html>
Loading