mirror of
https://github.com/brmlab/povoden.git
synced 2025-06-09 10:45:16 +02:00
use loops for weather stations
This commit is contained in:
parent
41744ccc85
commit
352d86ce9c
2 changed files with 43 additions and 84 deletions
79
index.haml
79
index.haml
|
@ -1,4 +1,7 @@
|
|||
!!! 5
|
||||
|
||||
- @stations=[ 307225, 307081, 307228, ]
|
||||
|
||||
%html
|
||||
%head
|
||||
%meta(charset="utf-8")
|
||||
|
@ -17,63 +20,25 @@
|
|||
|
||||
.content
|
||||
|
||||
%table.twocolumn
|
||||
%tr
|
||||
%td(style="padding: 16px;")
|
||||
.imgstav
|
||||
%img(src="data/stav.png")
|
||||
.imgprutok
|
||||
%img(src="data/prutok.png")
|
||||
%td(style="padding: 16px;")
|
||||
%table#legend24h(style="margin: 16px;")
|
||||
=File.read("data/legend.html")
|
||||
%table#table24h
|
||||
%tr
|
||||
%th datum a čas
|
||||
%th stav [cm]
|
||||
%th průtok [m<sup>3</sup>s<sup>-1</sup>]
|
||||
%th teplota [°C]
|
||||
=File.read("data/table.html")
|
||||
- @stations.each do |station|
|
||||
%table.twocolumn
|
||||
%tr
|
||||
%td(style="padding: 16px;")
|
||||
.imgstav
|
||||
%img(src="data/stav_#{station}.png")
|
||||
.imgprutok
|
||||
%img(src="data/prutok_#{station}.png")
|
||||
%td(style="padding: 16px;")
|
||||
%table#legend24h(style="margin: 16px;")
|
||||
=File.read("data/legend.html")
|
||||
%table#table24h
|
||||
%tr
|
||||
%th datum a čas
|
||||
%th stav [cm]
|
||||
%th průtok [m<sup>3</sup>s<sup>-1</sup>]
|
||||
%th teplota [°C]
|
||||
=File.read("data/table_#{station}.html")
|
||||
|
||||
%hr
|
||||
%hr
|
||||
|
||||
%table.twocolumn
|
||||
%tr
|
||||
%td(style="padding: 16px;")
|
||||
.imgstav
|
||||
%img(src="data/stav_melnik.png")
|
||||
.imgprutok
|
||||
%img(src="data/prutok_melnik.png")
|
||||
%td(style="padding: 16px;")
|
||||
%table#legend24h(style="margin: 16px;")
|
||||
=File.read("data/legend_melnik.html")
|
||||
%table#table24h
|
||||
%tr
|
||||
%th datum a čas
|
||||
%th stav [cm]
|
||||
%th průtok [m<sup>3</sup>s<sup>-1</sup>]
|
||||
%th teplota [°C]
|
||||
=File.read("data/table_melnik.html")
|
||||
|
||||
%hr
|
||||
|
||||
%table.twocolumn
|
||||
%tr
|
||||
%td(style="padding: 16px;")
|
||||
.imgstav
|
||||
%img(src="data/stav_usti.png")
|
||||
.imgprutok
|
||||
%img(src="data/prutok_usti.png")
|
||||
%td(style="padding: 16px;")
|
||||
%table#legend24h(style="margin: 16px;")
|
||||
=File.read("data/legend_usti.html")
|
||||
%table#table24h
|
||||
%tr
|
||||
%th datum a čas
|
||||
%th stav [cm]
|
||||
%th průtok [m<sup>3</sup>s<sup>-1</sup>]
|
||||
%th teplota [°C]
|
||||
=File.read("data/table_usti.html")
|
||||
|
||||
%hr
|
||||
.footer Data poskytuje Český hydrometeorologický ústav. Bez záruky.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue