junohamburg / kirby-visual-block-selector
Kirby Visual Block Selector
Package info
github.com/junohamburg/kirby-visual-block-selector
Language:Vue
Type:kirby-plugin
pkg:composer/junohamburg/kirby-visual-block-selector
Requires
- php: ~8.3.0 || ~8.4.0 || ~8.5.0 || ~8.6.0
- getkirby/composer-installer: ^1.2
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
This plugin for Kirby 6 replaces the block selector with a customized version that displays a preview image for each block.
Please note: If you are using Kirby 5, please install v3.0.3. If you are using Kirby 4, please install v2.1.1. If you are using Kirby 3, please install v1.1.3.
Installation
Download
Download and copy this repository to /site/plugins/kirby-visual-block-selector.
Composer
composer require junohamburg/kirby-visual-block-selector
Git submodule
git submodule add https://github.com/junohamburg/kirby-visual-block-selector.git site/plugins/kirby-visual-block-selector
Setup
- Create the block preview images in 480×270 pixel. The images are displayed in a fixed aspect ratio of 16/9.
- Create the folder
assets/block-previews. - Save the images in the
assets/block-previewsfolder with the same name as the block. For example, the preview image ofheading.ymlisheading.png. Any image format (png, jpg, gif, svg) should work.
Tip: You can define fieldset groups for the blocks field: Kirby docs
⚠️ Please note: If there are no preview images for a blocks field, the default Kirby block selector will be displayed.
License
MIT