From 7b4f24cb964ee7f1fb27a58665b2afb42f102432 Mon Sep 17 00:00:00 2001 From: Nabeel Date: Sun, 27 Feb 2022 14:52:49 +0100 Subject: [PATCH 01/24] added the final work --- code/chart.js | 33 ++++++ code/github-universe.jpg | Bin 0 -> 6071 bytes code/index.html | 56 ++++++---- code/script.js | 115 ++++++++++++++++++++ code/style.css | 225 ++++++++++++++++++++++++++++++++++++++- code/token.js | 1 + 6 files changed, 410 insertions(+), 20 deletions(-) create mode 100644 code/github-universe.jpg create mode 100644 code/token.js diff --git a/code/chart.js b/code/chart.js index 92e85a30..bf9c9f5e 100644 --- a/code/chart.js +++ b/code/chart.js @@ -2,3 +2,36 @@ const ctx = document.getElementById('chart').getContext('2d') //"Draw" the chart here 👇 + +const drawChart = (repos) => { + +const labels = [ + 'January', + 'February', + 'March', + 'April', + 'May', + 'June', + ]; + + const data = { + labels: labels, + datasets: [{ + label: 'My Github dataset', + backgroundColor: ['#f3722c', '#f8961e'], + borderColor: '#f7e9e7', + data: [repos, 19-repos], + }] + }; + + const config = { + type: 'bar', + data: data, + options: {} + }; + + const myChart = new Chart( + document.getElementById('chart'), + config + ); + } diff --git a/code/github-universe.jpg b/code/github-universe.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f8e71b6cdfb1c8dd5a848b1da5ab2d4b094fbc28 GIT binary patch literal 6071 zcmbVQ2|Sc-*T2UYyOf4Xma!X>ok|(%84Mz0Y=cT=f3q)9SrXNRN{Ey+_PvEjRC*|( z>>}HfHIgk$Xv}-xGeh)!@9$fNW8C9%UFZDI_CFW3lll*^)j$`g3&3Ci00X}O>MEdl z1dr7rnBWhfoX*I*dOA3v{FU}9qGbGhT-=>dI0HSD!7;2J%733CdJoFW&;DO7zJaJi zC=E3ZYBz8MU}IrnWkIm9va+(XvvF`Cxw$wwxpwhx=RpbyhzJV_2nwPk_DZ9~_J|7# z%4neXC@QI{s)|VOKeSKz;9eC~WoQ!^J3BiUC)ZAH?w!h_f}+a*=NI)gu#F8S!Nd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H zO=(Jr$CypY`*S|T$4^>`oJkk5wpcmfYB4%yC(gZ*K3fk(FcYex6b%v(>Bb$x;Dg z5tdK>+2s4PrT(CvfB>q4>2+4R~3~n$+@iqDOS6EjR{oX zK-u}6yq4O}@AqrEke_|EMUjB7USKM??pzSLl3DM6%>)yzHkF7r^tCeU&iUn< zBN2;xf9QkeTTRzPJCalv6|`76!Y5O|%5unLgJ4Q^w?}|uK1dK~fv%XrxF=Yf*}-@E zH3)d$z|>5?x}ja!fHP?38L$HCGyRDmBSkhR19%7{-QwsOb?x9|%6q%uXfy7^6TXS7 zD1kgIJ}#jlK%NS?*inH-k6*qa5lThwHu;S|18FDxZWPSh|?LtQjdVs9mIMl3J1ODrp zmcI`M71(s22f?#uF)d}+tw%eeexBX6AZ~-s4%P!jW1P - - - - - Project GitHub Tracker - - - -

GitHub Tracker

-

Projects:

-
- - - - - - - - \ No newline at end of file + + + + + + + + + + Project GitHub Tracker + + + + + +
+ +
+ +
+ + + + + +
+ +
+ + + + + + diff --git a/code/script.js b/code/script.js index e69de29b..633450ea 100644 --- a/code/script.js +++ b/code/script.js @@ -0,0 +1,115 @@ +const username = 'NabeelMansour' +const container = document.getElementById('container') +const header = document.getElementById('header') +const technigoRepos = document.getElementById('technigoRepos') + + +// DOM selectors +const userName = document.getElementById('username') +const project = document.getElementById('projects') +const chart = document.getElementById('chart'); + +const options = { + method: 'GET', + headers: { + Authorization: `token ${token}` + } +} + + + + +// API'S +const USER_API = `https://api.github.com/users/${username}` +const API_REPOS = `https://api.github.com/users/${username}/repos` + + + +// fetch for the user info + +fetch(USER_API, ) +.then(res => res.json()) +.then(data => { + console.log(data) + header.innerHTML += ` +
+ +

${data.name}

+

${data.login}

+

GitHub Tracker

+

${data.bio}

+
+ ` + + }) + +// fetch the users reposetories + +fetch(API_REPOS) + .then(res => res.json()) + .then(data => { + // console.log(data) + const technigoRepositories = data.filter(repo => repo.name.includes('project-') && repo.fork) + + technigoRepositories.forEach((repo) => { + container.innerHTML += ` +
+

${repo.name}

+

${repo.description}

+ +
+

Last push: ${new Date(repo.pushed_at).toDateString()}

+

Branch: ${repo.default_branch}

+

Main language: ${repo.language}

+

Number of commits:

+
+

My Repo

