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-11-13 08:42:18 +00:00
|
|
|
<link rel="icon" type="image/svg" href="{{ url_for("static", filename="Countdown_(50361)_-_The_Noun_Project.svg") }}">
|
2023-11-01 15:04:13 +00:00
|
|
|
|
|
|
|
<script type='importmap'>
|
|
|
|
{
|
|
|
|
"imports": {
|
|
|
|
"@fullcalendar/core": "https://cdn.skypack.dev/@fullcalendar/core@6.1.9",
|
|
|
|
"@fullcalendar/daygrid": "https://cdn.skypack.dev/@fullcalendar/daygrid@6.1.9",
|
|
|
|
"@fullcalendar/timegrid": "https://cdn.skypack.dev/@fullcalendar/timegrid@6.1.9",
|
2023-11-12 18:04:24 +00:00
|
|
|
"@fullcalendar/list": "https://cdn.skypack.dev/@fullcalendar/list@6.1.9",
|
|
|
|
"@fullcalendar/core/locales/en-gb": "https://cdn.skypack.dev/@fullcalendar/core@6.1.9/locales/en-gb"
|
2023-11-01 15:04:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<script type='module'>
|
|
|
|
import { Calendar } from '@fullcalendar/core'
|
|
|
|
import dayGridPlugin from '@fullcalendar/daygrid'
|
|
|
|
import timeGridPlugin from '@fullcalendar/timegrid'
|
|
|
|
import listPlugin from '@fullcalendar/list'
|
2023-11-12 18:04:24 +00:00
|
|
|
import gbLocale from '@fullcalendar/core/locales/en-gb';
|
2023-11-01 15:04:13 +00:00
|
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
|
|
const calendarEl = document.getElementById('calendar')
|
|
|
|
const calendar = new Calendar(calendarEl, {
|
2023-11-12 18:04:24 +00:00
|
|
|
locale: gbLocale,
|
2023-11-01 15:04:13 +00:00
|
|
|
plugins: [dayGridPlugin, timeGridPlugin, listPlugin ],
|
|
|
|
themeSystem: 'bootstrap5',
|
|
|
|
firstDay: 1,
|
2023-11-03 15:27:39 +00:00
|
|
|
initialView: 'dayGridMonth',
|
2023-11-01 15:04:13 +00:00
|
|
|
headerToolbar: {
|
|
|
|
left: 'prev,next today',
|
|
|
|
center: 'title',
|
|
|
|
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
|
|
|
|
},
|
2023-11-01 15:25:46 +00:00
|
|
|
nowIndicator: true,
|
|
|
|
weekNumbers: true,
|
2023-11-01 15:12:53 +00:00
|
|
|
eventTimeFormat: {
|
|
|
|
hour: '2-digit',
|
|
|
|
minute: '2-digit',
|
|
|
|
hour12: false,
|
|
|
|
},
|
2023-11-01 15:25:46 +00:00
|
|
|
events: {{ fullcalendar_events | tojson(indent=2) }},
|
|
|
|
eventDidMount: function(info) {
|
|
|
|
info.el.title = info.event.title;
|
|
|
|
},
|
2023-11-01 15:04:13 +00:00
|
|
|
})
|
|
|
|
calendar.render()
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
2023-10-02 20:35:30 +01:00
|
|
|
</head>
|
|
|
|
|
2023-10-05 11:07:01 +01:00
|
|
|
{% set event_labels = {
|
2023-11-05 18:01:08 +00:00
|
|
|
"economist": "The Economist",
|
2023-10-05 11:07:01 +01:00
|
|
|
"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",
|
2023-11-10 10:49:27 +00:00
|
|
|
"us_presidential_election": "US pres. election",
|
2023-10-05 11:07:01 +01:00
|
|
|
"xmas_last_second": "Christmas last posting 2nd class",
|
|
|
|
"xmas_last_first": "Christmas last posting 1st class",
|
2023-11-08 14:40:07 +00:00
|
|
|
"up_series": "Up documentary",
|
2023-10-08 19:53:44 +01:00
|
|
|
"waste_schedule": "Waste schedule",
|
2023-10-29 14:59:03 +00:00
|
|
|
"gwr_advance_tickets": "GWR advance tickets",
|
2023-10-29 15:17:24 +00:00
|
|
|
"critical_mass": "Critical Mass",
|
2023-10-05 11:07:01 +01:00
|
|
|
}
|
|
|
|
%}
|
|
|
|
|
2023-10-11 17:31:16 +01:00
|
|
|
{%set class_map = {
|
|
|
|
"bank_holiday": "bg-success-subtle",
|
|
|
|
"conference": "bg-primary-subtle",
|
|
|
|
"us_holiday": "bg-secondary-subtle",
|
|
|
|
"birthday": "bg-info-subtle",
|
|
|
|
"waste_schedule": "bg-danger-subtle",
|
|
|
|
} %}
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-10-02 20:35:30 +01:00
|
|
|
<body>
|
|
|
|
|
2023-11-05 12:15:20 +00:00
|
|
|
<div class="container-fluid mt-2">
|
2023-10-06 22:22:06 +01:00
|
|
|
<p><a href="/tools">← 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-29 14:59:03 +00:00
|
|
|
<li>GWR advance ticket furthest date:
|
|
|
|
{% if gwr_advance_tickets %}
|
|
|
|
{{ gwr_advance_tickets.strftime("%A, %-d %b %Y") }}
|
|
|
|
{% else %}
|
|
|
|
unknown
|
|
|
|
{% endif %}
|
|
|
|
</li>
|
2023-10-30 05:49:21 +00:00
|
|
|
<li>Bristol Sunrise: {{ sunrise.strftime("%H:%M:%S") }} /
|
2023-10-29 21:36:57 +00:00
|
|
|
Sunset: {{ sunset.strftime("%H:%M:%S") }}</li>
|
2023-10-02 20:35:30 +01:00
|
|
|
</ul>
|
|
|
|
|
2023-10-30 05:49:21 +00:00
|
|
|
<h3>Stock markets</h3>
|
|
|
|
{% for market in stock_markets %}
|
|
|
|
<p>{{ market }}</p>
|
|
|
|
{% endfor %}
|
|
|
|
|
2023-11-01 15:04:13 +00:00
|
|
|
<div class="mb-3" id="calendar"></div>
|
|
|
|
|
|
|
|
<h3>Agenda</h3>
|
|
|
|
|
2023-11-05 22:04:23 +00:00
|
|
|
{% for event in events if event.as_date >= two_weeks_ago %}
|
2023-11-05 13:01:35 +00:00
|
|
|
{% if loop.first or event.date.year != loop.previtem.date.year %}
|
|
|
|
<div class="row mt-2">
|
|
|
|
<div class="col">
|
|
|
|
<h5>{{ event.date.year }}</h5>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2023-11-03 15:39:11 +00:00
|
|
|
<div class="row border border-1 {% if event.name in class_map %} {{ class_map[event.name]}}{% endif %}">
|
|
|
|
<div class="col-md-3">
|
|
|
|
{{event.as_date.strftime("%a, %d, %b")}}
|
|
|
|
|
|
|
|
|
2023-10-29 16:08:17 +00:00
|
|
|
{{event.display_time or ""}}
|
2023-11-03 15:39:11 +00:00
|
|
|
|
|
|
|
|
2023-10-29 16:08:17 +00:00
|
|
|
{{event.display_timezone or ""}}
|
2023-11-03 15:39:11 +00:00
|
|
|
</div>
|
2023-10-29 16:08:17 +00:00
|
|
|
|
2023-11-03 15:39:11 +00:00
|
|
|
<div class="col-md-8 text-start">
|
2023-10-21 15:44:49 +01:00
|
|
|
{% if event.url %}<a href="{{ event.url }}">{% endif %}
|
2023-10-05 11:27:09 +01:00
|
|
|
{{ event_labels.get(event.name) or event.name }}
|
2023-10-07 09:01:54 +01:00
|
|
|
{%- if event.title -%}: {{ event.title }}{% endif %}
|
2023-10-21 15:44:49 +01:00
|
|
|
{% if event.url %}</a>{% endif %}
|
2023-11-03 15:39:11 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-md-1">
|
2023-10-21 22:58:44 +01:00
|
|
|
{{ event.delta_days(today) }}
|
2023-11-03 15:39:11 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-10-05 11:07:01 +01:00
|
|
|
{% endfor %}
|
|
|
|
|
2023-10-03 14:16:25 +01:00
|
|
|
<h3>Space launches</h3>
|
2023-10-03 13:00:23 +01:00
|
|
|
{% for launch in rockets %}
|
2023-10-06 23:00:22 +01:00
|
|
|
<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 }}
|
|
|
|
–
|
|
|
|
<strong>{{launch.mission.name }}</strong>
|
|
|
|
–
|
2023-10-03 14:16:25 +01:00
|
|
|
|
2023-10-03 13:00:23 +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 }})
|
|
|
|
—
|
|
|
|
{{ launch.orbit.name }} ({{ launch.orbit.abbrev }})
|
|
|
|
<br/>
|
|
|
|
<a href="{{ launch.pad_wikipedia_url }}">{{ launch.pad_name }}</a>
|
|
|
|
— {{ launch.location }}<br/>
|
|
|
|
|
|
|
|
{% for line in launch.mission.description.splitlines() %}
|
|
|
|
<p>{{ line }}</p>
|
|
|
|
{% endfor %}
|
|
|
|
|
2023-10-06 23:00:22 +01:00
|
|
|
</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
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|