adrienpayet/praticable-blocks

将 Vue Praticable 块存储到 Kirby 块中。

安装: 34

依赖者: 0

建议者: 0

安全: 0

类型:kirby-plugin

v1.1.0 2023-06-01 09:41 UTC

This package is auto-updated.

Last update: 2024-09-30 02:02:50 UTC


README

此插件主要允许在practicable.fr网站的核心处处理多个块。

安装

下载

下载并将此存储库复制到 /site/plugins/praticable-blocks

Composer

composer require adrienpayet/praticable-blocks

功能

文档进行中

将 JSON 数据存储为 Kirby 块

其主要功能之一在于将前端通过 POST 请求发送的 JSON 数据存储为 Kirby 块。POST 请求可以获取以 save.php 结尾的任何路由,例如 www.your-website.com/save.jsonwww.your-website.com/page/save.json。数据应存储在请求体中,遵循该结构

type BodyRequest = {
  pageUri: string
  blocks: Array<MarkdownBlock | ImageBlock>
}

type MarkdownBlock = {
  type: "markdown"
  content: {
    text: string
    width?: string = "400px"
    height?: string = "200px"
    transform?: string = "translate(912px, 240px)"
    zindex?: number = 0
    refs?: string = ""
  }
}

type ImageBlock = {
  type: "image"
  content: {
    image: Array<string> // eg. ['example-image.jpeg']
    b64: string // A b64 string of the image
    width?: string = "400px"
    height?: string = "400px"
    transform?: string = "translate(0px, 0px)"
    zindex?: number = 0
    iscover?: boolean = false
    caption?: string = ""
  }
}

代表

概念

representative structure

代表是表示空间(页面)的块,并允许导航到它。至少,它们包含所代表空间的标题,并与其链接(包裹在 <a> 标签中)。可选地,它们可以包含封面图片和简介文本。

用法

许可

MIT

致谢