silvrgit/lib/jade/today.jade
2017-04-18 10:26:38 +01:00

95 lines
3.1 KiB
Plaintext

html(lang="en")
head
meta(charset='utf-8')
title
Today
body
h1 Today
.stuff
| !{data.today}
.weather
h2 Weather
p Currently:
= ' ' + data.weather.currently
p Today:
= ' ' + data.weather.today
p Later:
= ' ' + data.weather.later
if data.weather.alerts.length > 0
h3 ALERT
each alert in data.weather.alerts
p(style="color:red;")= alert.title
p= alert.description
.travel
h2 Travel
if data.trains.data.length > 0
each alert in data.trains.data
strong= alert.title
p= alert.description
else
p Nothing to report.
.calendar
h2 Calendar
h3 Today
if (data.cal.today.length > 0)
each line in data.cal.today
p !{line.combined}
else
p Nothing today
h3 Tomorrow
if (data.cal.tomorrow.length > 0)
each line in data.cal.tomorrow
p !{line.combined}
else
p Nothing tomorrow
h3 This week
if (data.cal.week.length > 0)
each line in data.cal.week
p !{line.longcombined}
else
p Nothing later this week
.fitbit
if data.fitbit.summary
h2 Fitbit
p Yesterday you walked #{data.fitbit.summary.steps} steps and covered #{data.fitbit.summary.distances[0].distance} km.
p You were sedentary for #{data.fitbit.summary.sedentaryMinutes} minutes, lightly active for #{data.fitbit.summary.lightlyActiveMinutes} minutes, fairly active for #{data.fitbit.summary.fairlyActiveMinutes} and very active for #{data.fitbit.summary.veryActiveMinutes}
.ftse
if data.ftse
h2 FTSE
each line in data.ftse
table
tr
td= line.name
td= line.price
td= line.change_amount
td= line.change_percent
.swedish
h2 Word of the day
p(style="font-weight:900;")= data.swedish.xml.words.word
p It is an #{data.swedish.xml.words.wordtype} which means '<em>#{data.swedish.xml.words.translation}</em>'.
p Example: #{data.swedish.xml.words.fnphrase}
p Translated: #{data.swedish.xml.words.enphrase}
.quotes
h2 Quote
p #{data.quotes.quote} <em>#{data.quotes.author}</em>
.history
h2 Today in history
if data.history.length > 0
each line in data.history
p= line
else
p Nothing of note happened today.
.tv
if data.tv.entries.length > 0
h2 Todays TV
each line in data.tv.entries
p !{line.combined}