|
1 |
| -{% extends "./base_streamfield_block.html" %} |
2 | 1 | {% load wagtailcore_tags wagtailimages_tags %}
|
3 | 2 |
|
4 |
| -{% block block_content %} |
5 |
| - <div class="row"> |
6 |
| - <div class="mb-4"> |
7 |
| - <h3>{{ value.title }}</h3> |
8 |
| - </div> |
9 |
| - </div> |
10 |
| - <div class="row"> |
11 |
| - {% for block in self.current_events %} |
12 |
| - {% with current_event=block count=self.current_events|length %} |
13 |
| - {% image current_event.image fill-350x197 as img %} |
14 |
| - <div class="col-sm-12 {% if count > 2 %} col-lg-4 col-md-6 {% else %} col-md-6 {% endif %} mb-4"> |
15 |
| - <div class="card-regular h-100 d-flex flex-column "> |
16 |
| - <img src="{{ img.url }}" /> |
17 |
| - <div class="d-flex flex-1"> |
18 |
| - <div class="key-item mx-2 mx-md-3 p-3 w-100 d-flex flex-column"> |
19 |
| - <h3 class="h3-heading mb-2">{{ current_event.title }}</h3> |
20 |
| - <p>Subheading Link Label: {{ current_event.subheading_link.0.value.label }}</p> |
21 |
| - <p>Subheading Link URL: {{ current_event.subheading_link.0.value.link_url }}</p> |
22 |
| - <p>Body: {{ current_event.body }}</p> |
23 |
| - {% for button in current_event.buttons %} |
24 |
| - <p>Button {{ forloop.counter }} Label: {{ button.value.label }}</p> |
25 |
| - <p>Button {{ forloop.counter }} Link: {{ button.value.link_url }}</p> |
26 |
| - {% endfor %} |
27 |
| - </div> |
28 |
| - </div> |
29 |
| - </div> |
| 3 | + |
| 4 | +{% load static %} |
| 5 | +<div class="tw-mb-6 last:tw-mt-6 tw-relative {% if not page.use_wide_template and page.signup %} tw-px-4 medium:tw-pl-0 medium:tw-mr-[calc(50%-50vw-33.3%)]{% else %} tw-container {% endif %}"> |
| 6 | + |
| 7 | + {# Slider main container #} |
| 8 | + <div class="swiper tw-overflow-hidden" data-carousel> |
| 9 | + |
| 10 | + {# navigation buttons #} |
| 11 | + {% include 'fragments/carousel/carousel_navigation.html' with title=value.title %} |
| 12 | + |
| 13 | + {# Additional required wrapper #} |
| 14 | + <div class="swiper-wrapper"> |
| 15 | + |
| 16 | + {# Slides #} |
| 17 | + {% for current_event in self.current_events %} |
| 18 | + {% image current_event.image fill-600x250 as img %} |
| 19 | + <div class="swiper-slide"> |
| 20 | + {% include 'fragments/event_card.html' with title=current_event.title category_url=current_event.subheading_link.0.value.link_url category_title=current_event.subheading_link.0.value.label buttons=current_event.buttons image=img.url text=current_event.body %} |
30 | 21 | </div>
|
31 |
| - {% endwith %} |
32 |
| - {% endfor %} |
| 22 | + {% endfor %} |
| 23 | + </div> |
| 24 | + |
| 25 | + {# Pagination #} |
| 26 | + <div class="swiper-pagination tw--bottom-7 medium:tw-hidden"></div> |
| 27 | + |
33 | 28 | </div>
|
34 |
| -{% endblock %} |
| 29 | +</div> |
| 30 | + |
| 31 | + |
0 commit comments