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.

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