diff options
| author | Felix Hanley <felix@userspace.com.au> | 2020-02-20 05:41:38 +0000 |
|---|---|---|
| committer | Felix Hanley <felix@userspace.com.au> | 2020-02-20 05:41:38 +0000 |
| commit | f0b363741a50ecba0ae7785c32e96c742af9e3db (patch) | |
| tree | fd89b5192f7cf4e8c1faa242236d882ccc7bee77 | |
| parent | 8e53f314cab7e96fb11e4a8d1dfe537e58bcc9ed (diff) | |
| download | sws-f0b363741a50ecba0ae7785c32e96c742af9e3db.tar.gz sws-f0b363741a50ecba0ae7785c32e96c742af9e3db.tar.bz2 | |
Fix chart css
| -rw-r--r-- | static/default.css | 4 | ||||
| -rw-r--r-- | templates/charts.tmpl | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/static/default.css b/static/default.css index 42f5b81..aa1b8f6 100644 --- a/static/default.css +++ b/static/default.css @@ -76,7 +76,7 @@ main { .chart .slot:before, .chart .slot:after { bottom: 100%; - content: attr(data-count); + content: attr(data-y); display: none; font-size: .75em; left: 50%; @@ -88,7 +88,7 @@ main { } /* time */ .chart .slot:after { - content: attr(data-date); + content: attr(data-x); margin-top: .5rem; top: 100%; } diff --git a/templates/charts.tmpl b/templates/charts.tmpl index d0d973f..d5d6db0 100644 --- a/templates/charts.tmpl +++ b/templates/charts.tmpl @@ -2,7 +2,7 @@ <ul class="chart bar"> {{ $max := .CountMax }} {{ range .Data }} - <li class="slot{{ if eq .Time.Hour 0 }} midnight{{ end }}" data-date="{{ .Time|timeHour }}" data-count="{{ .Count }}" data-percent="{{ percent .Count $max }}"> + <li class="slot{{ if eq .Time.Hour 0 }} midnight{{ end }}" data-x="{{ .Time|timeHour }}" data-y="{{ .Count }}" data-percent="{{ percent .Count $max }}"> <div class="bar" style="height:{{ percent .Count $max }}%" /> </li> {{ end }} |
