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.

281 lines
6.2 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. <meta charset="utf-8">
  11. <title>Track your bike</title>
  12. </head>
  13. <body>
  14. <div class="container d-flex justify-content-center">
  15. <ul class="list-group mt-5 text-white">
  16. <li class="list-group-item d-flex justify-content-between align-content-center">
  17. <div class="d-flex flex-row">
  18. <div class="ml-2">
  19. <h4 class="mb-0">Route 1</h4>
  20. <div class="about">
  21. <span>Jan 21, 2020</span>
  22. </div>
  23. </div>
  24. </div>
  25. </li>
  26. <li class="list-group-item d-flex justify-content-between align-content-center">
  27. <div class="d-flex flex-row">
  28. <div class="ml-2">
  29. <h4 class="mb-0">Route 2</h4>
  30. <div class="about">
  31. <span>Jan 22, 2020</span>
  32. </div>
  33. </div>
  34. </div>
  35. </li>
  36. </ul>
  37. </div>
  38. <div id="map"></div>
  39. <div class="wrapper">
  40. <div class="panel">
  41. <div class="panel-header">
  42. <h3 class="title">Statistics</h3>
  43. <div class="routes">
  44. <span>Route X</span>
  45. </div>
  46. </div>
  47. <div class="panel-body">
  48. <div class="categories">
  49. <div class="category">
  50. <span>kilometers traveled</span>
  51. <span>2 Km</span>
  52. </div>
  53. <div class="category">
  54. <span>traveled time</span>
  55. <span>2 min</span>
  56. </div>
  57. </div>
  58. <div class="chart">
  59. <div class="operating-systems">
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. <script src="example.js"></script>
  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">
  69. <!--<script src="https://unpkg.com/ipfs@0.35.0/dist/index.min.js"></script> -->
  70. <script src="https://www.unpkg.com/orbit-db/dist/orbitdb.min.js"></script>
  71. <script>
  72. </script>
  73. <script>
  74. //const initIPFS = async (IPFS, ORBITDB) => {
  75. // Create IPFS instance
  76. // const ipfsOptions = { repo: '/orbitdb/examples/browser/new/ipfs/0.33.1', }
  77. //const ipfs = await Ipfs.create(ipfsOptions)
  78. // Create OrbitDB instance
  79. //const orbitdb = await OrbitDB.createInstance(ipfs)
  80. //}
  81. //initIPFS()
  82. // async function createDb(){
  83. // Create database instance
  84. // Create IPFS instance
  85. //const ipfsOptions = { repo: '/orbitdb/examples/browser/new/ipfs/0.33.1.2', }
  86. //const ipfs = await Ipfs.create(ipfsOptions)
  87. //const orbitdb = await OrbitDB.createInstance(ipfs)
  88. //const db = await orbitdb.keyvalue('first-database')
  89. // const address = db.address
  90. // console.log(address)
  91. //console.log(db.address.toString())
  92. //await db.put('timestamp', '4.9123123/-8.1231')
  93. //const value = db.get('timestamp')
  94. //console.log(value)
  95. //}
  96. initIPFS()
  97. //createDb()
  98. var map = L.map('map').setView([49.416075235, 8.6722049], 13);
  99. L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
  100. zoom: 44,
  101. attribution: '© OpenStreetMap'
  102. }).addTo(map);
  103. </script>
  104. <script type="text/javascript" charset="utf-8">
  105. // Start the example
  106. //main()
  107. </script>
  108. <style> #map { height: 800px; width: 1400px; }</style>
  109. <style>
  110. * {
  111. box-sizing: border-box;
  112. }
  113. html, body {
  114. height: 100%;
  115. width: 100%;
  116. display: flex;
  117. justify-content: center;
  118. align-items: center;
  119. font-family: 'Roboto', sans-serif;
  120. background: #d4d1d1;
  121. overflow: hidden;
  122. }
  123. .panel {
  124. width: 300px;
  125. height: 400px;
  126. background: #e68a43;
  127. box-shadow: 1px 2px 3px 0px rgba(0,0,0,0.10);
  128. border-radius: 6px;
  129. overflow: hidden;
  130. }
  131. .panel-header {
  132. display: flex;
  133. justify-content: space-between;
  134. align-items: center;
  135. padding: 0 30px;
  136. height: 60px;
  137. background: rgb(241, 239, 239);
  138. }
  139. .title {
  140. color: #5E6977;
  141. font-weight: 500;
  142. }
  143. .panel-body {
  144. display: flex;
  145. height: 340px;
  146. }
  147. .categories {
  148. display: flex;
  149. flex-direction: column;
  150. justify-content: space-between;
  151. flex-basis: 25%;
  152. padding: 39px 0px 41px 26px;
  153. }
  154. .category {
  155. display: flex;
  156. flex-direction: column;
  157. }
  158. .category span:first-child {
  159. font-weight: 300;
  160. font-size: 14px;
  161. opacity: 0.6;
  162. color: #fff;
  163. margin-bottom: 6px;
  164. }
  165. .category span:last-child {
  166. font-size: 32px;
  167. font-weight: 300;
  168. color: #fff;
  169. }
  170. .chart {
  171. width: 100%;
  172. height: 100%;
  173. display: flex;
  174. flex-direction: column;
  175. flex-grow: 2;
  176. position: relative;
  177. }
  178. .operating-systems {
  179. display: flex;
  180. justify-content: space-between;
  181. width: 215px;
  182. margin-top: 30px;
  183. margin-bottom: 50px;
  184. }
  185. .android-os span {
  186. background: #80B354;
  187. }
  188. .ios-os span {
  189. background: #F5A623;
  190. }
  191. .windows-os span {
  192. background: #F8E71C;
  193. }
  194. .calendar-views span:hover {
  195. border: 2px solid #BDC6CF;
  196. cursor: pointer;
  197. border-radius: 15px;
  198. }
  199. </style>
  200. <style>
  201. body{
  202. background: #e68a43;
  203. }
  204. ul{
  205. list-style-type: none;
  206. }
  207. .list-group{
  208. width: 250px !important;
  209. }
  210. .list-group-item{
  211. margin-top:16px;
  212. border-radius: none;
  213. background: #e68a43;
  214. cursor: pointer;
  215. transition: all 0.3s ease-in-out;
  216. }
  217. .list-group-item:hover{
  218. transform: scaleX(1.1);
  219. }
  220. .check{
  221. opacity: 0;
  222. transition: all 0.6s ease-in-out;
  223. }
  224. .list-group-item:hover .check {
  225. opacity: 1;
  226. }
  227. .about span{
  228. font-size: 16px;
  229. margin-right: 10px;
  230. }
  231. </style>
  232. </body>
  233. </html>