| 1 |
{ |
| 2 |
"$schema": "https://schemas.wp.org/trunk/block.json", |
| 3 |
"apiVersion": 3, |
| 4 |
"name": "blockenberg/read-more", |
| 5 |
"version": "1.0.0", |
| 6 |
"title": "Read More", |
| 7 |
"category": "bkbg-blog", |
| 8 |
"icon": "editor-expand", |
| 9 |
"description": "Collapses long content behind a gradient fade with an animated 'Read more / Show less' toggle button.", |
| 10 |
"keywords": [ |
| 11 |
"read more", |
| 12 |
"expand", |
| 13 |
"collapse", |
| 14 |
"show more", |
| 15 |
"see more", |
| 16 |
"truncate", |
| 17 |
"content", |
| 18 |
"toggle" |
| 19 |
], |
| 20 |
"textdomain": "blockenberg", |
| 21 |
"editorScript": "bkbg-read-more-editor", |
| 22 |
"editorStyle": "bkbg-read-more-style", |
| 23 |
"style": "bkbg-read-more-style", |
| 24 |
"viewScript": "bkbg-read-more-frontend", |
| 25 |
"supports": { |
| 26 |
"html": false, |
| 27 |
"align": [ |
| 28 |
"wide", |
| 29 |
"full" |
| 30 |
], |
| 31 |
"anchor": true |
| 32 |
}, |
| 33 |
"attributes": { |
| 34 |
"content": { |
| 35 |
"type": "string", |
| 36 |
"default": "This is the full content that will be hidden behind the read more button. Add as much text as you like here — the block will collapse it to the preview height and show a gradient fade. The user can expand the full text with a click." |
| 37 |
}, |
| 38 |
"collapsedHeight": { |
| 39 |
"type": "number", |
| 40 |
"default": 180 |
| 41 |
}, |
| 42 |
"readMoreLabel": { |
| 43 |
"type": "string", |
| 44 |
"default": "Read more" |
| 45 |
}, |
| 46 |
"showLessLabel": { |
| 47 |
"type": "string", |
| 48 |
"default": "Show less" |
| 49 |
}, |
| 50 |
"buttonStyle": { |
| 51 |
"type": "string", |
| 52 |
"default": "solid" |
| 53 |
}, |
| 54 |
"buttonAlign": { |
| 55 |
"type": "string", |
| 56 |
"default": "center" |
| 57 |
}, |
| 58 |
"showIcon": { |
| 59 |
"type": "boolean", |
| 60 |
"default": true |
| 61 |
}, |
| 62 |
"animateDuration": { |
| 63 |
"type": "number", |
| 64 |
"default": 400 |
| 65 |
}, |
| 66 |
"fadeHeight": { |
| 67 |
"type": "number", |
| 68 |
"default": 80 |
| 69 |
}, |
| 70 |
"fadeColor": { |
| 71 |
"type": "string", |
| 72 |
"default": "#ffffff" |
| 73 |
}, |
| 74 |
"borderRadius": { |
| 75 |
"type": "number", |
| 76 |
"default": 8 |
| 77 |
}, |
| 78 |
"contentTypo": { |
| 79 |
"type": "object", |
| 80 |
"default": {} |
| 81 |
}, |
| 82 |
"textColor": { |
| 83 |
"type": "string", |
| 84 |
"default": "#374151" |
| 85 |
}, |
| 86 |
"bgColor": { |
| 87 |
"type": "string", |
| 88 |
"default": "" |
| 89 |
}, |
| 90 |
"btnBg": { |
| 91 |
"type": "string", |
| 92 |
"default": "#6c3fb5" |
| 93 |
}, |
| 94 |
"btnColor": { |
| 95 |
"type": "string", |
| 96 |
"default": "#ffffff" |
| 97 |
}, |
| 98 |
"btnBorderColor": { |
| 99 |
"type": "string", |
| 100 |
"default": "#6c3fb5" |
| 101 |
}, |
| 102 |
"paddingTop": { |
| 103 |
"type": "number", |
| 104 |
"default": 0 |
| 105 |
}, |
| 106 |
"paddingBottom": { |
| 107 |
"type": "number", |
| 108 |
"default": 0 |
| 109 |
} |
| 110 |
} |
| 111 |
} |
| 112 |
|