Bricks Schema 中文文档:Bricks 模板设置

📄 原始资料 (已截断)  |  展开查看原始 JSON(template.json){ “$schema”: “https://json-schema.org/draft/2020-12/schema”, “$id”: “bricks://settings/template”, “schemaVersion”: “2.3”, “type”: “object”, “title”: “Bricks Template settings”, “description”: “Schema for Bricks template settings controls”, “settin…

📄 原始资料 (已截断)  |  展开查看原始 JSON(template.json)
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "bricks://settings/template",
  "schemaVersion": "2.3",
  "type": "object",
  "title": "Bricks Template settings",
  "description": "Schema for Bricks template settings controls",
  "settings": {
    "headerPosition": {
      "label": "Header location",
      "options": {
        "right": "Right",
        "left": "Left",
        "rightZh": "右侧",
        "leftZh": "左侧"
      },
      "valueSchema": {
        "oneOf": [
          {
            "type": "string",
            "description": "Single selection",
            "descriptionZh": "单选。"
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Multiple selection",
            "descriptionZh": "多选。"
          }
        ]
      },
      "controlType": "select",
      "labelZh": "页头位置"
    },
    "headerSticky": {
      "label": "Sticky header",
      "hasRequired": true,
      "valueSchema": {
        "type": "boolean"
      },
      "controlType": "checkbox",
      "labelZh": "粘性页头"
    },
    "headerStickyOnScroll": {
      "label": "Sticky on scroll",
      "hasRequired": true,
      "valueSchema": {
        "type": "boolean"
      },
      "controlType": "checkbox",
      "labelZh": "滚动时粘性"
    },
    "headerStickyScrollingBackground": {
      "label": "Scrolling background",
      "css": [
        {
          "property": "background",
          "selector": "#brx-header.brx-sticky.scrolling > .brxe-section, #brx-header.brx-sticky.scrolling > .brxe-container, #brx-header.brx-sticky.scrolling > .brxe-block, #brx-header.brx-sticky.scrolling > .brxe-div"
        }
      ],
      "hasRequired": true,
      "valueSchema": {
        "type": "object",
        "description": "Background settings",
        "properties": {
          "color": {
            "description": "Color value in various formats",
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "hex": {
                    "type": "string",
                    "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
                  }
                },
                "required": [
                  "hex"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "rgb": {
                    "type": "string",
                    "pattern": "^rgba?\\("
                  }
                },
                "required": [
                  "rgb"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "hsl": {
                    "type": "string",
                    "pattern": "^hsla?\\("
                  }
                },
                "required": [
                  "hsl"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "raw": {
                    "type": "string",
                    "description": "Raw color value or CSS variable",
                    "descriptionZh": "原始颜色值或 CSS 变量。"
                  }
                },
                "required": [
                  "raw"
                ]
              }
            ],
            "descriptionZh": "各种格式的颜色值。"
          },
          "image": {
            "type": "object",
            "description": "Image settings",
            "properties": {
              "id": {
                "type": [
                  "string",
                  "integer"
                ]
              },
              "filename": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "size": {
                "type": "string"
              },
              "full": {
                "type": "string"
              },
              "useDynamicData": {
                "type": "string"
              }
            },
            "descriptionZh": "图像设置。"
          },
          "video": {
            "type": "object",
            "description": "Video settings",
            "properties": {
              "source": {
                "type": "string",
                "enum": [
                  "media",
                  "youtube",
                  "vimeo",
                  "url"
                ]
              },
              "id": {
                "type": [
                  "string",
                  "integer"
                ]
              },
              "url": {
                "type": "string"
              },
              "youtubeId": {
                "type": "string"
              },
              "vimeoId": {
                "type": "string"
              },
              "autoplay": {
                "type": "boolean"
              },
              "loop": {
                "type": "boolean"
              },
              "muted": {
                "type": "boolean"
              },
              "controls": {
                "type": "boolean"
              }
            },
            "descriptionZh": "视频设置。"
          },
          "size": {
            "type": "string"
          },
          "position": {
            "type": "string"
          },
          "repeat": {
            "type": "string",
            "enum": [
              "repeat",
              "repeat-x",
              "repeat-y",
              "no-repeat"
            ]
          },
          "attachment": {
            "type": "string",
            "enum": [
              "scroll",
              "fixed",
              "local"
            ]
          }
        },
        "descriptionZh": "背景设置。"
      },
      "controlType": "background",
      "labelZh": "滚动背景"
    },
    "headerStickyScrollingBoxShadow": {
      "label": "Scrolling box shadow",
      "css": [
        {
          "property": "box-shadow",
          "selector": "#brx-header.brx-sticky.scrolling:not(.slide-up) > .brxe-section, #brx-header.brx-sticky.scrolling:not(.slide-up) > .brxe-container, #brx-header.brx-sticky.scrolling:not(.slide-up) > .brxe-block, #brx-header.brx-sticky.scrolling:not(.slide-up) > .brxe-div"
        }
      ],
      "hasRequired": true,
      "valueSchema": {
        "type": "object",
        "description": "Box shadow settings",
        "properties": {
          "values": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "inset": {
                  "type": "boolean"
                },
                "color": {
                  "description": "Color value in various formats",
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "hex": {
                          "type": "string",
                          "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
                        }
                      },
                      "required": [
                        "hex"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "rgb": {
                          "type": "string",
                          "pattern": "^rgba?\\("
                        }
                      },
                      "required": [
                        "rgb"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "hsl": {
                          "type": "string",
                          "pattern": "^hsla?\\("
                        }
                      },
                      "required": [
                        "hsl"
                      ]
                    },
                    {
                    

... (内容过长已截断,完整 JSON 见原始文件)

前言

Bricks 模板设置控件的 schema。

基本信息

  • 英文名称Bricks Template settings
  • 中文名称:Bricks 模板设置
  • Schema IDbricks://settings/template
  • Schema 版本2.3
  • 类型object

设置项

  • headerPosition — 页头位置 (select)
  • headerSticky — 粘性页头 (checkbox)
  • headerStickyOnScroll — 滚动时粘性 (checkbox)
  • headerStickyScrollingBackground — 滚动背景 (background)
  • headerStickyScrollingBoxShadow — 滚动盒子阴影 (box-shadow)
  • headerStickyScrollingColor — 滚动文字颜色 (color)
  • headerStickyScrollingColorHover — 滚动文字颜色 (color)
  • headerStickySlideUpAfter — 延迟收起 (number)
  • headerStickyTransition — 过渡 (text)
  • headerWidth — 页头宽度 (number)
  • passwordProtectionBypassLoggedIn — 登录用户禁用 (checkbox)
  • passwordProtectionEndDate — 结束日期 (datepicker)
  • passwordProtectionPassword — 密码 (text)
  • passwordProtectionSchedule — 定时 (checkbox)
  • passwordProtectionSource — 密码来源 (select)
  • passwordProtectionStartDate — 开始日期 (datepicker)
  • popupAjax — 通过 AJAX 获取内容 (checkbox)
  • popupAjaxLoaderAnimation — 动画 (select)
  • popupAjaxLoaderColor — 颜色 (color)
  • popupAjaxLoaderScale — 缩放 (number)
  • popupAjaxLoaderSelector — CSS 选择器 (text)
  • popupAlignItems — 交叉轴对齐 (align-items)
  • popupBackdropTransition — 过渡 (text)
  • popupBackground — 背景 (background)
  • popupBodyScroll — 滚动 (checkbox)
  • popupBreakpointMode — popupBreakpointMode (select)
  • popupCloseOn — 关闭触发 (select)
  • popupContentBackground — 背景 (background)
  • popupContentBorder — 边框 (border)
  • popupContentBoxShadow — 盒子阴影 (box-shadow)
  • popupContentHeight — 高度 (number)
  • popupContentMaxHeight — 最大高度 (number)
  • popupContentMaxWidth — 最大宽度 (number)
  • popupContentMinHeight — 最小高度 (number)
  • popupContentMinWidth — 最小宽度 (number)
  • popupContentPadding — 内边距 (spacing)
  • popupContentWidth — 宽度 (number)
  • popupDisableAutoFocus — 禁用自动聚焦 (checkbox)
  • popupDisableBackdrop — 禁用背景遮罩 (checkbox)
  • popupInfoBoxWidth — 宽度 (number)
  • popupIsInfoBox — 信息框 (checkbox)
  • popupIsWoo — WooCommerce (checkbox)
  • popupJustifyConent — 主轴对齐 (justify-content)
  • popupLimitLocalStorage — 跨会话 (number)
  • popupLimitSessionStorage — 单会话 (number)
  • popupLimitTimeStorage — 小时后再次显示 (number)
  • popupLimitWindow — 单次页面加载 (number)
  • popupPadding — 内边距 (spacing)
  • popupScrollToTop — 滚动到顶部 (checkbox)
  • popupShowAt — popupShowAt (select)
  • popupShowOn — popupShowOn (select)
  • popupZindex — Z 索引 (number)
  • templateConditions — 归档类型 (repeater)
  • templatePreviewAuthor — 作者 (select)
  • templatePreviewPostId — 单个 (select)
  • templatePreviewPostType — 文章类型 (select)
  • templatePreviewSearchTerm — 搜索词 (text)
  • templatePreviewTerm — 术语 (select)
  • templatePreviewType — 内容类型 (select)
  • template_interactions — 交互 (repeater)

补充说明

更多细节可参考 Bricks 官方 Academy 文档