Linux 软件免费装
Banner图

Splide Carousel Block

开发者 cloudcatch
dkjensen
更新时间 2024年5月2日 03:51
捐献地址: 去捐款
PHP版本: 6.0.2 及以上
WordPress版本: 6.5.2
版权: MIT

标签

slider block carousel full-site-editing splide

下载

1.1.0 1.2.0 1.4.0 1.4.5 1.0.0 1.4.2 1.4.1 1.4.3 1.3.0 1.4.4

详情介绍:

The Splide Carousel block introduces the capability to create carousels/sliders within the block editor. Each carousel may contain an infinite number of slides, with each slides containing their own inner blocks. Use the Splide Carousel block to create image carousels, testimonial rotators, and more in Gutenberg! View Demo

安装:

  1. Upload the plugin files to the /wp-content/plugins/splide-carousel directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the 'Plugins' screen in WordPress

屏幕截图:

  • Block editor view
  • Front end view
  • Front end view
  • Block controls

常见问题:

Are there additional options I can use?

Yes, under the Splide Carousel block Advanced Settings, you can provide a valid JSON string containing additional options located here. e.g.: {"focus":"center","trimSpace":false}

Can I set default carousel options globally?

Yes, we need to listen to a JavaScript event that is fired when the carousel is ready, and then add the defaults. document.addEventListener( 'splideReady', function( e ) { e.detail.defaults = { arrowPath: 'M30.2 19.4L11 .2c-.3-.3-.9-.3-1.2 0-.3.3-.3.8 0 1.2L28.4 20 9.8 38.6c-.3.3-.3.9 0 1.2.3.3.9.3 1.2 0l19.2-19.2c.3-.3.3-.9 0-1.2z', perPage: 3 }; } );

Can I control the carousel using JavaScript / API?

Yes, each carousel is given a unique ID by default, or you can provide your own using the HTML Anchor field under the block Advanced Settings. Each block exposes a global variable that follows this convention: {ID}Carousel. For example, if your carousel ID is testimonials, the global variable will be testimonialsCarousel. Using this global variable, you can control the carousel programatically using the Splide API. Example to navigate to the third slide: testimonialsCarousel.Components.Controller.go(2);

更新日志:

1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0