|
8 | 8 |
|
9 | 9 | {% block header_content %}
|
10 | 10 | {% if featured %}
|
11 |
| - <div class="featured-event"> |
| 11 | + <div class="featured-event"> |
12 | 12 |
|
13 |
| - <h2 class="welcome-message">Featured Python Event</h2> |
| 13 | + <h2 class="welcome-message">Featured Python Event</h2> |
14 | 14 |
|
15 |
| - <h1 class="call-to-action">{{ featured.title|striptags }}</h1> |
| 15 | + <h1 class="call-to-action">{{ featured.title|striptags }}</h1> |
16 | 16 |
|
17 |
| - <p class="event-date"><time datetime="{{ featured.next_datetime.dt_start|date:'c' }}"> |
18 |
| - {{ featured.next_datetime.dt_start|date:"l, F d, Y" }} |
19 |
| - </time></p> |
20 |
| - <p class="excerpt">{{ featured.description.rendered|striptags|truncatewords:"60" }} <a class="readmore" href="{{ featured.get_absolute_url }}">Read more</a></p> |
21 |
| - </div> |
| 17 | + <p class="event-date"> |
| 18 | + <time datetime="{{ featured.next_datetime.dt_start|date:'c' }}"> |
| 19 | + {{ featured.next_datetime.dt_start|date:"l, F d, Y" }} |
| 20 | + </time> |
| 21 | + </p> |
| 22 | + <p class="excerpt">{{ featured.description.rendered|striptags|truncatewords:"60" }} <a class="readmore" |
| 23 | + href="{{ featured.get_absolute_url }}">Read |
| 24 | + more</a></p> |
| 25 | + </div> |
22 | 26 | {% endif %}
|
23 | 27 | {% endblock header_content %}
|
24 | 28 |
|
25 |
| - |
26 |
| -{# Based on python/events.html #} |
27 |
| - |
28 | 29 | {% block content %}
|
29 | 30 |
|
30 |
| - {% if calendar %} |
| 31 | + {% if calendar %} |
31 | 32 | <header class="article-header">
|
32 | 33 | <h3>from the {{ calendar.name }}</h3>
|
33 | 34 | </header>
|
34 |
| - {% endif %} |
| 35 | + {% endif %} |
35 | 36 |
|
36 |
| - <div class="most-recent-events"> |
| 37 | + <div class="most-recent-events"> |
| 38 | + {% if events_now %} |
37 | 39 | <div class="shrubbery">
|
38 |
| - <h2 class="widget-title"><span aria-hidden="true" class="icon-calendar"></span>Upcoming Events</h2> |
39 |
| - {% if page_obj.has_next %} |
40 |
| - <p class="give-me-more"><a href="?page={{ page_obj.next_page_number }}" title="More Events">More</a></p> |
41 |
| - {% endif %} |
| 40 | + <h2 class="widget-title"><span aria-hidden="true" class="icon-calendar"></span>Happening Now</h2> |
42 | 41 | <ul class="list-recent-events menu">
|
43 |
| - {% for object in object_list %} |
| 42 | + {% for object in events_now %} |
| 43 | + <li> |
| 44 | + <h3 class="event-title"><a |
| 45 | + href="{{ object.get_absolute_url }}">{{ object.title|striptags }}</a></h3> |
| 46 | + <p> |
| 47 | + {% with object.occurring_rule as next_time %} |
| 48 | + {% include "events/includes/time_tag.html" %} |
| 49 | + {% endwith %} |
| 50 | + |
| 51 | + {% if object.venue %} |
| 52 | + <span class="event-location">{% if object.venue.url %} |
| 53 | + <a href="{{ object.venue.url }}">{% endif %}{{ object.venue.name }} |
| 54 | + {% if object.venue.url %}</a>{% endif %}{% if object.venue.address %}, |
| 55 | + {{ object.venue.address }}{% endif %}</span> |
| 56 | + {% endif %} |
| 57 | + </p> |
| 58 | + </li> |
| 59 | + {% endfor %} |
| 60 | + </ul> |
| 61 | + </div> |
| 62 | + {% endif %} |
| 63 | + |
| 64 | + <div class="shrubbery"> |
| 65 | + <h2 class="widget-title"><span aria-hidden="true" class="icon-calendar"></span>Upcoming Events</h2> |
| 66 | + {% if page_obj.has_next %} |
| 67 | + <p class="give-me-more"><a href="?page={{ page_obj.next_page_number }}" title="More Events">More</a></p> |
| 68 | + {% endif %} |
| 69 | + <ul class="list-recent-events menu"> |
| 70 | + {% for object in upcoming_events %} |
44 | 71 | <li>
|
45 |
| - <h3 class="event-title"><a href="{{ object.get_absolute_url }}">{{ object.title|striptags }}</a></h3> |
| 72 | + <h3 class="event-title"><a href="{{ object.get_absolute_url }}">{{ object.title|striptags }}</a> |
| 73 | + </h3> |
46 | 74 | <p>
|
47 | 75 | {% with object.next_time as next_time %}
|
48 |
| - {% include "events/includes/time_tag.html" %} |
| 76 | + {% include "events/includes/time_tag.html" %} |
49 | 77 | {% endwith %}
|
50 | 78 |
|
51 | 79 | {% if object.venue %}
|
52 |
| - <span class="event-location">{% if object.venue.url %}<a href="{{ object.venue.url }}">{% endif %}{{ object.venue.name }}{% if object.venue.url %}</a>{% endif %}{% if object.venue.address %}, {{ object.venue.address }}{% endif %}</span> |
| 80 | + <span class="event-location">{% if object.venue.url %} |
| 81 | + <a href="{{ object.venue.url }}">{% endif %}{{ object.venue.name }} |
| 82 | + {% if object.venue.url %}</a>{% endif %}{% if object.venue.address %}, |
| 83 | + {{ object.venue.address }}{% endif %}</span> |
53 | 84 | {% endif %}
|
54 | 85 | </p>
|
55 | 86 | </li>
|
56 | 87 | {% endfor %}
|
57 |
| - </ul> |
58 |
| - </div> |
59 |
| - |
60 |
| - {% if events_today %} |
61 |
| - <h3 class="widget-title just-missed">You just missed...</h3> |
62 |
| - <ul class="list-recent-events menu"> |
63 |
| - {% for object in events_today %} |
64 |
| - <li> |
65 |
| - <h3 class="event-title"><a href="{{ object.get_absolute_url }}">{{ object.title|striptags }}</a></h3> |
66 |
| - <p> |
67 |
| - {% with object.previous_time as next_time %} |
68 |
| - {% include "events/includes/time_tag.html" %} |
69 |
| - {% endwith %} |
70 |
| - |
71 |
| - {% if object.venue %} |
72 |
| - <span class="event-location">{% if object.venue.url %}<a href="{{ object.venue.url }}">{% endif %}{{ object.venue.name }}{% if object.venue.url %}</a>{% endif %}{% if object.venue.address %}, {{ object.venue.address }}{% endif %}</span> |
73 |
| - {% endif %} |
74 |
| - </p> |
75 |
| - </li> |
76 |
| - {% endfor %} |
77 | 88 | </ul>
|
78 |
| - {% endif %} |
79 | 89 | </div>
|
| 90 | + |
| 91 | + {% if events_just_missed %} |
| 92 | + <div class="shrubbery"> |
| 93 | + <h3 class="widget-title just-missed">You just missed...</h3> |
| 94 | + <ul class="list-recent-events menu"> |
| 95 | + {% for object in events_just_missed %} |
| 96 | + <li> |
| 97 | + <h3 class="event-title"><a |
| 98 | + href="{{ object.get_absolute_url }}">{{ object.title|striptags }}</a></h3> |
| 99 | + <p> |
| 100 | + {% with object.previous_time as next_time %} |
| 101 | + {% include "events/includes/time_tag.html" %} |
| 102 | + {% endwith %} |
| 103 | + |
| 104 | + {% if object.venue %} |
| 105 | + <span class="event-location">{% if object.venue.url %} |
| 106 | + <a href="{{ object.venue.url }}">{% endif %}{{ object.venue.name }} |
| 107 | + {% if object.venue.url %}</a>{% endif %}{% if object.venue.address %}, |
| 108 | + {{ object.venue.address }}{% endif %}</span> |
| 109 | + {% endif %} |
| 110 | + </p> |
| 111 | + </li> |
| 112 | + {% endfor %} |
| 113 | + </ul> |
| 114 | + </div> |
| 115 | + {% endif %} |
| 116 | + </div> |
80 | 117 | {% endblock content %}
|
0 commit comments