Website for visualizing a persons github network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

164 lines
6.2 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  6. <link rel="icon" href="./favicon.ico" type="image/x-icon" />
  7. <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
  8. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  9. <link rel="stylesheet" href="./style.css" />
  10. <link rel="stylesheet" href="./search.css" />
  11. <script src="https://code.jquery.com/jquery-3.3.1.min.js"
  12. integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
  13. crossorigin="anonymous">
  14. </script>
  15. </head>
  16. <body>
  17. <div id="header-bar" class="d-flex flex-column flex-md-row shadow-sm align-items-center">
  18. <div id="header-title">
  19. <a href="./index.html">
  20. <img id="logo" src="./logo.svg" />
  21. </a>
  22. </div>
  23. <div id="navigation">
  24. <ul class="nav">
  25. <li class="nav-item">
  26. <a href="./GraphGenerator.html">
  27. Generate graphs
  28. </a>
  29. </li>
  30. <div class="nav-sep"></div>
  31. <li class="nav-item">
  32. <a href="https://github.com/jrtechs/github-graphs">
  33. View on GitHub
  34. </a>
  35. </li>
  36. <div class="nav-sep"></div>
  37. <li class="nav-item">
  38. <a href="./about.html">
  39. About
  40. </a>
  41. </li>
  42. </ul>
  43. </div>
  44. </div>
  45. <div class="main container">
  46. <div id="user-graphs">
  47. <div id="search-bar">
  48. <div class="row align-items-center text-center">
  49. <div class="search-title">
  50. <h1 id="search" class="m-title">Search GitHub:</h1>
  51. </div>
  52. <div class="col search-col">
  53. <form class="search-form">
  54. <input class="rounder form-control mr-sm-1" id='txtUsername' type="search" placeholder="GitHub Username" aria-label="Search">
  55. </form>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="card-deck text-center">
  60. <div class="card rounder">
  61. <div class="card-header">
  62. <h1 class="m-title">Interactive Friends Chart</h1>
  63. </div>
  64. <div class="card-body">
  65. <p>
  66. Creates an web chart of the selected user and
  67. both their followers and anyone they are following
  68. themselves.
  69. </p>
  70. <button class="btn btn-outline-success rounder" onclick='toFriends()' type='button'>Generate</button>
  71. </div>
  72. <p></p>
  73. </div>
  74. <div class="card rounder">
  75. <div class="card-header">
  76. <h1 class="m-title">Repo Timeline</h1>
  77. </div>
  78. <div class="card-body">
  79. <p>
  80. Displays a timeline of every repo belonging
  81. to the selected user in chronological order,
  82. along with information pertaining to each repo.
  83. </p>
  84. <button class="btn btn-outline-success rounder" onclick='toTimeline()' type='button'>Generate</button>
  85. </div>
  86. <p></p>
  87. </div>
  88. </div>
  89. </div>
  90. <div id="org-graph" class="mt-3">
  91. <div id="search-bar">
  92. <div class="row align-items-center text-center">
  93. <div class="search-title">
  94. <h1 id="search" class="m-title">Search GitHub:</h1>
  95. </div>
  96. <div class="col search-col">
  97. <form class="search-form">
  98. <input class="rounder form-control mr-sm-1" id='txtOrgname' type="search" placeholder="Organization Name" aria-label="Search">
  99. </form>
  100. </div>
  101. </div>
  102. </div>
  103. <div class="card-deck text-center">
  104. <div class="card rounder">
  105. <div class="card-header">
  106. <h1 class="m-title">Interactive Organization Chart</h1>
  107. </div>
  108. <div class="card-body">
  109. <p>
  110. Creates a web chart of the specified organization
  111. and all associated repos.
  112. </p>
  113. <button class="btn btn-outline-success rounder" onclick='toOrgRepos()' type='button'>Generate</button>
  114. </div>
  115. <p></p>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. </body>
  122. </html>
  123. <script>
  124. function fetchUserInput() {
  125. const inputedName = $("#txtUsername").val();
  126. if(inputedName === "")
  127. {
  128. alert("Please enter a Github name in the text field.")
  129. }
  130. return inputedName;
  131. }
  132. function fetchOrgInput()
  133. {
  134. const inputedOrg = $("#txtOrgname").val();
  135. if(inputedOrg === "")
  136. {
  137. alert("Please enter a Github organization name in the text field.")
  138. }
  139. return inputedOrg;
  140. }
  141. function toFriends()
  142. {
  143. var uname = fetchUserInput();
  144. if(uname !== "")
  145. window.location.href = "./FriendsGraph.html?name=" + uname;
  146. }
  147. function toTimeline()
  148. {
  149. var uname = fetchUserInput();
  150. if(uname !== "")
  151. window.location.href = "./TimeLineGraph.html?name=" + uname;
  152. }
  153. function toOrgRepos() {
  154. var uname = fetchOrgInput();
  155. if(uname !== "")
  156. window.location.href = "./OrgRepoGraph.html?name=" + uname;
  157. }
  158. </script>