You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

136 lines
2.6 KiB

1 year ago
  1. {
  2. "$schema": "https://schemas.wp.org/trunk/block.json",
  3. "apiVersion": 3,
  4. "name": "core/cover",
  5. "title": "Cover",
  6. "category": "media",
  7. "description": "Add an image or video with a text overlay.",
  8. "textdomain": "default",
  9. "attributes": {
  10. "url": {
  11. "type": "string"
  12. },
  13. "useFeaturedImage": {
  14. "type": "boolean",
  15. "default": false
  16. },
  17. "id": {
  18. "type": "number"
  19. },
  20. "alt": {
  21. "type": "string",
  22. "source": "attribute",
  23. "selector": "img",
  24. "attribute": "alt",
  25. "default": ""
  26. },
  27. "hasParallax": {
  28. "type": "boolean",
  29. "default": false
  30. },
  31. "isRepeated": {
  32. "type": "boolean",
  33. "default": false
  34. },
  35. "dimRatio": {
  36. "type": "number",
  37. "default": 100
  38. },
  39. "overlayColor": {
  40. "type": "string"
  41. },
  42. "customOverlayColor": {
  43. "type": "string"
  44. },
  45. "backgroundType": {
  46. "type": "string",
  47. "default": "image"
  48. },
  49. "focalPoint": {
  50. "type": "object"
  51. },
  52. "minHeight": {
  53. "type": "number"
  54. },
  55. "minHeightUnit": {
  56. "type": "string"
  57. },
  58. "gradient": {
  59. "type": "string"
  60. },
  61. "customGradient": {
  62. "type": "string"
  63. },
  64. "contentPosition": {
  65. "type": "string"
  66. },
  67. "isDark": {
  68. "type": "boolean",
  69. "default": true
  70. },
  71. "allowedBlocks": {
  72. "type": "array"
  73. },
  74. "templateLock": {
  75. "type": [ "string", "boolean" ],
  76. "enum": [ "all", "insert", "contentOnly", false ]
  77. },
  78. "tagName": {
  79. "type": "string",
  80. "default": "div"
  81. }
  82. },
  83. "usesContext": [ "postId", "postType" ],
  84. "supports": {
  85. "anchor": true,
  86. "align": true,
  87. "html": false,
  88. "spacing": {
  89. "padding": true,
  90. "margin": [ "top", "bottom" ],
  91. "blockGap": true,
  92. "__experimentalDefaultControls": {
  93. "padding": true,
  94. "blockGap": true
  95. }
  96. },
  97. "__experimentalBorder": {
  98. "color": true,
  99. "radius": true,
  100. "style": true,
  101. "width": true,
  102. "__experimentalDefaultControls": {
  103. "color": true,
  104. "radius": true,
  105. "style": true,
  106. "width": true
  107. }
  108. },
  109. "color": {
  110. "__experimentalDuotone": "> .wp-block-cover__image-background, > .wp-block-cover__video-background",
  111. "heading": true,
  112. "text": true,
  113. "background": false,
  114. "__experimentalSkipSerialization": [ "gradients" ],
  115. "enableContrastChecker": false
  116. },
  117. "typography": {
  118. "fontSize": true,
  119. "lineHeight": true,
  120. "__experimentalFontFamily": true,
  121. "__experimentalFontWeight": true,
  122. "__experimentalFontStyle": true,
  123. "__experimentalTextTransform": true,
  124. "__experimentalTextDecoration": true,
  125. "__experimentalLetterSpacing": true,
  126. "__experimentalDefaultControls": {
  127. "fontSize": true
  128. }
  129. },
  130. "layout": {
  131. "allowJustification": false
  132. }
  133. },
  134. "editorStyle": "wp-block-cover-editor",
  135. "style": "wp-block-cover"
  136. }