From 3437fc2c4460d1e55d38dab1473fe412641ecfb9 Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Thu, 14 Nov 2013 16:22:42 +0000 Subject: display tweaks --- forecast.html.tt | 120 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 63 insertions(+), 57 deletions(-) (limited to 'forecast.html.tt') diff --git a/forecast.html.tt b/forecast.html.tt index 9b981fd..17cef7f 100644 --- a/forecast.html.tt +++ b/forecast.html.tt @@ -1,4 +1,5 @@ [% + USE Number.Format(DECIMAL_DIGITS=1); cur = f.currently; today = f.daily.data.0; today_start = f.hourly.data.0.time.clone today_stop = f.hourly.data.0.time.clone.add('days'=>1); @@ -30,28 +31,44 @@ body, table { font-size: 15px; } + + table { border-collapse: collapse; empty-cells: show } + table td { border: dotted thin black; padding: 2px } + + div.forecast dt { display: none } + div.forecast dd { display: inline; margin: 0; border: 0 } + + .icon img { + width: 2em; height: 2em; + float: left; margin: 0 5px 5px 0; + } + div.currently, div.next-hour, div.next-day, div.next-week { float: left; clear: none; width: 24%; } - div.days { clear: both } - div.days dl { float: left; width: 30% } + div.today { clear: both } + div.today { float: left; width: 40%; margin-right: 10px; } + + dl.today dt.temperature, dl.today dd.temperature { display: inherit } + dl.today dt.sunrise, dl.today dt.sunset { display: inline } div.bus, div.tube { float: left } - - table { border-collapse: collapse; empty-cells: show } - table td { border: dotted thin black } + div.tube { width: 75% } + + div.tube table { font-size: 75% } + + div.tube td.status { width: 10em } + div.tube td.details { width: 10em } + + div.timeline { float: right } + div.timeline table { font-size: 75% } - .icon img { - width: 2em; height: 2em; - float: left; - } .stripes { text-align: center; border: solid thin black; } .stripes span { - font-size: 30%; vertical-align: middle; } @@ -63,13 +80,13 @@ [% cur.icon %]
Temperature:
-
[% cur.temperature %]°
+
[% cur.temperature|round %]°
Summary:
[% cur.summary %]
-

Next hour

+

Hour

[% f.minutely.icon %]
Summary:
@@ -77,7 +94,7 @@
-

Next 24 hours

+

Day

[% hourly.icon %]
Summary:
@@ -85,50 +102,28 @@
-

Next 7 days

+

Week

[% f.daily.icon %]
Summary:
[% f.daily.summary %]
-
-
-

Today

- [% today.icon %] -
-
Summary:
-
[% today.summary %]
-
Min temperature:
-
[% today.temperatureMin %]° [% time(today.temperatureMinTime) %]
-
Max temperature:
-
[% today.temperatureMax %]° [% time(today.temperatureMaxTime) %]
-
Sunrise:
-
[% time(today.sunriseTime) %]
-
Sunset:
-
[% time(today.sunsetTime) %]
-
-
- - - [% FOR span IN hourly.spans_by_string('summary'); - width=hours_length(span) %] - - [% END %] - - - [% FOR h IN hourly.data; BREAK IF loop.last %] - - [% END %] - - - [% FOR h IN hourly.data; BREAK IF loop.last %] - - [% END %] - -
[% span.value %]
[% time(h.time) %]
[% h.temperature %]°
-
-
+
+

Today

+ [% today.icon %] +
+
Summary:
+
[% today.summary %]
+
Min temperature:
+
[% today.temperatureMin|round %]° [% time(today.temperatureMinTime) %]
+
Max temperature:
+
[% today.temperatureMax|round %]° [% time(today.temperatureMaxTime) %]
+
Sunrise:
+
[% time(today.sunriseTime) %]
+
Sunset:
+
[% time(today.sunsetTime) %]
+
@@ -139,14 +134,25 @@ [% FOREACH p IN b.Prediction %] - [% p.LineName %] - [% p.DestinationText %] - [% minsec_until(p.EstimatedTime) %] + [% p.LineName %] + [% p.DestinationText %] + [% minsec_until(p.EstimatedTime) %] [% END %]
+
+ + [% FOR h IN hourly.data; BREAK IF loop.last %] + + + + + + [% END %] +
[% h.summary %][% time(h.time) %][% h.temperature|round %]°
+
@@ -155,9 +161,9 @@ [% FOREACH line IN t.lines %] - - - + + + [% END %] -- cgit v1.2.3
[% line.name %][% line.status.description %][% line.status.details %][% line.name %][% line.status.description %][% line.status.details %]