Skip to content
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
1 change: 1 addition & 0 deletions example.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"_menuHeader": {
"_textAlignment": {
"_title": "left",
"_subtitle": "center",
"_body": "center",
"_instruction": "right"
},
Expand Down
1 change: 1 addition & 0 deletions js/BoxMenuView.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class BoxMenuView extends MenuView {
`${super.className()} boxmenu`,
backgroundImage && 'has-bg-image',
textAlignment?._title && `title-align-${textAlignment._title}`,
textAlignment?._subtitle && `subtitle-align-${textAlignment._subtitle}`,
textAlignment?._body && `body-align-${textAlignment._body}`,
textAlignment?._instruction && `instruction-align-${textAlignment._instruction}`
].join(' ');
Expand Down
3 changes: 3 additions & 0 deletions less/boxMenu.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,21 @@

.@{selector} {
&.title-align-left &__title,
&.subtitle-align-left &__subtitle,
&.body-align-left &__body,
&.instruction-align-left &__instruction {
text-align: start;
}

&.title-align-center &__title,
&.subtitle-align-center &__subtitle,
&.body-align-center &__body,
&.instruction-align-center &__instruction {
text-align: center;
}

&.title-align-right &__title,
&.subtitle-align-right &__subtitle,
&.body-align-right &__body,
&.instruction-align-right &__instruction {
text-align: end;
Expand Down
8 changes: 8 additions & 0 deletions properties.schema
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@
"title": "Title alignment",
"help": "Set the alignment of the menu title. Left: Aligns the title to the left of the container. Center: Aligns the title to the center of the container. Right: Aligns the title to the right of the container. The alignment automatically inverses for right-to-left languages. The default is `` which inherits the natural page direction."
},
"_subtitle": {
"type": "string",
"required": false,
"default": "",
"inputType": {"type":"Select", "options":["","left","center","right"]},
"title": "Subtitle alignment",
"help": "Set the alignment of the menu subtitle. Left: Aligns the subtitle to the left of the container. Center: Aligns the subtitle to the center of the container. Right: Aligns the subtitle to the right of the container. The alignment automatically inverses for right-to-left languages. The default is `` which inherits the natural page direction."
},
"_body": {
"type": "string",
"required": false,
Expand Down
13 changes: 13 additions & 0 deletions schema/course.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,19 @@
],
"_backboneForms": "Select"
},
"_subtitle": {
"type": "string",
"title": "Subtitle alignment",
"description": "Set the alignment of the menu subtitle. Left: Aligns the subtitle to the left of the container. Center: Aligns the subtitle to the center of the container. Right: Aligns the subtitle to the right of the container. The alignment automatically inverses for right-to-left languages. The default is `` which inherits the natural page direction.",
"default": "",
"enum": [
"",
"left",
"center",
"right"
],
"_backboneForms": "Select"
},
"_body": {
"type": "string",
"title": "Body alignment",
Expand Down
Loading