承接 junohamburg/kirby-block-preview-fields 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

junohamburg/kirby-block-preview-fields

最新稳定版本:1.0.7

Composer 安装命令:

composer require junohamburg/kirby-block-preview-fields

包简介

Kirby Block Preview Fields

README 文档

README

This plugin for Kirby 3 displays the block fields directly in the block preview, including tabs.

Block Preview Fields

Inspired by the Kirby Fields Block, but this block preview supports tabs and the design aligns more closely with the Kirby UI.

Please note: In Kirby 4, there is now a native implementation of preview: fields, see https://getkirby.com/releases/4.0#block-field-improvements.

Installation

Download

Download and copy this repository to /site/plugins/kirby-block-preview-fields.

Composer

composer require junohamburg/kirby-block-preview-fields

Git submodule

git submodule add https://github.com/junohamburg/kirby-block-preview-fields.git site/plugins/kirby-block-preview-fields

Setup

In your custom block blueprint:

  1. Add preview: fields to display the block fields.
  2. Add wysiwyg: true to prevent the drawer from opening automatically after creating a new block.

Example: site/blueprints/blocks/custom-block.yml

name: Block Name
preview: fields
wysiwyg: true
tabs:
  content:
    label: Content
    fields:
      ...
  settings:
    label: Settings
    fields:
      ...

Available options

  1. Hide block icons. This is helpful if you are using our Kirby Visual Block Selector.
  2. Disable equal height tabs. By default, the largest tab sets the overall height, so there are no jumps when switching between tabs.

site/config/config.php

<?php

return [
  'junohamburg.block-preview-fields' => [
    'icon' => false, // default: true
    'equalHeightTabs' => false // default: true
  ],
];

Please note: These options apply to all block previews. It is currently not possible / very difficult to add custom options to block previews.

Known issues

  1. This block preview uses the angle-down icon to expand a collapsed block preview. The Kirby layout field uses the angle-down icon to open a dropdown with options.

License

MIT

Credits

统计信息

  • 总下载量: 1.38k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 20
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 20
  • Watchers: 2
  • Forks: 2
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-02