@@ -3,33 +3,41 @@ <h1>Upcoming Events</h1>
3
3
< h5 > < i > You won't want to miss them!</ i > </ h5 >
4
4
< div class ="row justify-content-center ">
5
5
< div class ="col-md-12 custom-box shadow-lg p-3 mb-5 bg-body ">
6
- {% if events.events.items |length == 0 %}
6
+ {% if events|length == 0 %}
7
7
< h3 style ="justify-content: center; padding-top: 10px; "> No events at the
8
8
moment, check back later!</ h3 >
9
9
{% else %}
10
10
< div class ="container mt-4 ">
11
11
< div class ="row ">
12
-
13
- {% for event_key, event in events.events.items %}
12
+ {% for event in events %}
14
13
< div class ="col-md-4 ">
15
14
< div class ="committee-member "
16
15
style ="border-radius: 25px; padding-top: 20px; padding-bottom: 20px; background-color: #202E4E; ">
17
- < img src ="{{ event.image }} " alt ="Event Image " width ="300px "
18
- height =" 300px " >
16
+ < img src ="{{ event.image|default:'/static/assets/img/other/upcoming_event.png' }} " alt ="Event Image " width ="300px " height =" 300px " >
17
+
19
18
< h3 > {{ event.name }}</ h3 >
20
- < h5 > < strong > Starts:</ strong > {{ event.start }}</ h5 >
21
- < h5 > < strong > Ends:</ strong > {{ event.end }}</ h5 >
22
- < h5 > < strong > Location:</ strong > < a href ="{{ event.location }} "
23
- target ="_blank "> Join Here</ a > </ h5 >
19
+
20
+ < h5 >
21
+ < strong > Starts:</ strong > {{ event.formatted_start }}
22
+ </ h5 >
23
+ < h5 >
24
+ < strong > Ends:</ strong > {{ event.formatted_end }}
25
+ </ h5 >
26
+
27
+ < h5 > < strong > Location:</ strong > {{ event.location }}</ h5 >
24
28
< button type ="button " class ="btn btn-primary " data-toggle ="modal "
25
29
data-target ="#moreInfoModal_{{ forloop.counter }} "
26
30
style ="background-color: #9791FF; ">
27
31
Description
28
32
</ button >
29
- < a href ="https://dcuclubsandsocs.ie/society/media-production#events " target ="_blank "> < button type ="button " class ="btn btn-primary "
30
- style ="background-color: #9791FF; ">
31
- View Event
32
- </ button > </ a >
33
+ < a
34
+ href ="https://dcuclubsandsocs.ie/society/media-production#events "
35
+ target ="_blank ">
36
+ < button type ="button " class ="btn btn-primary "
37
+ style ="background-color: #9791FF; ">
38
+ View Event
39
+ </ button >
40
+ </ a >
33
41
34
42
< div class ="modal fade " id ="moreInfoModal_{{ forloop.counter }} "
35
43
tabindex ="-1 " role ="dialog "
@@ -63,7 +71,6 @@ <h5><strong>Location:</strong> <a href="{{ event.location }}"
63
71
</ div >
64
72
</ div >
65
73
{% endfor %}
66
-
67
74
</ div >
68
75
</ div >
69
76
{% endif %}
0 commit comments