Skip to content

Commit 86ebcac

Browse files
committed
Merge FE on to BE
1 parent acc2331 commit 86ebcac

File tree

4 files changed

+30
-59
lines changed

4 files changed

+30
-59
lines changed

network-api/networkapi/mozfest/templates/fragments/event_card.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ <h3 class="tw-mb-2">{{ title }}</h3>
99
<img class="tw-w-full tw-h-auto" src="{{ image }}" alt="{{ image_alt }}">
1010
{% endif %}
1111
<p class="tw-my-5">{{ text }}</p>
12-
<a class="btn btn-primary" href="{{ cta_link }}">{{ cta_text }}</a>
12+
{% for button in buttons %}
13+
<a class="btn btn-primary tw-mr-3 last:tw-mr-0" href="{{ button.value.link_url }}">{{ button.value.label }}</a>
14+
{% endfor %}
1315
</div>

network-api/networkapi/mozfest/templates/mozfest/event_carousel.html

Lines changed: 0 additions & 26 deletions
This file was deleted.

network-api/networkapi/mozfest/templates/mozfest/mozfest-base.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
<div class="row">
4242
<div class="cms mozfest-content two-col mb-5">
4343
{% include "partials/streamfield.html" with twocolumn=True %}
44-
{% include './event_carousel.html' %}
4544
</div>
4645
{% block cta %}{% include "partials/signup.html" %}{% endblock %}
4746
</div>
@@ -51,7 +50,6 @@
5150
{# Single column layout #}
5251
<div class="cms mozfest-content mb-3 {% if page.use_wide_template %} wide {% endif %}">
5352
{% include "partials/streamfield.html" %}
54-
{% include './event_carousel.html' %}
5553
</div>
5654

5755
{% endif %}
Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
1-
{% extends "./base_streamfield_block.html" %}
21
{% load wagtailcore_tags wagtailimages_tags %}
32

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 %}
3021
</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+
3328
</div>
34-
{% endblock %}
29+
</div>
30+
31+

0 commit comments

Comments
 (0)