vitamin2/retrotree

Retrotree 是一个 Kirby 3 插件,用于以复古树的形式显示页面。

安装: 621

依赖项: 0

建议者: 0

安全: 0

类型:kirby-plugin

1.6.4 2024-01-30 13:33 UTC

This package is auto-updated.

Last update: 2024-09-30 01:46:35 UTC


README

Retrotree 是一个 Kirby 3 插件,用于以复古树的形式显示页面。

screenshot

1. 安装

composer require vitamin2/retrotree

或者

  • 在 site/plugins 目录下创建一个名为 "retrotree" 的文件夹
  • 将此存储库的副本克隆/复制到其中

2. 蓝图使用

retrotree 部分可以替换您已设置的任何 pages 部分

sections:
  retrotree:
    headline: Retro Tree
    type: retrotree

2.1 可选蓝图

您还可以设置可选选项

sections:
  retrotree:
    headline: Retro Tree
    type: retrotree
    treeMaxDepth: 5
    treeDefaultIcon: page
    treeEndMessage: no more entries
    showContent: site
    showStatus: true
    showSlug: true
    showPageIcon: false
    enableTreeCollapse: true
    toggleTextOpen: Collapse All
    toggleTextClosed: Expand All
    enableTreeDisplayDepth: false

2.2 可选定义

定义在树中将显示多少级子页面。

treeMaxDepth: 5

定义默认树图标集。 https://getkirby.com/docs/reference/plugins/ui/icon

  • 页面
  • 添加
  • 或 kirby-ui-kit 中的任何其他图标
treeDefaultIcon: page

如果无子页面,显示消息

treeEndMessage: no more entries

定义在树中显示的内容

  • site = 在树中显示完整的 $kirby->site
  • page = 在树中显示当前 $page
showContent: site

在树中显示页面状态

showStatus: true

在树中显示页面别名

showSlug: true

在树中显示页面图标,如果模板中存在。这将覆盖选项 "treeDefaultIcon"

showPageIcon: true

screenshot

对于具有子页面的每个页面显示展开/折叠选项。还在右上角显示全局展开/折叠全部按钮。在 localStorage 中保存折叠项,因此注销/登录或刷新页面时状态相同。默认设置为 false。

enableTreeCollapse: true

如果属性 'enableTreeCollapse' 设置为 true,则包含展开所有页面的自定义按钮文本。

toggleTextOpen: Collapse All

如果属性 'enableTreeCollapse' 设置为 true,则包含折叠所有页面的自定义按钮文本。

toggleTextClosed: Expand All

在父页面标题旁边显示子页面数量。默认设置为 true。

enableTreeDisplayDepth: false

3. 开发

按照 Kirby 文档中的步骤进行。 https://getkirby.com/docs/guide/plugins/plugin-setup-panel

  1. npm install -g parcel-bundler
  2. yarn global add parcel-bundler
  3. npm run dev
  4. npm run build

4. 许可证

MIT

如果您喜欢此插件,请访问我们的网站 Vitamin2 AG

5. 致谢

贡献者