block.json
163 lines
| 1 | { |
| 2 | "name": "kubio/post-comments", |
| 3 | "category": "kubio-blog-components", |
| 4 | "attributes": { |
| 5 | "kubio": { |
| 6 | "type": "object" |
| 7 | }, |
| 8 | "prefix": { |
| 9 | "type": "string", |
| 10 | "default": "" |
| 11 | }, |
| 12 | "noCommentsTitle": { |
| 13 | "type": "string", |
| 14 | "default": "No responses yet" |
| 15 | }, |
| 16 | "oneCommentTitle": { |
| 17 | "type": "string", |
| 18 | "default": "One response" |
| 19 | }, |
| 20 | "avatarSize": { |
| 21 | "type": "string", |
| 22 | "default": "50" |
| 23 | }, |
| 24 | "multipleComments": { |
| 25 | "type": "string", |
| 26 | "default": "{COMMENTS-COUNT} Responses" |
| 27 | }, |
| 28 | "commentsDisabled": { |
| 29 | "type": "string", |
| 30 | "default": "Comments are closed" |
| 31 | } |
| 32 | }, |
| 33 | "usesContext": ["postId", "postType"], |
| 34 | "supports": { |
| 35 | "kubio": { |
| 36 | "default": { |
| 37 | "style": { |
| 38 | "descendants": { |
| 39 | "commentReplies": { |
| 40 | "margin": { |
| 41 | "left": { |
| 42 | "value": 20, |
| 43 | "unit": "px" |
| 44 | } |
| 45 | } |
| 46 | }, |
| 47 | "commentAvatar": { |
| 48 | "border": { |
| 49 | "top": { |
| 50 | "radius": { |
| 51 | "left": { |
| 52 | "value": 100, |
| 53 | "unit": "%" |
| 54 | }, |
| 55 | "right": { |
| 56 | "value": 100, |
| 57 | "unit": "%" |
| 58 | } |
| 59 | } |
| 60 | }, |
| 61 | "bottom": { |
| 62 | "radius": { |
| 63 | "left": { |
| 64 | "value": 100, |
| 65 | "unit": "%" |
| 66 | }, |
| 67 | "right": { |
| 68 | "value": 100, |
| 69 | "unit": "%" |
| 70 | } |
| 71 | } |
| 72 | } |
| 73 | } |
| 74 | } |
| 75 | } |
| 76 | }, |
| 77 | "props": {} |
| 78 | }, |
| 79 | "elementsEnum": { |
| 80 | "CONTAINER": "commentsContainer", |
| 81 | "NUMBER": "commentsTitle", |
| 82 | "CLOSED": "disabledComments", |
| 83 | "EVEN": "comment", |
| 84 | "ODD": "alternateComment", |
| 85 | "AVATAR": "commentAvatar", |
| 86 | "AUTHOR_NAME": "commentAuthorName", |
| 87 | "AUTHOR_LINK": "commentAuthorLink", |
| 88 | "DATE": "commentDate", |
| 89 | "EDIT": "commentEdit", |
| 90 | "CONTENT": "commentText", |
| 91 | "REPLY_LINK": "commentReply", |
| 92 | "REPLY_FORM": "commentReplyForm", |
| 93 | "REPLIES": "commentReplies", |
| 94 | |
| 95 | "COMMENT_META_CONTAINER": "commentInfoContainer", |
| 96 | "COMMENT_META": "commentInfo" |
| 97 | }, |
| 98 | "elementsByName": { |
| 99 | "commentsContainer": { |
| 100 | "wrapper": true, |
| 101 | "default": true |
| 102 | }, |
| 103 | "commentsTitle": { |
| 104 | "selector": ".comments-title" |
| 105 | }, |
| 106 | "disabledComments": { |
| 107 | "selector": ".comments-disabled" |
| 108 | }, |
| 109 | "comment": { |
| 110 | "selector": ".comment.even" |
| 111 | }, |
| 112 | "alternateComment": { |
| 113 | "selector": ".comment.odd" |
| 114 | }, |
| 115 | |
| 116 | "commentAvatar": { |
| 117 | "selector": ".comment-author img" |
| 118 | }, |
| 119 | |
| 120 | "commentAuthorName": { |
| 121 | "selector": ".comment-author .fn" |
| 122 | }, |
| 123 | |
| 124 | "commentAuthorLink": { |
| 125 | "selector": ".comment-author .fn a" |
| 126 | }, |
| 127 | "commentDate": { |
| 128 | "selector": ".comment-metadata > a" |
| 129 | }, |
| 130 | |
| 131 | "commentEdit": { |
| 132 | "selector": ".comment-metadata > .edit-link > a" |
| 133 | }, |
| 134 | |
| 135 | "commentText": { |
| 136 | "selector": ".comment-content" |
| 137 | }, |
| 138 | "commentReply": { |
| 139 | "selector": ".comment-body .reply a" |
| 140 | }, |
| 141 | |
| 142 | "commentReplyForm": { |
| 143 | "selector": ".comment-body .comment-respond" |
| 144 | }, |
| 145 | "commentReplies": { |
| 146 | "selector": ".comment > .children" |
| 147 | }, |
| 148 | "commentInfoContainer": { |
| 149 | "selector": ".comment-meta" |
| 150 | }, |
| 151 | "commentInfo": { |
| 152 | "selector": ".comment-metadata" |
| 153 | } |
| 154 | }, |
| 155 | "template": { |
| 156 | "type": "element", |
| 157 | "props": { |
| 158 | "name": "commentsContainer" |
| 159 | } |
| 160 | } |
| 161 | } |
| 162 | } |
| 163 | } |