Skip to content

Commit 8d9f8dd

Browse files
committed
styling and more info from API
1 parent 845e06d commit 8d9f8dd

3 files changed

Lines changed: 25 additions & 7 deletions

File tree

code/chart.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,24 @@ const config = {
1313
labels: [
1414
'Projects done',
1515
'Projects left',
16+
'Projects in total'
1617
//'Blue'
1718
],
1819
datasets: [{
1920
label: 'My Projects',
20-
data: [amount, 19-amount],
21+
data: [amount, 19-amount, 19],
2122
backgroundColor: [
22-
'rgb(255, 99, 132)',
23-
'rgb(255, 205, 86)',
24-
//'rgb(54, 162, 235)'
23+
'#e3f7ba',
24+
'rgb(252, 241, 175)',
25+
'#FFECE9'
2526
],
2627
hoverOffset: 4
2728
}]
2829
},
2930
};
3031

3132

33+
3234
const repoChart = new Chart(ctx, config);
3335
}
3436

code/script.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,16 @@ const getRepos = () => {
3131
<div class="project-card">
3232
<h3 class="project-name">${repo.name}</h3>
3333
<a class="project-links" href="${repo.html_url}" target="_blank">${repo.name}</a> <br><i>With default branch ${repo.default_branch}</i>
34-
<p class="project-info">Latest push: ${new Date(repo.pushed_at).toDateString()}</p>
35-
<p class="project-info" id="commits-${repo.name}">Number of commits: </p>
34+
<p class="project-info"><b>Created:</b> ${new Date(repo.created_at).toDateString()}</>
35+
<p class="project-info"><b>Latest push:</b> ${new Date(repo.pushed_at).toDateString()}</p>
36+
<p class="project-info" id="commits-${repo.name}"><b>Number of commits:</b> </p>
3637
</div>
3738
`)
3839

40+
41+
42+
//forkedRepos.sort(function(a, b){return a.created_at - b.created_at});
43+
3944
getPullRequests(forkedRepos)
4045
drawChart(forkedRepos.length)
4146
})

code/style.css

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ body {
4444
.profile-pic {
4545
width: 400px;
4646
border-radius: 50%;
47+
opacity: 0.5;
48+
}
49+
50+
.profile-pic:hover {
51+
opacity: 1;
52+
transition: 1s;
4753
}
4854

4955
.chart-box {
@@ -73,7 +79,7 @@ body {
7379
.project-card {
7480
font-family: 'Quicksand', sans-serif;
7581
background-color: #f7faf1;
76-
width: 350px;
82+
width: 330px;
7783
height: 200px;
7884
padding: 15px;
7985
border-radius: 2%;
@@ -119,6 +125,11 @@ body {
119125
font-style: italic;
120126
}
121127

128+
.linkedin-link:hover {
129+
color: rgb(123, 122, 122);
130+
font-size: 20px;
131+
transition: 1s;
132+
}
122133

123134
/* Tablet */
124135
@media (min-width:768px) {

0 commit comments

Comments
 (0)