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.

67 lines
1.6 KiB

2 years ago
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="refresh" content="600" />
  6. <link href="/icons/weather-icons.css" rel="stylesheet" type="text/css">
  7. <style>
  8. body {
  9. font-size: 170%;
  10. }
  11. h4 {
  12. margin: 0%;
  13. }
  14. .row {
  15. }
  16. .column {
  17. display:inline-block;
  18. padding: 10px;
  19. }
  20. .wi {
  21. font-size: 200%;
  22. }
  23. </style>
  24. </head>
  25. <body>
  26. <div class="row">
  27. <div class="column" style="border:1px solid;border-radius:5px;width:30;">
  28. <h4>{{.Current.DateUnix}}</h4>
  29. <div style="margin-top:10px; margin-bottom:10px;">
  30. <i style="margin:10px;float:left;" class="wi wi-owm-{{(index .Current.Weather 0).Id}}"></i>
  31. {{.Current.Temp}}°C, {{.Current.Humidity}}%
  32. {{range $i, $e := .Daily}}{{if lt $i 1}}
  33. <br>{{.Temp.Min}}/{{.Temp.Max}} °C
  34. </div>
  35. {{(index .Weather 0).Main}}, {{(index .Weather 0).Description}}
  36. {{end}}{{end}}
  37. <br>{{.Current.Sunrise}}
  38. <br>{{.Current.Sunset}}
  39. </div>
  40. {{range $i, $e := .Daily}}{{if lt $i 6}}{{if gt $i 0}}
  41. <div class="column" style="width:10%;">
  42. <i class="wi wi-owm-{{(index .Weather 0).Id}}"></i>
  43. <h4>{{.DateUnix}}</h4>
  44. {{.Temp.Min}}/{{.Temp.Max}} °C
  45. <!-- <p>{{(index .Weather 0).Main}}, {{(index .Weather 0).Description}}</p> -->
  46. </div>
  47. {{end}}{{end}}{{end}}
  48. </div>
  49. <br>
  50. <div class="row">
  51. {{range $i, $e := .Hourly}}{{if lt $i 7}}
  52. <div class="column" style="width:10%;">
  53. <i class="wi wi-owm-{{(index .Weather 0).Id}}"></i>
  54. <h4>{{.DateUnix}}</h4>
  55. {{.Temp}}°C, {{.Humidity}}%
  56. </div>
  57. {{end}}{{end}}
  58. </div>
  59. <span style="float:right;font-size:70%;">
  60. {{.Date}}
  61. </span>
  62. <p>
  63. </p>
  64. </body>
  65. </html>