forked from wolfiex/EmailCalendarPlotter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.jinja
59 lines (48 loc) · 1.34 KB
/
template.jinja
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<style>
html, body {
margin: 0;
padding: 0;
font-family: "Plus Jakarta Sans", sans-serif;
font-size: 14px;
}
#calendar {
max-width: min(95vw,1100px);
max-height: 80vh;
margin: 40px auto;
}
ul {
list-style-type: none;
}
</style>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap" rel="stylesheet">
<div id='calendar'></div>
<div id='key'>
<ul>
{% for name, color in keys.items() %}
<li>
<div class="color-square" style="background-color: {{ color }};width:1em;height:1em;display:inline-block;padding-right:1em;">
</div>
<span style=""> {{ name }} </span>
{% endfor %}
<li>
</ul>
</div>
<script src='https://cdn.jsdelivr.net/npm/[email protected]/index.global.min.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
initialView: 'dayGridMonth',
initialDate: new Date(),
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay'
},
events: {{events}}
});
calendar.render();
});
</script>