+
+ ` + }) + drawChart(technigoRepositories.length) + getPullRequests(technigoRepositories) // Calling the pull req and commits function + }) + + + +// Gets the pull request for the projects +const getPullRequests = (forkedRepos) => { + forkedRepos.forEach(repo => { + fetch(`https://api.github.com/repos/Technigo/${repo.name}/pulls?per_page=100`) + .then(res => res.json()) + .then(data => { + + const commit = document.getElementById(`commit-${repo.name}`) + + const filteredPulls = data.find((pull) => pull.user.login === repo.owner.login) + + + + fetchCommits(filteredPulls.commits_url, repo.name) + // console.log(filteredPulls.commits_url) + + }) + }) + } + +// fetches the commits +const fetchCommits = (myCommitsUrl, myRepoName) => { + fetch(myCommitsUrl) + .then(res => res.json()) + .then((data) => { + document.getElementById(`commit-${myRepoName}`).innerHTML += data.length + }) + } + + + + + + + + + + + + diff --git a/code/style.css b/code/style.css index 7c8ad447..091c3339 100644 --- a/code/style.css +++ b/code/style.css @@ -1,3 +1,226 @@ + body { - background: #FFECE9; +background-repeat: no-repeat; +background-size: contain; +background-image: url('github-universe.jpg'); +font-family: 'Raleway', sans-serif; +width: 100vh; +height: 100%; +} + +.header { + width: 100vw; + /* display: flex; + flex-direction: row; + align-items: flex-start; */ + justify-content: center; + gap: 50px; + margin-top: 100px; +} + + + +.image { + border-radius: 50%; + width: 200px; + margin-top: 1rem; + -webkit-box-shadow: 5px 5px 10px 5px #000000; + box-shadow: 5px 5px 10px 5px #000000; + transition: width 2s, height 2s, background-color 2s, transform 2s; + +} + +.header-text { + display: flex; + flex-direction: column; + line-height: 10px; + font-size: large; + color: #f5eeed; +} + +.header-text span { + color: white; + text-shadow: 4px 5px 8px rgba(0, 0, 0, 0.308); +} + +.image:hover { + transform: rotate(360deg); +} + +.container { + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items: center; + justify-content: space-around; + grid-gap: 5px; + padding: 20px; + margin: 150px; + width: 80vw; + +} + +.repo-info p { + color: #000; +} + +.repo-link { + text-decoration: none; + +} + +a.repo-link{ + padding: 10px 20px; + border-radius: 10px; + background-color: rgba(255, 255, 255, 0.37); + color: rgb(141, 132, 132); +} + +.container { + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items: center; + justify-content: space-around; + grid-gap: 5px; + padding: 20px; + margin: 150px; + width: 80vw; +} + +.technigo-repos { + display: flex; + flex-direction: column; + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + margin-top: 10px; + margin-bottom: 30px; + padding: 20px; + align-items: center; + background-image: linear-gradient(120deg, #807474 0%, #ebedee 100%); + border-radius: 1rem; + min-width: 200px; + max-width: 400px; + width: 70%; + color: black; + gap: 0.5rem; +} + +.chart-container { + position: absolute; + left: 0; + right: 0; + margin:auto; + width: 600px; +} + + +/* -------------- media queries for mobile mode---------------*/ + +@media (max-width:667px) { + body { + background-repeat: no-repeat; + width: 100vw; + height: 100%; + margin: 0; + } + + .myDiv { + left: 0; + width: 100vw; + } + + .container { + width: 90vw; + flex-direction: column; + align-items: center; + justify-content: center; + margin: 100px 0; + } + + .header { + + flex-direction: column; + margin-left: 20px; + color: #fff; + } + + .header img { + width: 100px; + margin-top: -80px; + + } + + .header-text { + line-height: 10px; + margin-top: 0px; + font-size: 100%; +} + +.chart-container { + width: 400px; + +} + +} + + +/* -------------- media queries for tablet mode---------------*/ + +@media (min-width:668px) and (max-width:1024px){ + body { + background-repeat: no-repeat; + width: 100vw; + height: 100%; + margin: 0; + } + + .myDiv { + left: 0; + width: 100vw;; + } + + .container { + width: 95vw; + display: flex; + flex-direction: row; + margin: 110px 0; + gap: 20px; + } + + .technigo-repos { + width: 90vw; + } + + .header { + color: #fff; + flex-direction: colum; + + } + + .header img { + width: 200px; + margin-top: -80px; + + } + + .header-text { + line-height: 30px; + margin-top: -60px; + font-size: 120%; + text-align: center; + + } + + .header-text h1 { + line-height: 10px; + margin: 20px; + } + + .header p { + margin: 10px; + } + .chart-container { + width: 600px; + } + } \ No newline at end of file diff --git a/code/token.js b/code/token.js new file mode 100644 index 00000000..1f334ad5 --- /dev/null +++ b/code/token.js @@ -0,0 +1 @@ +const token = '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'; \ No newline at end of file From 6d9f2d59c2211f54a1a94ac21f90ec1678a9df9c Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Sun, 27 Feb 2022 15:04:46 +0100 Subject: [PATCH 02/24] Update README.md --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1613a3b0..988aa06f 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,10 @@ # 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. +Assigment was about to make a github tracker ## 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? ## 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://cocky-fermi-111ae0.netlify.app From ea1bd1a5f156fef24acda378219fc7a29ffeb4a8 Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Tue, 1 Mar 2022 11:31:02 +0100 Subject: [PATCH 03/24] update styling --- code/style.css | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/code/style.css b/code/style.css index 091c3339..c2bd49cf 100644 --- a/code/style.css +++ b/code/style.css @@ -76,18 +76,6 @@ a.repo-link{ color: rgb(141, 132, 132); } -.container { - display: flex; - flex-direction: row; - flex-wrap: wrap; - align-items: center; - justify-content: space-around; - grid-gap: 5px; - padding: 20px; - margin: 150px; - width: 80vw; -} - .technigo-repos { display: flex; flex-direction: column; @@ -106,10 +94,8 @@ a.repo-link{ } .chart-container { - position: absolute; - left: 0; - right: 0; - margin:auto; + display: flex; + justify-content: center; width: 600px; } @@ -166,7 +152,7 @@ a.repo-link{ /* -------------- media queries for tablet mode---------------*/ -@media (min-width:668px) and (max-width:1024px){ +@media (min-width:668px){ body { background-repeat: no-repeat; width: 100vw; @@ -207,7 +193,7 @@ a.repo-link{ line-height: 30px; margin-top: -60px; font-size: 120%; - text-align: center; + } @@ -221,6 +207,7 @@ a.repo-link{ } .chart-container { width: 600px; + margin: 0 auto; } -} \ No newline at end of file +} From 523e82bcb841a3a10e1ce2146b1000160050e2a5 Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Tue, 1 Mar 2022 11:40:53 +0100 Subject: [PATCH 04/24] updated index file --- code/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/index.html b/code/index.html index 53c1bf5a..7b1f9075 100644 --- a/code/index.html +++ b/code/index.html @@ -28,7 +28,7 @@ -
+
From c9550bc252abac2a2cb6756784765d3f1919914b Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Tue, 1 Mar 2022 12:35:32 +0100 Subject: [PATCH 05/24] update the css file --- code/style.css | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/code/style.css b/code/style.css index c2bd49cf..6fcabe1b 100644 --- a/code/style.css +++ b/code/style.css @@ -177,23 +177,16 @@ a.repo-link{ width: 90vw; } - .header { - color: #fff; - flex-direction: colum; - - } - - .header img { - width: 200px; - margin-top: -80px; - - } - + .header-text { line-height: 30px; margin-top: -60px; font-size: 120%; - + color: #fff; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; } From 5f6d095d73d54dddb54bbf7dc9972780eeaf3686 Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Tue, 1 Mar 2022 12:36:59 +0100 Subject: [PATCH 06/24] Update readme file --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 988aa06f..3f70a400 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,4 @@ Assigment was about to make a github tracker 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? ## View it live -https://cocky-fermi-111ae0.netlify.app +https://stoic-archimedes-d36d72.netlify.app From 229285ac98ec1fba4ec189b99e325b9505126689 Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Wed, 13 Apr 2022 15:40:14 +0200 Subject: [PATCH 07/24] Update script.js --- code/script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/script.js b/code/script.js index 633450ea..3944243b 100644 --- a/code/script.js +++ b/code/script.js @@ -30,7 +30,7 @@ const API_REPOS = `https://api.github.com/users/${username}/repos` fetch(USER_API, ) .then(res => res.json()) .then(data => { - console.log(data) + header.innerHTML += `
@@ -48,7 +48,7 @@ fetch(USER_API, ) fetch(API_REPOS) .then(res => res.json()) .then(data => { - // console.log(data) + const technigoRepositories = data.filter(repo => repo.name.includes('project-') && repo.fork) technigoRepositories.forEach((repo) => { @@ -87,7 +87,7 @@ const getPullRequests = (forkedRepos) => { fetchCommits(filteredPulls.commits_url, repo.name) - // console.log(filteredPulls.commits_url) + }) }) From 29ad1522ce8a29a81bd27d98d0fa6079e0a44e06 Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Wed, 13 Apr 2022 15:46:52 +0200 Subject: [PATCH 08/24] cleant up the css --- code/style.css | 310 +++++++++++++++++++++---------------------------- 1 file changed, 134 insertions(+), 176 deletions(-) diff --git a/code/style.css b/code/style.css index 6fcabe1b..398f67b2 100644 --- a/code/style.css +++ b/code/style.css @@ -1,206 +1,164 @@ - body { -background-repeat: no-repeat; -background-size: contain; -background-image: url('github-universe.jpg'); -font-family: 'Raleway', sans-serif; -width: 100vh; -height: 100%; + background-repeat: no-repeat; + background-size: contain; + background-image: url('github-universe.jpg'); + font-family: 'Raleway', sans-serif; + width: 100vh; + height: 100%; } - .header { - width: 100vw; - /* display: flex; - flex-direction: row; - align-items: flex-start; */ - justify-content: center; - gap: 50px; - margin-top: 100px; + width: 100vw; + justify-content: center; + gap: 50px; + margin-top: 100px; } - - - .image { - border-radius: 50%; - width: 200px; - margin-top: 1rem; - -webkit-box-shadow: 5px 5px 10px 5px #000000; - box-shadow: 5px 5px 10px 5px #000000; - transition: width 2s, height 2s, background-color 2s, transform 2s; - + border-radius: 50%; + width: 200px; + margin-top: 1rem; + -webkit-box-shadow: 5px 5px 10px 5px #000000; + box-shadow: 5px 5px 10px 5px #000000; + transition: width 2s, height 2s, background-color 2s, transform 2s; } - .header-text { - display: flex; - flex-direction: column; - line-height: 10px; - font-size: large; - color: #f5eeed; + display: flex; + flex-direction: column; + line-height: 10px; + font-size: large; + color: #f5eeed; } - .header-text span { - color: white; - text-shadow: 4px 5px 8px rgba(0, 0, 0, 0.308); + color: white; + text-shadow: 4px 5px 8px rgba(0, 0, 0, 0.308); } - .image:hover { - transform: rotate(360deg); + transform: rotate(360deg); } - .container { - display: flex; - flex-direction: row; - flex-wrap: wrap; - align-items: center; - justify-content: space-around; - grid-gap: 5px; - padding: 20px; - margin: 150px; - width: 80vw; - + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items: center; + justify-content: space-around; + grid-gap: 5px; + padding: 20px; + margin: 150px; + width: 80vw; } - .repo-info p { - color: #000; + color: #000; } - .repo-link { - text-decoration: none; - + text-decoration: none; } - -a.repo-link{ - padding: 10px 20px; - border-radius: 10px; - background-color: rgba(255, 255, 255, 0.37); - color: rgb(141, 132, 132); +a.repo-link { + padding: 10px 20px; + border-radius: 10px; + background-color: rgba(255, 255, 255, 0.37); + color: rgb(141, 132, 132); } - .technigo-repos { - display: flex; - flex-direction: column; - box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); - margin-top: 10px; - margin-bottom: 30px; - padding: 20px; - align-items: center; - background-image: linear-gradient(120deg, #807474 0%, #ebedee 100%); - border-radius: 1rem; - min-width: 200px; - max-width: 400px; - width: 70%; - color: black; - gap: 0.5rem; + display: flex; + flex-direction: column; + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + margin-top: 10px; + margin-bottom: 30px; + padding: 20px; + align-items: center; + background-image: linear-gradient(120deg, #807474 0%, #ebedee 100%); + border-radius: 1rem; + min-width: 200px; + max-width: 400px; + width: 70%; + color: black; + gap: 0.5rem; } - .chart-container { - display: flex; - justify-content: center; - width: 600px; + display: flex; + justify-content: center; + width: 600px; } - - /* -------------- media queries for mobile mode---------------*/ @media (max-width:667px) { - body { - background-repeat: no-repeat; - width: 100vw; - height: 100%; - margin: 0; - } - - .myDiv { - left: 0; - width: 100vw; - } - - .container { - width: 90vw; - flex-direction: column; - align-items: center; - justify-content: center; - margin: 100px 0; - } - - .header { - - flex-direction: column; - margin-left: 20px; - color: #fff; - } - - .header img { - width: 100px; - margin-top: -80px; - - } - - .header-text { - line-height: 10px; - margin-top: 0px; - font-size: 100%; -} - -.chart-container { - width: 400px; - -} - + body { + background-repeat: no-repeat; + width: 100vw; + height: 100%; + margin: 0; + } + .myDiv { + left: 0; + width: 100vw; + } + .container { + width: 90vw; + flex-direction: column; + align-items: center; + justify-content: center; + margin: 100px 0; + } + .header { + flex-direction: column; + margin-left: 20px; + color: #fff; + } + .header img { + width: 100px; + margin-top: -80px; + } + .header-text { + line-height: 10px; + margin-top: 0px; + font-size: 100%; + } + .chart-container { + width: 400px; + } } - - /* -------------- media queries for tablet mode---------------*/ -@media (min-width:668px){ - body { - background-repeat: no-repeat; - width: 100vw; - height: 100%; - margin: 0; - } - - .myDiv { - left: 0; - width: 100vw;; - } - - .container { - width: 95vw; - display: flex; - flex-direction: row; - margin: 110px 0; - gap: 20px; - } - - .technigo-repos { - width: 90vw; - } - - - .header-text { - line-height: 30px; - margin-top: -60px; - font-size: 120%; - color: #fff; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - - } - - .header-text h1 { - line-height: 10px; - margin: 20px; - } - - .header p { - margin: 10px; - } - .chart-container { - width: 600px; - margin: 0 auto; - } - +@media (min-width:668px) { + body { + background-repeat: no-repeat; + width: 100vw; + height: 100%; + margin: 0; + } + .myDiv { + left: 0; + width: 100vw; + ; + } + .container { + width: 95vw; + display: flex; + flex-direction: row; + margin: 110px 0; + gap: 20px; + } + .technigo-repos { + width: 90vw; + } + .header-text { + line-height: 30px; + margin-top: -60px; + font-size: 120%; + color: #fff; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + } + .header-text h1 { + line-height: 10px; + margin: 20px; + } + .header p { + margin: 10px; + } + .chart-container { + width: 600px; + margin: 0 auto; + } } From ff28d82ad363d850085f001692e7f9d6edc7f706 Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Wed, 13 Apr 2022 15:48:39 +0200 Subject: [PATCH 09/24] Updated the script file --- code/script.js | 103 +++++++++++++++++++------------------------------ 1 file changed, 39 insertions(+), 64 deletions(-) diff --git a/code/script.js b/code/script.js index 3944243b..db416787 100644 --- a/code/script.js +++ b/code/script.js @@ -2,36 +2,22 @@ const username = 'NabeelMansour' const container = document.getElementById('container') const header = document.getElementById('header') const technigoRepos = document.getElementById('technigoRepos') - - // DOM selectors const userName = document.getElementById('username') const project = document.getElementById('projects') const chart = document.getElementById('chart'); - const options = { - method: 'GET', - headers: { - Authorization: `token ${token}` - } + method: 'GET', + headers: { + Authorization: `token ${token}` + } } - - - - // API'S const USER_API = `https://api.github.com/users/${username}` const API_REPOS = `https://api.github.com/users/${username}/repos` - - - // fetch for the user info - -fetch(USER_API, ) -.then(res => res.json()) -.then(data => { - - header.innerHTML += ` +fetch(USER_API, ).then(res => res.json()).then(data => { + header.innerHTML += `

${data.name}

@@ -40,23 +26,15 @@ fetch(USER_API, )

${data.bio}

` - - }) - +}) // fetch the users reposetories - -fetch(API_REPOS) - .then(res => res.json()) - .then(data => { - - const technigoRepositories = data.filter(repo => repo.name.includes('project-') && repo.fork) - - technigoRepositories.forEach((repo) => { - container.innerHTML += ` +fetch(API_REPOS).then(res => res.json()).then(data => { + const technigoRepositories = data.filter(repo => repo.name.includes('project-') && repo.fork) + technigoRepositories.forEach((repo) => { + container.innerHTML += `

${repo.name}

${repo.description}

-

Last push: ${new Date(repo.pushed_at).toDateString()}

Branch: ${repo.default_branch}

@@ -66,41 +44,38 @@ fetch(API_REPOS)

My Repo

` - }) - drawChart(technigoRepositories.length) - getPullRequests(technigoRepositories) // Calling the pull req and commits function - }) - - - + }) + drawChart(technigoRepositories.length) + getPullRequests(technigoRepositories) // Calling the pull req and commits function +}) // Gets the pull request for the projects const getPullRequests = (forkedRepos) => { - forkedRepos.forEach(repo => { - fetch(`https://api.github.com/repos/Technigo/${repo.name}/pulls?per_page=100`) - .then(res => res.json()) - .then(data => { - - const commit = document.getElementById(`commit-${repo.name}`) - - const filteredPulls = data.find((pull) => pull.user.login === repo.owner.login) - - - - fetchCommits(filteredPulls.commits_url, repo.name) - - - }) - }) - } - + forkedRepos.forEach(repo => { + fetch(`https://api.github.com/repos/Technigo/${repo.name}/pulls?per_page=100`).then(res => res.json()).then(data => { + const commit = document.getElementById(`commit-${repo.name}`) + const filteredPulls = data.find((pull) => pull.user.login === repo.owner.login) + fetchCommits(filteredPulls.commits_url, repo.name) + }) + }) +} // fetches the commits const fetchCommits = (myCommitsUrl, myRepoName) => { - fetch(myCommitsUrl) - .then(res => res.json()) - .then((data) => { - document.getElementById(`commit-${myRepoName}`).innerHTML += data.length - }) - } + fetch(myCommitsUrl).then(res => res.json()).then((data) => { + document.getElementById(`commit-${myRepoName}`).innerHTML += data.length + }) +}© +2022 GitHub, Inc. +Terms +Privacy +Security +Status +Docs +Contact GitHub +Pricing +API +Training +Blog +About From ac49256f5928ea661896386d3bf70cb09dc9c466 Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Wed, 13 Apr 2022 15:50:15 +0200 Subject: [PATCH 10/24] Updated html file --- code/index.html | 65 +++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 37 deletions(-) diff --git a/code/index.html b/code/index.html index 7b1f9075..51e4be42 100644 --- a/code/index.html +++ b/code/index.html @@ -1,39 +1,30 @@ - - - - - - - - - - - Project GitHub Tracker - - - - - -
- -
- -
- - - - - -
- -
- - - - - + + + + + + + + + Project GitHub Tracker + + + + +
+
+
+ +
+ +
+ + + + From 6d577fd2a0b5185f08790db44d070e7e9a58d716 Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Wed, 13 Apr 2022 15:56:49 +0200 Subject: [PATCH 11/24] Update index.html --- code/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/code/index.html b/code/index.html index 51e4be42..0e89f4d4 100644 --- a/code/index.html +++ b/code/index.html @@ -1,3 +1,4 @@ + From 02a14c14e0e1346cf98ba09bcb20fa319aaf5e43 Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Wed, 13 Apr 2022 16:05:30 +0200 Subject: [PATCH 12/24] Update index.html --- code/index.html | 65 ++++++++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 28 deletions(-) diff --git a/code/index.html b/code/index.html index 0e89f4d4..085bce3b 100644 --- a/code/index.html +++ b/code/index.html @@ -1,31 +1,40 @@ - - - - - - - - - Project GitHub Tracker - - - - -
-
-
- -
- -
- - - - + + + + + + + + + + Project GitHub Tracker + + + + + +
+ +
+ +
+ + + + + +
+ +
+ + + + + + From 4bc0ac8edea1602521746136edf99ab1f129e6e6 Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Wed, 13 Apr 2022 16:06:42 +0200 Subject: [PATCH 13/24] Update script.js --- code/script.js | 105 +++++++++++++++++++++++++++++++------------------ 1 file changed, 66 insertions(+), 39 deletions(-) diff --git a/code/script.js b/code/script.js index db416787..bbb584b6 100644 --- a/code/script.js +++ b/code/script.js @@ -2,22 +2,36 @@ const username = 'NabeelMansour' const container = document.getElementById('container') const header = document.getElementById('header') const technigoRepos = document.getElementById('technigoRepos') + + // DOM selectors const userName = document.getElementById('username') const project = document.getElementById('projects') const chart = document.getElementById('chart'); + const options = { - method: 'GET', - headers: { - Authorization: `token ${token}` - } + method: 'GET', + headers: { + Authorization: `token ${token}` + } } + + + + // API'S const USER_API = `https://api.github.com/users/${username}` const API_REPOS = `https://api.github.com/users/${username}/repos` + + + // fetch for the user info -fetch(USER_API, ).then(res => res.json()).then(data => { - header.innerHTML += ` + +fetch(USER_API, ) +.then(res => res.json()) +.then(data => { + + header.innerHTML += `

${data.name}

@@ -26,15 +40,23 @@ fetch(USER_API, ).then(res => res.json()).then(data => {

${data.bio}

` -}) + + }) + // fetch the users reposetories -fetch(API_REPOS).then(res => res.json()).then(data => { - const technigoRepositories = data.filter(repo => repo.name.includes('project-') && repo.fork) - technigoRepositories.forEach((repo) => { - container.innerHTML += ` + +fetch(API_REPOS) + .then(res => res.json()) + .then(data => { + + const technigoRepositories = data.filter(repo => repo.name.includes('project-') && repo.fork) + + technigoRepositories.forEach((repo) => { + container.innerHTML += `

${repo.name}

${repo.description}

+

Last push: ${new Date(repo.pushed_at).toDateString()}

Branch: ${repo.default_branch}

@@ -44,38 +66,41 @@ fetch(API_REPOS).then(res => res.json()).then(data => {

My Repo

` - }) - drawChart(technigoRepositories.length) - getPullRequests(technigoRepositories) // Calling the pull req and commits function -}) + }) + drawChart(technigoRepositories.length) + getPullRequests(technigoRepositories) // Calling the pull req and commits function + }) + + + // Gets the pull request for the projects const getPullRequests = (forkedRepos) => { - forkedRepos.forEach(repo => { - fetch(`https://api.github.com/repos/Technigo/${repo.name}/pulls?per_page=100`).then(res => res.json()).then(data => { - const commit = document.getElementById(`commit-${repo.name}`) - const filteredPulls = data.find((pull) => pull.user.login === repo.owner.login) - fetchCommits(filteredPulls.commits_url, repo.name) - }) - }) -} + forkedRepos.forEach(repo => { + fetch(`https://api.github.com/repos/Technigo/${repo.name}/pulls?per_page=100`) + .then(res => res.json()) + .then(data => { + + const commit = document.getElementById(`commit-${repo.name}`) + + const filteredPulls = data.find((pull) => pull.user.login === repo.owner.login) + + + + fetchCommits(filteredPulls.commits_url, repo.name) + + + }) + }) + } + // fetches the commits const fetchCommits = (myCommitsUrl, myRepoName) => { - fetch(myCommitsUrl).then(res => res.json()).then((data) => { - document.getElementById(`commit-${myRepoName}`).innerHTML += data.length - }) -}© -2022 GitHub, Inc. -Terms -Privacy -Security -Status -Docs -Contact GitHub -Pricing -API -Training -Blog -About + fetch(myCommitsUrl) + .then(res => res.json()) + .then((data) => { + document.getElementById(`commit-${myRepoName}`).innerHTML += data.length + }) + } @@ -83,6 +108,8 @@ About + + From e5d0f0c9baedf861cf562b9ff9e997155f885476 Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Wed, 13 Apr 2022 16:07:54 +0200 Subject: [PATCH 14/24] Update style.css --- code/style.css | 324 +++++++++++++++++++++++++++++-------------------- 1 file changed, 190 insertions(+), 134 deletions(-) diff --git a/code/style.css b/code/style.css index 398f67b2..a57cc9be 100644 --- a/code/style.css +++ b/code/style.css @@ -1,164 +1,220 @@ body { - background-repeat: no-repeat; - background-size: contain; - background-image: url('github-universe.jpg'); - font-family: 'Raleway', sans-serif; - width: 100vh; - height: 100%; +background-repeat: no-repeat; +background-size: contain; +background-image: url('github-universe.jpg'); +font-family: 'Raleway', sans-serif; +width: 100vh; +height: 100%; } + .header { - width: 100vw; - justify-content: center; - gap: 50px; - margin-top: 100px; + width: 100vw; + /* display: flex; + flex-direction: row; + align-items: flex-start; */ + justify-content: center; + gap: 50px; + margin-top: 100px; } + + + .image { - border-radius: 50%; - width: 200px; - margin-top: 1rem; - -webkit-box-shadow: 5px 5px 10px 5px #000000; - box-shadow: 5px 5px 10px 5px #000000; - transition: width 2s, height 2s, background-color 2s, transform 2s; + border-radius: 50%; + width: 200px; + margin-top: 1rem; + -webkit-box-shadow: 5px 5px 10px 5px #000000; + box-shadow: 5px 5px 10px 5px #000000; + transition: width 2s, height 2s, background-color 2s, transform 2s; + } + .header-text { - display: flex; - flex-direction: column; - line-height: 10px; - font-size: large; - color: #f5eeed; + display: flex; + flex-direction: column; + line-height: 10px; + font-size: large; + color: #f5eeed; } + .header-text span { - color: white; - text-shadow: 4px 5px 8px rgba(0, 0, 0, 0.308); + color: white; + text-shadow: 4px 5px 8px rgba(0, 0, 0, 0.308); } + .image:hover { - transform: rotate(360deg); + transform: rotate(360deg); } + .container { - display: flex; - flex-direction: row; - flex-wrap: wrap; - align-items: center; - justify-content: space-around; - grid-gap: 5px; - padding: 20px; - margin: 150px; - width: 80vw; + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items: center; + justify-content: space-around; + grid-gap: 5px; + padding: 20px; + margin: 150px; + width: 80vw; + } + .repo-info p { - color: #000; + color: #000; } + .repo-link { - text-decoration: none; + text-decoration: none; + } -a.repo-link { - padding: 10px 20px; - border-radius: 10px; - background-color: rgba(255, 255, 255, 0.37); - color: rgb(141, 132, 132); + +a.repo-link{ + padding: 10px 20px; + border-radius: 10px; + background-color: rgba(255, 255, 255, 0.37); + color: rgb(141, 132, 132); } + +.container { + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items: center; + justify-content: space-around; + grid-gap: 5px; + padding: 20px; + margin: 150px; + width: 80vw; +} + .technigo-repos { - display: flex; - flex-direction: column; - box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); - margin-top: 10px; - margin-bottom: 30px; - padding: 20px; - align-items: center; - background-image: linear-gradient(120deg, #807474 0%, #ebedee 100%); - border-radius: 1rem; - min-width: 200px; - max-width: 400px; - width: 70%; - color: black; - gap: 0.5rem; + display: flex; + flex-direction: column; + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + margin-top: 10px; + margin-bottom: 30px; + padding: 20px; + align-items: center; + background-image: linear-gradient(120deg, #807474 0%, #ebedee 100%); + border-radius: 1rem; + min-width: 200px; + max-width: 400px; + width: 70%; + color: black; + gap: 0.5rem; } + .chart-container { - display: flex; - justify-content: center; - width: 600px; + display: flex; + justify-content: center; + width: 600px; } + + /* -------------- media queries for mobile mode---------------*/ @media (max-width:667px) { - body { - background-repeat: no-repeat; - width: 100vw; - height: 100%; - margin: 0; - } - .myDiv { - left: 0; - width: 100vw; - } - .container { - width: 90vw; - flex-direction: column; - align-items: center; - justify-content: center; - margin: 100px 0; - } - .header { - flex-direction: column; - margin-left: 20px; - color: #fff; - } - .header img { - width: 100px; - margin-top: -80px; - } - .header-text { - line-height: 10px; - margin-top: 0px; - font-size: 100%; - } - .chart-container { - width: 400px; - } + body { + background-repeat: no-repeat; + width: 100vw; + height: 100%; + margin: 0; + } + + .myDiv { + left: 0; + width: 100vw; + } + + .container { + width: 90vw; + flex-direction: column; + align-items: center; + justify-content: center; + margin: 100px 0; + } + + .header { + + flex-direction: column; + margin-left: 20px; + color: #fff; + } + + .header img { + width: 100px; + margin-top: -80px; + + } + + .header-text { + line-height: 10px; + margin-top: 0px; + font-size: 100%; +} + +.chart-container { + width: 400px; + +} + } + + /* -------------- media queries for tablet mode---------------*/ -@media (min-width:668px) { - body { - background-repeat: no-repeat; - width: 100vw; - height: 100%; - margin: 0; - } - .myDiv { - left: 0; - width: 100vw; - ; - } - .container { - width: 95vw; - display: flex; - flex-direction: row; - margin: 110px 0; - gap: 20px; - } - .technigo-repos { - width: 90vw; - } - .header-text { - line-height: 30px; - margin-top: -60px; - font-size: 120%; - color: #fff; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - } - .header-text h1 { - line-height: 10px; - margin: 20px; - } - .header p { - margin: 10px; - } - .chart-container { - width: 600px; - margin: 0 auto; - } +@media (min-width:668px){ + body { + background-repeat: no-repeat; + width: 100vw; + height: 100%; + margin: 0; + } + + .myDiv { + left: 0; + width: 100vw;; + } + + .container { + width: 95vw; + display: flex; + flex-direction: row; + margin: 110px 0; + gap: 20px; + } + + .technigo-repos { + width: 90vw; + } + + .header-text { + color: #fff; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + } + + .header-text { + line-height: 30px; + margin-top: -60px; + font-size: 120%; + + + } + + .header-text h1 { + line-height: 10px; + margin: 20px; + } + + .header p { + margin: 10px; + } + .chart-container { + width: 600px; + margin: 0 auto; + } + } From 89280d9fc27cffa7a4239e7aab1d877dc2f8ac42 Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Wed, 13 Apr 2022 16:13:32 +0200 Subject: [PATCH 15/24] Update script.js --- code/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/script.js b/code/script.js index bbb584b6..350bbf4d 100644 --- a/code/script.js +++ b/code/script.js @@ -86,7 +86,7 @@ const getPullRequests = (forkedRepos) => { - fetchCommits(filteredPulls.commits_url, repo.name) + fetchCommits({filteredPulls.commits_url, repo.name}) }) From ab727c017399a97946f8f8ce982aba7b91fe63cd Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Wed, 13 Apr 2022 16:21:59 +0200 Subject: [PATCH 16/24] Update script.js --- code/script.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/code/script.js b/code/script.js index 350bbf4d..5cdd381e 100644 --- a/code/script.js +++ b/code/script.js @@ -83,12 +83,7 @@ const getPullRequests = (forkedRepos) => { const commit = document.getElementById(`commit-${repo.name}`) const filteredPulls = data.find((pull) => pull.user.login === repo.owner.login) - - - - fetchCommits({filteredPulls.commits_url, repo.name}) - - + fetchCommits(filteredPulls.commits_url, repo.name) }) }) } From fa0982c08bf61e838f4df977a07e7792a70cf14d Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Wed, 13 Apr 2022 16:36:38 +0200 Subject: [PATCH 17/24] Update script.js --- code/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/script.js b/code/script.js index 5cdd381e..873c132d 100644 --- a/code/script.js +++ b/code/script.js @@ -83,7 +83,7 @@ const getPullRequests = (forkedRepos) => { const commit = document.getElementById(`commit-${repo.name}`) const filteredPulls = data.find((pull) => pull.user.login === repo.owner.login) - fetchCommits(filteredPulls.commits_url, repo.name) + fetchCommits(filteredPulls.myCommits_url, repo.name) }) }) } From a751f60ac7ed5068c18b2ce16ae566634599c737 Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Wed, 13 Apr 2022 16:37:57 +0200 Subject: [PATCH 18/24] Update script.js --- code/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/script.js b/code/script.js index 873c132d..ab7bba0f 100644 --- a/code/script.js +++ b/code/script.js @@ -83,7 +83,7 @@ const getPullRequests = (forkedRepos) => { const commit = document.getElementById(`commit-${repo.name}`) const filteredPulls = data.find((pull) => pull.user.login === repo.owner.login) - fetchCommits(filteredPulls.myCommits_url, repo.name) + fetchCommits(filteredPulls.myCommitsUrl, repo.name) }) }) } From ec90c1cf322cdc00910cf49904be25e7f49246a2 Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Wed, 13 Apr 2022 16:41:19 +0200 Subject: [PATCH 19/24] Update script.js --- code/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/script.js b/code/script.js index ab7bba0f..5cdd381e 100644 --- a/code/script.js +++ b/code/script.js @@ -83,7 +83,7 @@ const getPullRequests = (forkedRepos) => { const commit = document.getElementById(`commit-${repo.name}`) const filteredPulls = data.find((pull) => pull.user.login === repo.owner.login) - fetchCommits(filteredPulls.myCommitsUrl, repo.name) + fetchCommits(filteredPulls.commits_url, repo.name) }) }) } From f01ae55c5ee64d900990e6bd16a7bc06651920aa Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Wed, 13 Apr 2022 16:51:47 +0200 Subject: [PATCH 20/24] Update script.js --- code/script.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/script.js b/code/script.js index 5cdd381e..6f4a0966 100644 --- a/code/script.js +++ b/code/script.js @@ -80,10 +80,15 @@ const getPullRequests = (forkedRepos) => { .then(res => res.json()) .then(data => { - const commit = document.getElementById(`commit-${repo.name}`) +// const commit = document.getElementById(`commit-${repo.name}`) const filteredPulls = data.find((pull) => pull.user.login === repo.owner.login) - fetchCommits(filteredPulls.commits_url, repo.name) + if (filteredPulls) { + fetchCommits(filteredPulls.commits_url, repo.name) + } else { + document.getElementById(`commits-${repo.name}`).innerHTML = `No pulls from this user yet.` + } +// fetchCommits(filteredPulls.commits_url, repo.name) }) }) } From c76f768631a8abb3897ed54d9f17c495a2574f5b Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Wed, 13 Apr 2022 16:53:08 +0200 Subject: [PATCH 21/24] Update script.js --- code/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/script.js b/code/script.js index 6f4a0966..efd36c8d 100644 --- a/code/script.js +++ b/code/script.js @@ -86,7 +86,7 @@ const getPullRequests = (forkedRepos) => { if (filteredPulls) { fetchCommits(filteredPulls.commits_url, repo.name) } else { - document.getElementById(`commits-${repo.name}`).innerHTML = `No pulls from this user yet.` + document.getElementById(`commits-${repo.name}`).innerHTML = "No pulls from this user yet." } // fetchCommits(filteredPulls.commits_url, repo.name) }) From 9bd6ba0a54e2d9db739469f5ba9485a4dd95cec0 Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Wed, 13 Apr 2022 16:55:16 +0200 Subject: [PATCH 22/24] Update script.js --- code/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/script.js b/code/script.js index efd36c8d..625d0401 100644 --- a/code/script.js +++ b/code/script.js @@ -80,7 +80,7 @@ const getPullRequests = (forkedRepos) => { .then(res => res.json()) .then(data => { -// const commit = document.getElementById(`commit-${repo.name}`) + const filteredPulls = data.find((pull) => pull.user.login === repo.owner.login) if (filteredPulls) { @@ -88,7 +88,7 @@ const getPullRequests = (forkedRepos) => { } else { document.getElementById(`commits-${repo.name}`).innerHTML = "No pulls from this user yet." } -// fetchCommits(filteredPulls.commits_url, repo.name) + }) }) } From 4cb2e596e98bedcff0d46f1547e553d37c47932b Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Wed, 13 Apr 2022 17:04:30 +0200 Subject: [PATCH 23/24] Update style.css --- code/style.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/style.css b/code/style.css index a57cc9be..b4d93883 100644 --- a/code/style.css +++ b/code/style.css @@ -148,9 +148,12 @@ a.repo-link{ } .header-text { - line-height: 10px; - margin-top: 0px; +/* line-height: 10px; */ +/* margin-top: 0px; */ font-size: 100%; + line-height: 10px; + margin-top: -10px; + } .chart-container { From 0f3d8bd63c69f12b997869cb775d747d90799047 Mon Sep 17 00:00:00 2001 From: Nabeel Mansour <59266812+NabeelMansour@users.noreply.github.com> Date: Wed, 13 Apr 2022 17:06:48 +0200 Subject: [PATCH 24/24] Update style.css --- code/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/style.css b/code/style.css index b4d93883..85dedf0f 100644 --- a/code/style.css +++ b/code/style.css @@ -151,7 +151,7 @@ a.repo-link{ /* line-height: 10px; */ /* margin-top: 0px; */ font-size: 100%; - line-height: 10px; + line-height: 1px; margin-top: -10px; }