1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use crate::templates;
markup::define! {
Index(readings: Vec<crate::reading::Reading>) {
section.hero."is-info" {
div."hero-head" { {templates::navbar::NavBar {}} }
div."hero-body" {
div.container {
h1.title."is-4" {
"Dashboard"
}
h2.subtitle."is-6" {
{readings.len()} " sensors"
}
}
}
}
section.section {
div.container {
div.columns."is-multiline" {
@for reading in {readings} {
{templates::reading::Reading { reading }}
}
}
}
}
}
}