-
Notifications
You must be signed in to change notification settings - Fork 156
[7430] FE - current events slider #7505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
stevedya
merged 6 commits into
feature/be-fe-mozfest-current-events-slider
from
feature/7430-current-events-slider-fe
Oct 5, 2021
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e82babf
Current events slider styles
stevedya 3d761a1
Install swiper and style event cards
stevedya 27657c2
Break slider out of container
stevedya acc2331
Adjust spacing and containers for wide templates and signup sidebar
stevedya 86ebcac
Merge FE on to BE
stevedya fc3c678
Update source/sass/mozfest.scss
stevedya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
network-api/networkapi/mozfest/templates/fragments/carousel/carousel_navigation.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<div class="swiper-navigation tw-relative tw-z-10 tw-mb-5 tw-hidden medium:tw-flex medium:tw-flex-row medium:tw-justify-between medium:items-center{% if not page.use_wide_template and page.signup %} tw-ml-0 tw-pl-0 tw-container{% endif %}"> | ||
<h3 class="font-weight-bold">{{ title }}</h3> | ||
<div class="tw-flex tw-flex-row tw-justify-between tw-items-center"> | ||
<div class="swiper-button-prev"> | ||
<svg class="swiper-button-icon" viewBox="0 0 21 21" fill="none"> | ||
<path fill-rule="evenodd" clip-rule="evenodd" | ||
d="M20.75 10.5c0-.70761-.5099-1.28125-1.1389-1.28125H1.38889C.759899 9.21875.25 9.79239.25 10.5c0 .7076.509899 1.2812 1.13889 1.2812H19.6111c.629 0 1.1389-.5736 1.1389-1.2812Z" | ||
fill="currentColor"/> | ||
<path fill-rule="evenodd" clip-rule="evenodd" | ||
d="M10.1664.625269c-.44474-.500359-1.16584-.500359-1.6106 0L.583572 9.59402c-.444763.50038-.444763 1.31158 0 1.81198L8.5558 20.3747c.44476.5004 1.16586.5004 1.6106 0 .4448-.5003.4448-1.3116 0-1.8119L2.99952 10.5l7.16688-8.06277c.4448-.50036.4448-1.3116 0-1.811961Z" | ||
fill="currentColor"/> | ||
</svg> | ||
</div> | ||
<div class="swiper-button-next"> | ||
<svg class="swiper-button-icon" viewBox="0 0 21 21" fill="none"> | ||
<path fill-rule="evenodd" clip-rule="evenodd" | ||
d="M.25 10.5c0-.70761.509898-1.28125 1.13889-1.28125H19.6111c.629 0 1.1389.57364 1.1389 1.28125 0 .7076-.5099 1.2812-1.1389 1.2812H1.38889C.759898 11.7812.25 11.2076.25 10.5Z" | ||
fill="currentColor"/> | ||
<path fill-rule="evenodd" clip-rule="evenodd" | ||
d="M10.8336.625269c.4447-.500359 1.1658-.500359 1.6106 0l7.9722 8.968751c.4448.50038.4448 1.31158 0 1.81198l-7.9722 8.9687c-.4448.5004-1.1659.5004-1.6106 0-.4448-.5003-.4448-1.3116 0-1.8119L18.0005 10.5l-7.1669-8.06277c-.4448-.50036-.4448-1.3116 0-1.811961Z" | ||
fill="currentColor"/> | ||
</svg> | ||
</div> | ||
</div> | ||
</div> |
15 changes: 15 additions & 0 deletions
15
network-api/networkapi/mozfest/templates/fragments/event_card.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div class="tw-border tw-border-gray-60/20 tw-p-4 medium:tw-p-6"> | ||
<h3 class="tw-mb-2">{{ title }}</h3> | ||
{% if category_url %} | ||
<div class="tw-mt-3 tw-mb-4"> | ||
<a class="tw-underline tw-text-festival-blue-100" href="{{ category_url }}">{{ category_title }}</a> | ||
</div> | ||
{% endif %} | ||
{% if image %} | ||
<img class="tw-w-full tw-h-auto" src="{{ image }}" alt="{{ image_alt }}"> | ||
{% endif %} | ||
<p class="tw-my-5">{{ text }}</p> | ||
{% for button in buttons %} | ||
<a class="btn btn-primary tw-mr-3 last:tw-mr-0" href="{{ button.value.link_url }}">{{ button.value.label }}</a> | ||
{% endfor %} | ||
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 27 additions & 30 deletions
57
...tworkapi/wagtailpages/templates/wagtailpages/blocks/current_events_slider_list_block.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,31 @@ | ||
{% extends "./base_streamfield_block.html" %} | ||
{% load wagtailcore_tags wagtailimages_tags %} | ||
|
||
{% block block_content %} | ||
<div class="row"> | ||
<div class="mb-4"> | ||
<h3>{{ value.title }}</h3> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
{% for block in self.current_events %} | ||
{% with current_event=block count=self.current_events|length %} | ||
{% image current_event.image fill-350x197 as img %} | ||
<div class="col-sm-12 {% if count > 2 %} col-lg-4 col-md-6 {% else %} col-md-6 {% endif %} mb-4"> | ||
<div class="card-regular h-100 d-flex flex-column "> | ||
<img src="{{ img.url }}" /> | ||
<div class="d-flex flex-1"> | ||
<div class="key-item mx-2 mx-md-3 p-3 w-100 d-flex flex-column"> | ||
<h3 class="h3-heading mb-2">{{ current_event.title }}</h3> | ||
<p>Subheading Link Label: {{ current_event.subheading_link.0.value.label }}</p> | ||
<p>Subheading Link URL: {{ current_event.subheading_link.0.value.link_url }}</p> | ||
<p>Body: {{ current_event.body }}</p> | ||
{% for button in current_event.buttons %} | ||
<p>Button {{ forloop.counter }} Label: {{ button.value.label }}</p> | ||
<p>Button {{ forloop.counter }} Link: {{ button.value.link_url }}</p> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{% load static %} | ||
<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 %}"> | ||
|
||
{# Slider main container #} | ||
<div class="swiper tw-overflow-hidden" data-carousel> | ||
|
||
{# navigation buttons #} | ||
{% include 'fragments/carousel/carousel_navigation.html' with title=value.title %} | ||
|
||
{# Additional required wrapper #} | ||
<div class="swiper-wrapper"> | ||
|
||
{# Slides #} | ||
{% for current_event in self.current_events %} | ||
{% image current_event.image fill-600x250 as img %} | ||
<div class="swiper-slide"> | ||
{% 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 %} | ||
</div> | ||
{% endwith %} | ||
{% endfor %} | ||
{% endfor %} | ||
</div> | ||
|
||
{# Pagination #} | ||
<div class="swiper-pagination tw--bottom-7 medium:tw-hidden"></div> | ||
|
||
</div> | ||
{% endblock %} | ||
</div> | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.