${repo.name}
@@ -58,8 +59,9 @@ const fetchPullRequest = (allRepositories) => {
if (myPullRequest) {
fetchCommits(myPullRequest.commits_url, repo.name)
} else {
- document.getElementById(`commit-${repo.name}`).innerHTML =
- 'No commits yet :('
+ document.getElementById(`commit-${repo.name}`).innerHTML = /* html */ `
+ No pulls from this user yet 🚫
+ `
}
})
})
diff --git a/style.css b/style.css
index f33b3a3a..5b836240 100644
--- a/style.css
+++ b/style.css
@@ -9,8 +9,15 @@ body {
header {
background: #161b22;
- margin: auto;
+ margin-left: -1rem;
+ margin-right: -1rem;
+ margin-top: -0.5rem;
padding: 0.5rem;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100%;
+ min-width: 100%;
}
header a {
@@ -41,7 +48,7 @@ header a:hover {
.profile-div {
display: inline;
align-items: center;
- grid-column: span 4;
+ grid-column: span 5;
padding: 2rem;
}
@@ -56,6 +63,10 @@ header a:hover {
margin: auto;
}
+.username:hover {
+ color: #30363d;
+}
+
.login {
display: flex;
color: #8B949E;
@@ -63,17 +74,37 @@ header a:hover {
margin: auto;
}
+.login:hover {
+ color: #30363d;
+}
+
+.repo-chart {
+ display: flex;
+ width: 20rem;
+ margin: 1rem;
+}
+
.project-container {
display: grid;
grid-template-columns: repeat(4, 1fr);
+ margin: 0.5rem;
+}
+
+.project-container h2 {
+ grid-column: span 4;
+ display: flex;
+ color: #8B949E;
+ font-size: large;
+ margin-bottom: 0.5rem;
+ justify-content: center;
}
.repo-div {
display: grid;
- grid-column: span 5;
+ grid-column: span 4;
color: #8B949E;
- margin: 0.5rem;
padding: 0.5rem;
+ margin: 0.5rem;
border-radius: 5px;
border-width: 0.1rem;
border-color: #30363d;
@@ -90,22 +121,37 @@ header a:hover {
margin: 0px;
}
-.repo-chart {
- display: inline-flex;
- align-items: center;
- width: 20em;
-}
/* styling for tablet */
-@media (min-width:668px) and (max-width:1024px) {
+@media (min-width:668px) {
body {
background: #0d1117;
+ grid-template-columns: repeat(4, 1fr);
}
header {
visibility: visible;
+ grid-column: span 4;
}
+ .profile {
+ grid-column: span 3;
+ }
+
+ .repo-chart {
+ grid-column: span 1;
+ }
+
+ .project-container {
+ grid-column: span 4;
+ grid-template-columns: repeat(4, 1fr);
+ }
+
+ .repo-div {
+ grid-column: span 2;
+ }
+
+
}
/* styling for desktop */
@@ -114,5 +160,13 @@ header a:hover {
}
+ header {
+
+ }
+
+
+ .project-container {
+ grid-column: span 4;
+ }
}
\ No newline at end of file
From 3b990b4b56e23911e63b89de4aba2affd72b01d0 Mon Sep 17 00:00:00 2001
From: Skrosen <76884712+Skrosen@users.noreply.github.com>
Date: Sun, 3 Oct 2021 22:32:48 +0200
Subject: [PATCH 5/5] updated README and cleaned out the code, also commented
the code a bit more
---
README.md | 8 +++-----
chart.js | 49 +++----------------------------------------------
index.html | 1 -
script.js | 50 +++++---------------------------------------------
style.css | 15 +--------------
5 files changed, 12 insertions(+), 111 deletions(-)
diff --git a/README.md b/README.md
index 1613a3b0..a4b9868a 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,11 @@
# 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 assignment was to create a GitHub tracker using API's from GitHub to display information about forked projects done during Technigo Boot Camp.
## 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 working with the blue requirements and after I had completed the tasks on blue level I continued working on the styling in CSS to make the page look like GitHub. However, if I had more time I would work more with getting the page more similar to GitHub and also adding some of the red and black requirements.
## 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://linneawilhelmsson-week7-github-tracker.netlify.app/
\ No newline at end of file
diff --git a/chart.js b/chart.js
index 2e2f9e43..491dafeb 100644
--- a/chart.js
+++ b/chart.js
@@ -1,8 +1,7 @@
-//DOM-selector for the canvas 👇
+//DOM-selector for the canvas
const ctx = document.getElementById('chart').getContext('2d')
-//"Draw" the chart here 👇
-
+// Chart showing completed projects and how many there is left
const repoChart = (amount) => {
const config = {
type: 'bar',
@@ -10,7 +9,6 @@ const repoChart = (amount) => {
labels: [
'Projects done',
'Projects left',
- //'Blue'
],
datasets: [{
label: 'Technigo projects',
@@ -18,51 +16,10 @@ const repoChart = (amount) => {
backgroundColor: [
'rgb(63, 185, 79)',
'#8B949E',
- // 'rgb(88, 166, 255)',
],
hoverOffset: 4
}]
},
};
const repositoryChart = new Chart(ctx, config);
-}
-
-
-// const repoChart = new Chart(ctx, config);
-
-// const delayed
-// new Chart(ctx,) = {
-// type: 'bar',
-// data: {
-// labels,
-// datasets: [
-// {
-// data,
-// backgroundColor: ['#d5a7b6', '#5c7fe9'],
-// },
-// ],
-// },
-// options: {
-// animation: {
-// onComplete: () => {
-// delayed = true;
-// },
-// delay: (context) => {
-// let delay = 0;
-// if (context.type === 'data' && context.mode === 'default' && !delayed) {
-// delay = context.dataIndex * 300 + context.datasetIndex * 100;
-// }
-// return delay;
-// },
-// },
-// scales: {
-// x: {
-// stacked: true,
-// },
-// y: {
-// stacked: true
-// }
-// }
-// }
-// }
-// } //denna tillhör
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/index.html b/index.html
index e15c9344..070e2e92 100644
--- a/index.html
+++ b/index.html
@@ -29,7 +29,6 @@
Technigo repositories:
-