Skip to content
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

adds swiper carousel component #44

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"drupal/nomarkup": "^1.0",
"drupal/paragraphs": "*",
"drupal/paragraphs_edit": "*",
"drupal/swiper_formatter": "^2.0@beta",
"drupal/ui_patterns_field_formatters": "*",
"drupal/ui_patterns_field_group": "*",
"drupal/viewsreference": "^2.0@beta",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ langcode: en
status: true
dependencies:
config:
- field.field.sa_paragraph.existing_content_card.sa_existing_content
- field.field.paragraph.sa_existing_content_card.sa_existing_content
- paragraphs.paragraphs_type.sa_existing_content_card
id: paragraph.sa_existing_content_card.default
targetEntityType: paragraph
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.sa_multi_item_carousel.sa_existing_content
- paragraphs.paragraphs_type.sa_multi_item_carousel
id: paragraph.sa_multi_item_carousel.default
targetEntityType: paragraph
bundle: sa_multi_item_carousel
mode: default
content:
sa_existing_content:
type: entity_reference_autocomplete
weight: 0
region: content
settings:
match_operator: CONTAINS
match_limit: 10
size: 60
placeholder: ''
third_party_settings: { }
hidden:
created: true
status: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.sa_multi_item_carousel.sa_existing_content
- paragraphs.paragraphs_type.sa_multi_item_carousel
- swiper_formatter.swiper_formatter.default
module:
- nomarkup
- swiper_formatter
id: paragraph.sa_multi_item_carousel.default
targetEntityType: paragraph
bundle: sa_multi_item_carousel
mode: default
content:
sa_existing_content:
type: swiper_formatter_entity
label: hidden
settings:
view_mode: teaser
template: default
caption: ''
custom_link: null
link: false
third_party_settings:
nomarkup:
enabled: true
separator: ''
referenced_entity: ''
weight: 0
region: content
hidden: { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.sa_existing_content
- node.type.sa_page
- node.type.sa_post
- paragraphs.paragraphs_type.sa_multi_item_carousel
id: paragraph.sa_multi_item_carousel.sa_existing_content
field_name: sa_existing_content
entity_type: paragraph
bundle: sa_multi_item_carousel
label: 'Existing Content'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:node'
handler_settings:
target_bundles:
sa_page: sa_page
sa_post: sa_post
sort:
field: _none
direction: ASC
auto_create: false
auto_create_bundle: sa_page
field_type: entity_reference
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.sa_existing_content
- node.type.sa_page
- node.type.sa_post
- paragraphs.paragraphs_type.sa_multi_item_carousel
id: paragraph.multi_item_carousel.sa_existing_content
field_name: sa_existing_content
entity_type: paragraph
bundle: sa_multi_item_carousel
label: 'Existing Content'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:node'
handler_settings:
target_bundles:
sa_page: sa_page
sa_post: sa_post
sort:
field: _none
direction: ASC
auto_create: false
auto_create_bundle: sa_page
field_type: entity_reference
9 changes: 9 additions & 0 deletions config/paragraphs.paragraphs_type.sa_multi_item_carousel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
langcode: en
status: true
dependencies: { }
id: sa_multi_item_carousel
label: 'Multi Item Carousel'
icon_uuid: null
icon_default: null
description: ''
behavior_plugins: { }
60 changes: 60 additions & 0 deletions config/swiper_formatter.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
id: null
label: null
description: null
enabled: true
source: remote
autoHeight: true
width: null
height: null
observer: false
direction: horizontal
effect: slide
loop: false
rewind: false
centeredSlides: false
speed: 300
slidesPerView: 1.0
loopedSlides: 1
noSwipingSelector: '.no-swipe, button, input'
grabCursor: false
cssMode: false
autoplay:
enabled: false
delay: 4000
disableOnInteraction: true
pauseOnMouseEnter: false
reverseDirection: false
stopOnLastSlide: false
waitForTransition: true
navigation:
enabled: false
hideOnClick: false
pagination:
enabled: false
type: bullets
dynamicBullets: false
clickable: false
lazy:
enabled: false
checkInView: false
loadOnTransitionStart: false
loadPrevNext: false
loadPrevNextAmount: 1
scrollingElement: window
mousewheel: false
scrollbar:
enabled: false
draggable: false
dragSize: auto
hide: true
snapOnRelease: false
slidesPerGroup: 1
spaceBetween: 0
updateOnWindowResize: true
resizeObserver: true
breakpoints:
breakpoint: null
swiper_template: null
weight: 0
breakpoint: false
breakpointsBase: window
68 changes: 68 additions & 0 deletions config/swiper_formatter.swiper_formatter.default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
langcode: en
status: true
dependencies: { }
id: default
label: Default
description: 'This default template is mostly for demonstration purpose, feel free to edit it or create (as many) new ones.'
breakpoint: false
swiper_options:
autoplay:
enabled: false
delay: 4000
disableOnInteraction: true
pauseOnMouseEnter: false
reverseDirection: false
stopOnLastSlide: false
waitForTransition: true
navigation:
enabled: true
hideOnClick: false
pagination:
enabled: true
type: bullets
dynamicBullets: false
clickable: true
scrollbar:
enabled: false
draggable: false
dragSize: auto
hide: true
snapOnRelease: false
breakpoints:
-
breakpoint: '768'
swiper_template: mobile
weight: '0'
-
breakpoint: '960'
swiper_template: desktop
weight: '1'
lazy:
enabled: false
checkInView: false
loadOnTransitionStart: false
loadPrevNext: false
loadPrevNextAmount: 1
scrollingElement: window
source: remote
breakpointsBase: window
autoHeight: true
width: null
height: null
observer: 0
updateOnWindowResize: true
resizeObserver: true
direction: horizontal
effect: slide
loop: true
rewind: 0
centeredSlides: 0
speed: 300
slidesPerView: 1.5
spaceBetween: 10
slidesPerGroup: 1
loopedSlides: 1
noSwipingSelector: '.no-swipe, button, input'
mousewheel: 0
grabCursor: 0
cssMode: 0
62 changes: 62 additions & 0 deletions config/swiper_formatter.swiper_formatter.desktop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
langcode: en
status: true
dependencies: { }
id: desktop
label: Desktop
description: ''
breakpoint: true
swiper_options:
autoplay:
enabled: false
delay: 4000
disableOnInteraction: false
pauseOnMouseEnter: false
reverseDirection: false
stopOnLastSlide: false
waitForTransition: false
navigation:
enabled: true
hideOnClick: false
pagination:
enabled: true
type: bullets
dynamicBullets: false
clickable: true
scrollbar:
enabled: false
draggable: false
dragSize: auto
hide: false
snapOnRelease: false
breakpoints:
-
weight: 0
lazy:
enabled: false
checkInView: false
loadOnTransitionStart: false
loadPrevNext: false
loadPrevNextAmount: 1
scrollingElement: window
source: remote
breakpointsBase: window
autoHeight: 0
width: null
height: null
observer: 0
updateOnWindowResize: true
resizeObserver: true
direction: horizontal
effect: slide
loop: 0
rewind: 0
centeredSlides: 0
speed: 300
slidesPerView: 3.5
spaceBetween: 15
slidesPerGroup: 1
loopedSlides: 1
noSwipingSelector: '.no-swipe, button, input'
mousewheel: 0
grabCursor: 0
cssMode: 0
Loading