Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for authoring tool 1 #297

Merged
merged 19 commits into from
Aug 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 136 additions & 0 deletions schema/article.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
{
"$anchor": "vanilla-article",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"$patch": {
"source": {
"$ref": "article"
},
"with": {
"properties": {
"_vanilla": {
"type": "object",
"title": "Vanilla",
"default": {},
"properties": {
"_backgroundImage": {
"type": "object",
"title": "Background image",
"default": {},
"properties": {
"_large": {
"type": "string",
"isObjectId": true,
"title": "Large",
"description": "Large background image - used on desktop",
"_backboneForms": {
"type": "Asset",
"media": "image"
}
},
"_medium": {
"type": "string",
"isObjectId": true,
"title": "Medium",
"description": "Medium background image - used on tablet",
"_backboneForms": {
"type": "Asset",
"media": "image"
}
},
"_small": {
"type": "string",
"isObjectId": true,
"title": "Small",
"description": "Small background image - used on mobile",
"_backboneForms": {
"type": "Asset",
"media": "image"
}
}
}
},
"_backgroundStyles": {
"type": "object",
"title": "Background image styles",
"default": {},
"properties": {
"_backgroundRepeat": {
"type": "string",
"title": "Repeat",
"description": "Repeat-x: The background image is repeated only horizontally. Repeat-y: The background image is repeated only vertically",
"default": "",
"enum": [
"",
"repeat",
"repeat-x",
"repeat-y",
"no-repeat"
],
"_backboneForms": "Select"
},
"_backgroundSize": {
"type": "string",
"title": "Size",
"description": "Auto: The background image is displayed in its original size. Cover: Resize the background image to cover the entire container, even if it has to stretch or crop the image. Contain: Resize the background image to make sure the image is fully visible",
"default": "",
"enum": [
"",
"auto",
"cover",
"contain"
],
"_backboneForms": "Select"
},
"_backgroundPosition": {
"type": "string",
"title": "Position",
"description": "The first value is the horizontal position and the second value is the vertical",
"default": "",
"enum": [
"",
"left top",
"left center",
"left bottom",
"center top",
"center center",
"center bottom",
"right top",
"right center",
"right bottom"
],
"_backboneForms": "Select"
}
}
},
"_responsiveClasses": {
"type": "object",
"title": "Responsive classes",
"default": {},
"properties": {
"_large": {
"type": "string",
"title": "Large",
"description": "Large CSS class - used on desktop",
"default": ""
},
"_medium": {
"type": "string",
"title": "Medium",
"description": "Medium CSS class - used on tablet",
"default": ""
},
"_small": {
"type": "string",
"title": "Small",
"description": "Small CSS class - used on mobile",
"default": ""
}
}
}
}
}
}
}
}
}
167 changes: 167 additions & 0 deletions schema/block.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
{
"$anchor": "vanilla-block",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"$patch": {
"source": {
"$ref": "block"
},
"with": {
"properties": {
"_vanilla": {
"type": "object",
"title": "Vanilla",
"default": {},
"properties": {
"_backgroundImage": {
"type": "object",
"title": "Background image",
"default": {},
"properties": {
"_large": {
"type": "string",
"isObjectId": true,
"title": "Large",
"description": "Large background image - used on desktop",
"_backboneForms": {
"type": "Asset",
"media": "image"
}
},
"_medium": {
"type": "string",
"isObjectId": true,
"title": "Medium",
"description": "Medium background image - used on tablet",
"_backboneForms": {
"type": "Asset",
"media": "image"
}
},
"_small": {
"type": "string",
"isObjectId": true,
"title": "Small",
"description": "Small background image - used on mobile",
"_backboneForms": {
"type": "Asset",
"media": "image"
}
}
}
},
"_backgroundStyles": {
"type": "object",
"title": "Background image styles",
"default": {},
"properties": {
"_backgroundRepeat": {
"type": "string",
"title": "Repeat",
"description": "Repeat-x: The background image is repeated only horizontally. Repeat-y: The background image is repeated only vertically",
"default": "",
"enum": [
"",
"repeat",
"repeat-x",
"repeat-y",
"no-repeat"
],
"_backboneForms": "Select"
},
"_backgroundSize": {
"type": "string",
"title": "Size",
"description": "Auto: The background image is displayed in its original size. Cover: Resize the background image to cover the entire container, even if it has to stretch or crop the image. Contain: Resize the background image to make sure the image is fully visible",
"default": "",
"enum": [
"",
"auto",
"cover",
"contain"
],
"_backboneForms": "Select"
},
"_backgroundPosition": {
"type": "string",
"title": "Position",
"description": "The first value is the horizontal position and the second value is the vertical",
"default": "",
"enum": [
"",
"left top",
"left center",
"left bottom",
"center top",
"center center",
"center bottom",
"right top",
"right center",
"right bottom"
],
"_backboneForms": "Select"
}
}
},
"_minimumHeights": {
"type": "object",
"title": "Block minimum height",
"default": {},
"properties": {
"_large": {
"type": "number",
"title": "Large",
"description": "Minimum height should only be used in instances where the block height needs to be greater than the content e.g. to prevent a background image being cropped",
"default": 0
},
"_medium": {
"type": "number",
"title": "Medium",
"description": "Minimum height should only be used in instances where the block height needs to be greater than the content e.g. to prevent a background image being cropped",
"default": 0
},
"_small": {
"type": "number",
"title": "Small",
"description": "Minimum height should only be used in instances where the block height needs to be greater than the content e.g. to prevent a background image being cropped",
"default": 0
}
}
},
"_responsiveClasses": {
"type": "object",
"title": "Responsive classes",
"default": {},
"properties": {
"_large": {
"type": "string",
"title": "Large",
"description": "Large CSS class - used on desktop",
"default": ""
},
"_medium": {
"type": "string",
"title": "Medium",
"description": "Medium CSS class - used on tablet",
"default": ""
},
"_small": {
"type": "string",
"title": "Small",
"description": "Small CSS class - used on mobile",
"default": ""
}
}
},
"_isDividerBlock": {
"type": "boolean",
"title": "Set this block as a divider",
"description": "If enabled, applies a divider class to the block",
"default": false
}
}
}
}
}
}
}
Loading