Skip to content

Commit

Permalink
Fix: added schema for xlarge (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
StuartNicholls authored May 23, 2023
1 parent 0401667 commit 564f41a
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 12 deletions.
36 changes: 30 additions & 6 deletions properties.schema
Original file line number Diff line number Diff line change
Expand Up @@ -58,29 +58,37 @@
"required": false,
"legend": "Menu background image",
"properties": {
"_xlarge": {
"type": "string",
"required": false,
"default": "",
"inputType": "Asset:image",
"validators": [],
"help": "Extra large background image, e.g. hd laptop/desktop computers"
},
"_large": {
"type": "string",
"required": false,
"default": "",
"inputType": "Asset:image",
"validators": [],
"help": "Large background image - used on desktop"
"help": "Large background image, e.g. laptop/desktop computers"
},
"_medium": {
"type": "string",
"required": false,
"default": "",
"inputType": "Asset:image",
"validators": [],
"help": "Medium background image - used on tablet"
"help": "Medium background image, e.g. tablet devices"
},
"_small": {
"type": "string",
"required": false,
"default": "",
"inputType": "Asset:image",
"validators": [],
"help": "Small background image - used on mobile"
"help": "Small background image, e.g. mobile / cellphones"
}
}
},
Expand Down Expand Up @@ -155,29 +163,37 @@
"required": false,
"legend": "Menu header background image",
"properties": {
"_xlarge": {
"type": "string",
"required": false,
"default": "",
"inputType": "Asset:image",
"validators": [],
"help": "Extra large background image, e.g. hd laptop/desktop computers"
},
"_large": {
"type": "string",
"required": false,
"default": "",
"inputType": "Asset:image",
"validators": [],
"help": "Large background image - used on desktop"
"help": "Large background image, e.g. laptop/desktop computers"
},
"_medium": {
"type": "string",
"required": false,
"default": "",
"inputType": "Asset:image",
"validators": [],
"help": "Medium background image - used on tablet"
"help": "Medium background image, e.g. tablet devices"
},
"_small": {
"type": "string",
"required": false,
"default": "",
"inputType": "Asset:image",
"validators": [],
"help": "Small background image - used on mobile"
"help": "Small background image, e.g. mobile / cellphones"
}
}
},
Expand Down Expand Up @@ -217,6 +233,14 @@
"required": false,
"legend": "Menu header minimum height",
"properties": {
"_xlarge": {
"type": "number",
"required": false,
"default": "",
"inputType": "Number",
"validators": ["number"],
"help": "Minimum height should only be used in instances where the menu header height needs to be greater than the content e.g. to prevent a background image being cropped"
},
"_large": {
"type": "number",
"required": false,
Expand Down
38 changes: 32 additions & 6 deletions schema/course.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,21 @@
"title": "Background image",
"default": {},
"properties": {
"_xlarge": {
"type": "string",
"isObjectId": true,
"title": "Extra large",
"description": "Extra large background image, e.g. hd laptop/desktop computers",
"_backboneForms": {
"type": "Asset",
"media": "image"
}
},
"_large": {
"type": "string",
"isObjectId": true,
"title": "Large",
"description": "Large background image - used on desktop",
"description": "Large background image, e.g. laptop/desktop computers",
"_backboneForms": {
"type": "Asset",
"media": "image"
Expand All @@ -85,7 +95,7 @@
"type": "string",
"isObjectId": true,
"title": "Medium",
"description": "Medium background image - used on tablet",
"description": "Medium background image, e.g. tablet devices",
"_backboneForms": {
"type": "Asset",
"media": "image"
Expand All @@ -95,7 +105,7 @@
"type": "string",
"isObjectId": true,
"title": "Small",
"description": "Small background image - used on mobile",
"description": "Small background image, e.g. mobile / cellphones",
"_backboneForms": {
"type": "Asset",
"media": "image"
Expand Down Expand Up @@ -212,11 +222,21 @@
"title": "Header background image",
"default": {},
"properties": {
"_xlarge": {
"type": "string",
"isObjectId": true,
"title": "Extra large",
"description": "Extra large background image, e.g. hd laptop/desktop computers",
"_backboneForms": {
"type": "Asset",
"media": "image"
}
},
"_large": {
"type": "string",
"isObjectId": true,
"title": "Large",
"description": "Large background image - used on desktop",
"description": "Large background image, e.g. laptop/desktop computers",
"_backboneForms": {
"type": "Asset",
"media": "image"
Expand All @@ -226,7 +246,7 @@
"type": "string",
"isObjectId": true,
"title": "Medium",
"description": "Medium background image - used on tablet",
"description": "Medium background image, e.g. tablet devices",
"_backboneForms": {
"type": "Asset",
"media": "image"
Expand All @@ -236,7 +256,7 @@
"type": "string",
"isObjectId": true,
"title": "Small",
"description": "Small background image - used on mobile",
"description": "Small background image, e.g. mobile / cellphones",
"_backboneForms": {
"type": "Asset",
"media": "image"
Expand Down Expand Up @@ -302,6 +322,12 @@
"title": "Header minimum height",
"default": {},
"properties": {
"_xlarge": {
"type": "number",
"title": "Extra Large",
"description": "Minimum height should only be used in instances where the menu header height needs to be greater than the content e.g. to prevent a background image being cropped",
"default": 0
},
"_large": {
"type": "number",
"title": "Large",
Expand Down

0 comments on commit 564f41a

Please sign in to comment.