index.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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">
  6. <title>Weather Station</title>
  7. <style>
  8. div.graph-container {
  9. text-align: center;
  10. }
  11. h2, #last-update {
  12. text-align: center;
  13. font-family: sans, 'sans-serif';
  14. }
  15. #time-series-graphs canvas {
  16. max-width: 800px;
  17. max-height: 300px;
  18. display: inline-block !important;
  19. }
  20. #gauges {
  21. display: flex;
  22. flex-flow: row wrap;
  23. justify-content: center;
  24. width: 100%;
  25. }
  26. #gauges > div {
  27. flex-grow: 1;
  28. flex-shrink: 1;
  29. flex-basis: 2cm;
  30. max-width: 5cm;
  31. }
  32. /* The unfilled part of a dial */
  33. #gauges .gauge > .dial {
  34. stroke-width: 3px;
  35. }
  36. /* The filled part of a dial */
  37. #gauges .gauge > .value {
  38. stroke-width: 7px;
  39. }
  40. @media only screen and (max-width: 500px) {
  41. #gauges > div.temperature {
  42. min-width: 80%;
  43. flex-grow: 2;
  44. flex-shrink: 0;
  45. }
  46. #gauges > div:not(.temperature) {
  47. min-width: 30%;
  48. }
  49. }
  50. </style>
  51. </head>
  52. <body>
  53. <div id="gauges"></div>
  54. <div id="last-update">
  55. <strong>Latest reading:</strong>
  56. <span id="last-update-value"></span>
  57. </div>
  58. <div id="time-series-graphs"></div>
  59. <div id="hour-selector">
  60. <label>
  61. Hours to show:
  62. <select id="hours-ago"></select>
  63. </label>
  64. </div>
  65. <!--suppress HtmlUnknownTarget -->
  66. <script src="js/main.js" async></script>
  67. </body>
  68. </html>