1
1
{% load static %}
2
- < div class ="container ">
3
- {% load custom_filters %}
4
- {% if events %}
5
- < div class ="columns is-multiline is-variable is-4 ">
6
- {% for event in events %}
7
- < div class ="column is-12-mobile is-12-tablet is-6-desktop ">
8
- < div class ="box " style ="padding: 1.5rem; ">
9
- < div class ="mb-4 ">
10
- <!-- Event Title -->
11
- < h2 class ="title is-5 mb-2 "> {{ event.summary }}</ h2 >
12
- <!-- Date/Time Subtitle -->
13
- < div class ="is-flex " style ="align-items: center; ">
14
- < span class ="icon has-text-grey " style ="flex: 0 0 auto; ">
15
- < i class ="fas fa-fw fa-clock "> </ i >
16
- </ span >
17
- {% if event.start.dateTime %}
18
- {% with event.start.dateTime|parse_iso as start_dt %}
19
- {% if event.end.dateTime %}
20
- {% with event.end.dateTime|parse_iso as end_dt %}
2
+ < section id ="upcoming-events " class ="section ">
3
+ < div class ="container ">
4
+ < div class ="content ">
5
+ < a href ="{% url 'events' %} "> < p class ="title "> Upcoming Events</ p > </ a >
6
+ < p class ="subtitle is-6 mt-2 "> Use < a href ="https://calendar.google.com/calendar/r?cid=berkeley.edu_rv641pmt9o13qnh1ss4uib78bs%40group.calendar.google.com " target ="_blank "> this link</ a > to subscribe to the calendar.</ p >
7
+ < div class ="container ">
8
+ {% load custom_filters %}
9
+ {% if events %}
10
+ < div class ="columns is-multiline is-variable is-4 ">
11
+ {% for event in events %}
12
+ < div class ="column is-12-mobile is-12-tablet is-6-desktop ">
13
+ < div class ="box " style ="padding: 1.5rem; ">
14
+ < div class ="mb-4 ">
15
+ <!-- Event Title -->
16
+ < h2 class ="title is-5 mb-2 "> {{ event.summary }}</ h2 >
17
+ <!-- Date/Time Subtitle -->
18
+ < div class ="is-flex " style ="align-items: center; ">
19
+ < span class ="icon has-text-grey " style ="flex: 0 0 auto; ">
20
+ < i class ="fas fa-fw fa-clock "> </ i >
21
+ </ span >
22
+ {% if event.start.dateTime %}
23
+ {% with event.start.dateTime|parse_iso as start_dt %}
24
+ {% if event.end.dateTime %}
25
+ {% with event.end.dateTime|parse_iso as end_dt %}
26
+ < span class ="has-text-weight-semibold " style ="flex: 1; margin-left: 0.5rem; ">
27
+ {{ start_dt|date:"l, F jS" }}, {{ start_dt|date:"g:i A" }} – {{ end_dt|date:"g:i A" }}
28
+ </ span >
29
+ {% endwith %}
30
+ {% else %}
31
+ < span class ="has-text-weight-semibold " style ="flex: 1; margin-left: 0.5rem; ">
32
+ {{ start_dt|date:"l, F jS" }}, {{ start_dt|date:"g:i A" }}
33
+ </ span >
34
+ {% endif %}
35
+ {% endwith %}
36
+ {% elif event.start.date %}
37
+ {% with event.start.date|parse_iso as start_date %}
21
38
< span class ="has-text-weight-semibold " style ="flex: 1; margin-left: 0.5rem; ">
22
- {{ start_dt |date:"l, F jS" }}, {{ start_dt|date:"g:i A" }} – {{ end_dt|date:"g:i A" }}
39
+ {{ start_date |date:"l, F jS" }}, All Day
23
40
</ span >
24
41
{% endwith %}
25
- {% else %}
26
- < span class ="has-text-weight-semibold " style ="flex: 1; margin-left: 0.5rem; ">
27
- {{ start_dt|date:"l, F jS" }}, {{ start_dt|date:"g:i A" }}
42
+ {% endif %}
43
+ </ div >
44
+ <!-- Event Location (if available) -->
45
+ {% if event.location %}
46
+ < div class ="is-flex " style ="align-items: center; ">
47
+ < span class ="icon has-text-grey " style ="flex: 0 0 auto; ">
48
+ < i class ="fas fa-fw fa-map-marker-alt "> </ i >
49
+ </ span >
50
+ < span class ="has-text-weight-semibold "
51
+ style ="flex: 1; margin-left: 0.5rem; ">
52
+ {{ event.location }}
28
53
</ span >
54
+ </ div >
29
55
{% endif %}
30
- {% endwith %}
31
- {% elif event.start.date %}
32
- {% with event.start.date|parse_iso as start_date %}
33
- < span class ="has-text-weight-semibold " style ="flex: 1; margin-left: 0.5rem; ">
34
- {{ start_date|date:"l, F jS" }}, All Day
35
- </ span >
36
- {% endwith %}
37
- {% endif %}
38
- </ div >
39
- <!-- Event Location (if available) -->
40
- {% if event.location %}
41
- < div class ="is-flex " style ="align-items: center; ">
42
- < span class ="icon has-text-grey " style ="flex: 0 0 auto; ">
43
- < i class ="fas fa-fw fa-map-marker-alt "> </ i >
44
- </ span >
45
- < span class ="has-text-weight-semibold "
46
- style ="flex: 1; margin-left: 0.5rem; ">
47
- {{ event.location }}
48
- </ span >
49
- </ div >
50
- {% endif %}
56
+ </ div >
57
+ <!-- Event Description -->
58
+ {% if event.description %}
59
+ < div class ="content "> {{ event.description|safe|linebreaks }}</ div >
60
+ {% else %}
61
+ < div class ="content "> < em > No description available.</ em > </ div >
62
+ {% endif %}
63
+ </ div >
51
64
</ div >
52
- <!-- Event Description -->
53
- {% if event.description %}
54
- < div class ="content "> {{ event.description|safe|linebreaks }}</ div >
55
- {% else %}
56
- < div class ="content "> < em > No description available.</ em > </ div >
57
- {% endif %}
58
- </ div >
65
+ {% endfor %}
66
+ </ div >
67
+ {% else %}
68
+ < div class ="notification is-info is-light ">
69
+ No events currently scheduled.
59
70
</ div >
60
- {% endfor %}
71
+ {% endif %}
61
72
</ div >
62
- {% else %}
63
- < div class ="notification is-info is-light ">
64
- No events currently scheduled.
65
73
</ div >
66
- {% endif %}
67
- </ div >
74
+ </ div >
75
+ </ section >
0 commit comments