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.

186 lines
4.5 KiB

  1. <html>
  2. <head>
  3. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
  4. <link rel="stylesheet" href="https://unpkg.com/leaflet@1.8.0/dist/leaflet.css"
  5. integrity="sha512-hoalWLoI8r4UszCkZ5kL8vayOGVae1oxXe/2A4AO6J9+580uKHDO3JdHb7NzwwzK5xr/Fs0W40kiNHxM9vyTtQ=="
  6. crossorigin=""/>
  7. <script src="https://unpkg.com/leaflet@1.8.0/dist/leaflet.js"
  8. integrity="sha512-BB3hKbKWOc9Ez/TAwyWxNXeoV9c1v6FIeYiBieIWkpLjauysF18NzgR1MBNBXf8/KABdlkX68nAhlwcDFLGPCQ=="
  9. crossorigin=""></script>
  10. <script src="https://cdn.jsdelivr.net/npm/d3@7"></script>
  11. <script type="javascript" src="https://code.jquery.com/jquery-3.6.0.min.js"> </script>
  12. <script src="jquery-csv.js"> </script>
  13. <meta charset="utf-8">
  14. <title>Track your bike</title>
  15. </head>
  16. <body>
  17. <button onclick="showBike()"> Locate your Bike!</button>
  18. <button onclick="loadRoute()"> LoadRoute</button
  19. <ul>
  20. <li>
  21. <div class="wrapper">
  22. <div class="panel">
  23. <div class="panel-header">
  24. <h3 class="title">Statistics</h3>
  25. <div class="routes">
  26. <span>Last traveled route</span>
  27. </div>
  28. </div>
  29. <div class="panel-body">
  30. <div class="categories">
  31. <div class="category">
  32. <span>kilometers traveled</span>
  33. <span>2 Km</span>
  34. </div>
  35. <div class="category">
  36. <span>traveled time</span>
  37. <span>2 min</span>
  38. </div>
  39. </div>
  40. <div class="chart">
  41. <div class="operating-systems">
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </li>
  48. <li>
  49. <div class="container d-flex justify-content-center">
  50. <ul class="list-group mt-5 text-white">
  51. <li class="list-group-item d-flex justify-content-between align-content-center" onclick="displayRoute()">
  52. <div class="d-flex flex-row">
  53. <div class="ml-2">
  54. <h4 class="mb-0">Last traveled Route</h4>
  55. <div class="about">
  56. <span id="time">Jan 21, 2020</span>
  57. </div>
  58. </div>
  59. </div>
  60. </li>
  61. </ul>
  62. </div>
  63. </li>
  64. </ul>
  65. <div id="map"></div>
  66. <script type="text/javascript" src="lib/orbitdb.js" charset="utf-8"></script>
  67. <script type="text/javascript" src="lib/ipfs.js" charset="utf-8"></script>
  68. <script type="text/javascript" src="functions.js"></script>
  69. <script type="text/javascript" src="map.js"></script>
  70. <script type="text/javascript" src="execution.js"></script>
  71. <script type="file" src="new.csv"></script>
  72. <script>
  73. //var currentime = getCurrentTime();
  74. //document.write(getCurrentTime())
  75. //document.getElementById("time").innerHTML = currentime
  76. </script>
  77. <script>
  78. //v//ar csv = './new.csv'
  79. // var data = $.csv.toObjects(csv);
  80. //console.log(data)
  81. //const res = d3.csvParse(csv);
  82. //console.log(res);
  83. </script>
  84. </script>
  85. <style> #map { height: 600px; width: 600px; margin: auto }</style>
  86. <style>
  87. /*
  88. * {
  89. box-sizing: border-box;
  90. }
  91. html, body {
  92. height: 100%;
  93. width: 100%;
  94. display: flex;
  95. justify-content: center;
  96. align-items: center;
  97. font-family: 'Roboto', sans-serif;
  98. background: #d4d1d1;
  99. overflow: hidden;
  100. }
  101. .panel {
  102. width: 300px;
  103. height: 400px;
  104. background: #e68a43;
  105. box-shadow: 1px 2px 3px 0px rgba(0,0,0,0.10);
  106. border-radius: 6px;
  107. overflow: hidden;
  108. }
  109. .panel-header {
  110. display: flex;
  111. justify-content: space-between;
  112. align-items: center;
  113. padding: 0 30px;
  114. height: 60px;
  115. background: rgb(241, 239, 239);
  116. }
  117. .title {
  118. color: #5E6977;
  119. font-weight: 500;
  120. }
  121. .panel-body {
  122. display: flex;
  123. height: 340px;
  124. }
  125. .categories {
  126. display: flex;
  127. flex-direction: column;
  128. justify-content: space-between;
  129. flex-basis: 25%;
  130. padding: 39px 0px 41px 26px;
  131. }
  132. .category {
  133. display: flex;
  134. flex-direction: column;
  135. }
  136. .category span:first-child {
  137. font-weight: 300;
  138. font-size: 14px;
  139. opacity: 0.6;
  140. color: #fff;
  141. margin-bottom: 6px;
  142. }
  143. .category span:last-child {
  144. font-size: 32px;
  145. font-weight: 300;
  146. color: #fff;
  147. }
  148. .chart {
  149. width: 100%;
  150. height: 100%;
  151. display: flex;
  152. flex-direction: column;
  153. flex-grow: 2;
  154. position: relative;
  155. }