agenda/templates/index.html

161 lines
4.7 KiB
HTML
Raw Normal View History

2023-10-05 11:07:01 +01:00
{# vim: set ft=htmljinja
#}
2023-10-02 20:35:30 +01:00
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Agenda</title>
2023-10-05 11:06:46 +01:00
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
2023-10-02 20:35:30 +01:00
</head>
2023-10-05 11:07:01 +01:00
{% set event_labels = {
"next_economist": "The Economist",
"mothers_day": "Mothers' day",
"fathers_day": "Fathers' day",
"uk_financial_year_end": "End of financial year",
"bank_holiday": "UK bank holiday",
"us_holiday": "US holiday",
"uk_clock_change": "UK clock change",
"us_clock_change": "US clock change",
"next_us_presidential_election": "US pres. election",
"xmas_last_second": "Christmas last posting 2nd class",
"xmas_last_first": "Christmas last posting 1st class",
"xmas_day": "Christmas day",
"next_up_series": "Next Up documentary",
"waste_schedule": "Waste schedule",
2023-10-05 11:07:01 +01:00
}
%}
2023-10-02 20:35:30 +01:00
<body>
<div class="container mt-2">
2023-10-06 22:22:06 +01:00
<p><a href="/tools">&larr; personal tools</a></p>
2023-10-02 20:35:30 +01:00
<h1>Agenda</h1>
<ul>
<li>Today is {{now.strftime("%A, %-d %b %Y")}}</li>
<li>GBPUSD: {{"{:,.3f}".format(gbpusd)}}</li>
2023-10-02 20:35:30 +01:00
{# <li>lock down:
{{"{:.1f}".format(lockdown_days)}} days
2023-10-05 11:07:01 +01:00
({{"{:.2f}".format(lockdown_days / 7)}} weeks) so far</li>
2023-10-02 20:35:30 +01:00
<li>The Economist: {{days(next_economist)}} (Thursday)</li>
<li>Mothers' day:
{{days(mothers_day)}}
{{mothers_day.strftime("%a, %d %b %Y")}}</li>
<li>Fathers' day:
{{days(fathers_day)}}
{{fathers_day.strftime("%a, %d %b %Y")}}</li>
<li>End of financial year:
{{days(uk_financial_year_end)}}
{{uk_financial_year_end.strftime("%a, %d %b %Y")}}</li>
2023-10-02 20:35:30 +01:00
<li>UK bank holiday:
{{days(bank_holiday["date"])}}
{{bank_holiday["date"].strftime("%a, %d %b")}}
{{bank_holiday["title"]}}</li>
<li>US holiday:
{{days(us_holiday["date"])}}
{{us_holiday["date"].strftime("%a, %d %b")}}
{{us_holiday["title"]}}</li>
<li>UK clock change:
2023-10-05 11:07:01 +01:00
{{days(uk_clock_change)}}
2023-10-02 20:35:30 +01:00
{{uk_clock_change.strftime("%a, %d, %b %Y")}}</li>
<li>US clock change:
2023-10-05 11:07:01 +01:00
{{days(us_clock_change)}}
2023-10-02 20:35:30 +01:00
{{us_clock_change.strftime("%a, %d, %b %Y")}}</li>
<li>general election:
{{days(next_uk_general_election)}}
2023-10-05 11:07:01 +01:00
{{next_uk_general_election.strftime("%a, %d %b %Y")}}</li>
2023-10-02 20:35:30 +01:00
<li>US pres. election:
{{days(next_us_presidential_election)}}
{{next_us_presidential_election.strftime("%a, %d %b %Y")}}</li>
<li>Christmas last posting 2nd class:
{{days(xmas_last_posting_dates["second"])}}
{{xmas_last_posting_dates["second"].strftime("%a, %d %b %Y")}}</li>
<li>Christmas last posting 1st class:
{{days(xmas_last_posting_dates["first"])}}
{{xmas_last_posting_dates["first"].strftime("%a, %d %b %Y")}}</li>
2023-10-03 11:32:04 +01:00
<li>Christmas day:
{{days(xmas_day)}}
{{xmas_day.strftime("%a, %d %b %Y")}}</li>
2023-10-05 11:07:01 +01:00
#}
2023-10-03 11:32:04 +01:00
2023-10-02 20:35:30 +01:00
</ul>
2023-10-05 11:07:01 +01:00
<table class="table table-hover w-auto">
{% for event in events %}
<tr>
<td class="text-end">
{{event.date.strftime("%a, %d, %b %Y")}}
</td>
<td>
{{ event_labels.get(event.name) or event.name }}
2023-10-07 09:01:54 +01:00
{%- if event.title -%}: {{ event.title }}{% endif %}
2023-10-05 11:07:01 +01:00
</td>
<td class="text-end">
{{ days(event.date) }}
</td>
{% endfor %}
</table>
2023-10-02 20:35:30 +01:00
<h3>Stock markets</h3>
{% for market in stock_markets %}
<p>{{ market }}</p>
{% endfor %}
2023-10-03 14:16:25 +01:00
<h3>Space launches</h3>
{% for launch in rockets %}
<div class="row">
<div class="col-md-1 text-nowrap text-md-end">{{ launch.t0_date }}
{% if launch.t0_time %}<br class="d-none d-md-block"/>{{ launch.t0_time }}{% endif %}</div>
<div class="col-md-1 text-md-nowrap">
<span class="d-md-none">launch status:</span>
<abbr title="{{ launch.status.name }}">{{ launch.status.abbrev }}</abbr>
</div>
<div class="col">{{ launch.rocket }}
&ndash;
<strong>{{launch.mission.name }}</strong>
&ndash;
2023-10-03 14:16:25 +01:00
{% if launch.launch_provider_abbrev %}
<abbr title="{{ launch.launch_provider }}">{{ launch.launch_provider_abbrev }}</abbr>
{% else %}
{{ launch.launch_provider }}
{% endif %}
2023-10-03 14:16:25 +01:00
({{ launch.launch_provider_type }})
&mdash;
{{ launch.orbit.name }} ({{ launch.orbit.abbrev }})
<br/>
<a href="{{ launch.pad_wikipedia_url }}">{{ launch.pad_name }}</a>
&mdash; {{ launch.location }}<br/>
{% for line in launch.mission.description.splitlines() %}
<p>{{ line }}</p>
{% endfor %}
</div>
</div>
2023-10-02 20:35:30 +01:00
{% endfor %}
2023-10-03 14:16:25 +01:00
</div>
2023-10-02 20:35:30 +01:00
2023-10-05 11:07:01 +01:00
<pre>{{ events | pprint }}</pre>
2023-10-02 20:35:30 +01:00
</body>
</html>