From 4064a80aa53ef89544d1ac53b52cc23ed2d23859 Mon Sep 17 00:00:00 2001 From: Sebastian Gutierrez Date: Tue, 29 Oct 2019 13:43:05 -0500 Subject: [PATCH] Redesign timeline graph page --- public/TimeLineGraph.html | 145 ++++++++++++++++++----------------- public/js/profileTimeLine.js | 94 ++++++----------------- public/style.css | 3 +- 3 files changed, 101 insertions(+), 141 deletions(-) diff --git a/public/TimeLineGraph.html b/public/TimeLineGraph.html index c477f8f..12ce311 100644 --- a/public/TimeLineGraph.html +++ b/public/TimeLineGraph.html @@ -13,6 +13,10 @@ integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"> + @@ -24,61 +28,61 @@ - + -
- -
- -
- -
-
-

-
-

-
-            
-
-
-
+
+
+
+
+
+
+
+ + + +

Repo timeline

+
+ +
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+ diff --git a/public/js/profileTimeLine.js b/public/js/profileTimeLine.js index 700e8ec..9d5a9d1 100644 --- a/public/js/profileTimeLine.js +++ b/public/js/profileTimeLine.js @@ -41,78 +41,32 @@ function timeLineClickEvent(properties) { var item = repositoryData[properties.item]; - var html = "
\n" + - "
\n" + - item.name + - "
\n" + - "
\n"; - - html += "

" + item.description + "

"; - - console.log(item.license); - if(item.license === null) - { + if (item.license === null) { item.license = new Object(); - item.license.name = 'none'; + item.license.name = 'None'; } - html += "
\n" + - "
    \n" + - "
  • \n" + - "
    Fork Count
    \n" + - "
    " + - item.forks + - "
    \n" + - "
  • \n" + - "
  • \n" + - "
    Languages
    \n" + - "
    " + - item.language+ - "
    \n" + - "
  • \n" + - "
  • \n" + - "
    Liscense
    \n" + - "
    " + - item.license.name + - "
  • "; - if(item.homepage !== null) - { - html += - "
  • \n" + - "
    Home Page
    \n" + - "
    " + - "" +item.homepage + "" + - "
    \n" + - "
  • \n" + - "
\n"; - } - - - html += "
\n" + - "
    \n" + - "
  • \n" + - "
    Repository URL
    \n" + - "
    " + - "" +item.html_url + "" + - "
    \n" + - "
  • \n" + - "
  • \n" + - "
    Open Issues
    \n" + - "
    " + - item.open_issues_count + - "
    \n" + - "
  • \n" + - "
  • \n" + - "
    Watchers
    \n" + - "
    " + - item.watchers + - "
    \n" + - "
  • \n" + - "
\n" + - "
"; - - html +="
\n" + - "
"; + var html = ` +
+
+
${item.name}
+

${item.description ? item.description : 'No description'}

+
+
+ ${item.homepage ? `

Homepage: ${item.license.name}

` : ''} +

Repository URL: ${item.html_url}

+

Languages: ${item.language}

+

License: ${item.license.name}

+
+
+

Fork Count: ${item.forks}

+

Open Issues: ${item.open_issues_count}

+

Watchers: ${item.watchers}

+
+
+
+
+ `; $("#repositoryInformation").html(html); } @@ -154,4 +108,4 @@ function createProfileTimeLine(username, containerName) timeline.setItems(items); timeline.on('click', timeLineClickEvent); }); -} \ No newline at end of file +} diff --git a/public/style.css b/public/style.css index d1f00b0..e7562dd 100644 --- a/public/style.css +++ b/public/style.css @@ -71,7 +71,8 @@ body { } @media screen and (min-width: 768px) { - .friends-graph-page #profileGen { + .friends-graph-page #profileGen, + .timeline-graph-page #profileGen { margin-top: -84px } }