forked from adaptlearning/adapt_framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue-1156-1157: added handlebars to core (adaptlearning#1158)
* issue-1156-1157: added handlebars to core * issue-1156-1157: removed handlebars comments * issue-1156-1157: removed buttons.hbs partial
- Loading branch information
1 parent
e93bfd4
commit 8ef54d8
Showing
15 changed files
with
255 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ src/menu | |
src/extensions | ||
src/less | ||
src/less/adapt.less | ||
templates | ||
build | ||
bower_components | ||
node_modules | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{! .block-container: Adapt will place the articles blocks inside this class}} | ||
<div class="article-inner block-container"> | ||
|
||
<div class="article-header"> | ||
{{! Check if a page title exist and render it}} | ||
{{#if displayTitle}} | ||
<div class="article-title"> | ||
<div role="heading" tabindex="0" class="article-title-inner h2" aria-level="2"> | ||
{{{displayTitle}}} | ||
</div> | ||
</div> | ||
{{/if}} | ||
|
||
{{! Check if page body exists and render it}} | ||
{{#if body}} | ||
<div class="article-body"> | ||
<div class="article-body-inner"> | ||
{{{a11y_text body}}} | ||
</div> | ||
</div> | ||
{{/if}} | ||
|
||
{{! Check if page body exists and render it}} | ||
{{#if instruction}} | ||
<div class="article-instruction"> | ||
<div class="article-instruction-inner"> | ||
{{{a11y_text instruction}}} | ||
</div> | ||
</div> | ||
{{/if}} | ||
</div> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{{! .component-container: Adapt will place the blocks components inside this class}} | ||
<div class="block-inner"> | ||
{{! Check if a page title exist and render it}} | ||
{{#if displayTitle}} | ||
<div class="block-title"> | ||
<div role="heading" tabindex="0" class="block-title-inner h3" aria-level="3"> | ||
{{{displayTitle}}} | ||
</div> | ||
</div> | ||
{{/if}} | ||
|
||
{{! Check if page body exists and render it}} | ||
{{#if body}} | ||
<div class="block-body"> | ||
<div class="block-body-inner"> | ||
{{{a11y_text body}}} | ||
</div> | ||
</div> | ||
{{/if}} | ||
|
||
{{! Check if page body exists and render it}} | ||
{{#if instruction}} | ||
<div class="block-instruction"> | ||
<div class="block-instruction-inner"> | ||
{{{a11y_text instruction}}} | ||
</div> | ||
</div> | ||
{{/if}} | ||
|
||
<div class="component-container"> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<div class="buttons-inner"> | ||
<div class="buttons-cluster clearfix"> | ||
{{#unless _shouldDisplayAttempts}} | ||
<div class="buttons-marking-icon icon display-none"> | ||
</div> | ||
{{/unless}} | ||
<button class="buttons-action" aria-label="{{_buttons._submit.ariaLabel}}">{{{_buttons._submit.buttonText}}}</button> | ||
<button class="buttons-feedback" aria-label="{{_buttons._showFeedback.ariaLabel}}" disabled="true">{{{_buttons._showFeedback.buttonText}}}</button> | ||
</div> | ||
{{#if _shouldDisplayAttempts}} | ||
<div class="buttons-display"> | ||
<div class="buttons-marking-icon icon display-none"> | ||
</div> | ||
<div class="buttons-display-inner"> | ||
</div> | ||
</div> | ||
{{/if}} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div class="drawer-inner"> | ||
<span class='aria-label prevent-default' tabindex='0' role='region'>{{_globals._accessibility._ariaLabels.drawer}}</span> | ||
<div class="drawer-holder"> | ||
</div> | ||
<div class="drawer-toolbar clearfix"> | ||
<div class="drawer-back-button"> | ||
<button class="base drawer-back icon icon-controls-small-left" role="button" aria-label="{{_globals._accessibility._ariaLabels.previous}}"> | ||
</button> | ||
</div> | ||
<div class="drawer-close-button"> | ||
<button class="base drawer-close icon icon-cross" role="button" aria-label="{{_globals._accessibility._ariaLabels.closeDrawer}}"> | ||
</button> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<button class="base drawer-item-open {{className}}"> | ||
<div class="drawer-item-title"> | ||
<div class="drawer-item-title-inner h5">{{{title}}}</div> | ||
</div> | ||
<div class="drawer-item-description"> | ||
<div class="drawer-item-description-inner">{{{a11y_text description}}}</div> | ||
</div> | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{{! .loading-image contains the overlay with the animated image which is displayed while content is loaded in}} | ||
<div class="loading"> | ||
<div class="loader-gif"><div role="heading" tabindex="0" class="h3" aria-level="1">Loading...</div></div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{{! All links in the nav bar should have an attritbue of data-event, navigationView uses this to fire a global event}} | ||
<div class="navigation-inner clearfix" role="navigation" aria-label="{{_globals._accessibility._ariaLabels.navigation}}"> | ||
<button class="base navigation-back-button icon icon-controls-small-left" data-event="backButton" role="button" aria-label="{{_globals._accessibility._ariaLabels.previous}}"></button> | ||
<button class="base navigation-drawer-toggle-button icon icon-list" data-event="toggleDrawer" role="button" aria-label="{{_globals._accessibility._ariaLabels.navigationDrawer}}"></button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<div class="notify-popup notify-type-{{_type}} {{_classes}}" role="region" aria-label="{{_globals._accessibility._ariaLabels.feedbackPopUp}}"> | ||
<div class="notify-popup-inner"> | ||
<div class="notify-popup-content"> | ||
<div class="notify-popup-content-inner"> | ||
{{#if _showIcon}} | ||
<div class="notify-popup-icon"> | ||
<div class="icon{{#if_value_equals _type "prompt"}} icon-question{{/if_value_equals}}{{#if_value_equals _type "alert"}} icon-warning{{/if_value_equals}}"> | ||
</div> | ||
</div> | ||
{{/if}} | ||
{{#if title}} | ||
<div class="notify-popup-title"> | ||
<div class="notify-popup-title-inner h5" tabindex="0" role="heading" aria-level="1"> | ||
{{{title}}} | ||
</div> | ||
</div> | ||
{{/if}} | ||
{{#if body}} | ||
<div class="notify-popup-body"> | ||
<div class="notify-popup-body-inner">{{{a11y_text body}}}</div> | ||
</div> | ||
{{/if}} | ||
|
||
{{#if_value_equals _type "alert"}} | ||
<div class="notify-popup-buttons"> | ||
<button class="notify-popup-button notify-popup-alert-button" role="button" aria-label="{{{confirmText}}}">{{{confirmText}}}</button> | ||
</div> | ||
{{/if_value_equals}} | ||
|
||
{{#if_value_equals _type "prompt"}} | ||
<div class="notify-popup-buttons"> | ||
{{#each _prompts}} | ||
<button class="notify-popup-button notify-popup-prompt-button" data-event="{{_callbackEvent}}" role="button" aria-label="{{{promptText}}}">{{{promptText}}}</button> | ||
{{/each}} | ||
</div> | ||
{{/if_value_equals}} | ||
|
||
</div> | ||
</div> | ||
{{! toolbar moved for AA purposes - last tabbable element}} | ||
{{#if_value_equals _type "popup"}} | ||
<button class="base notify-popup-done" role="button" aria-label="{{_globals._accessibility._ariaLabels.closePopup}}"> | ||
<div class="notify-popup-icon-close icon icon-cross"></div> | ||
</button> | ||
{{/if_value_equals}} | ||
</div> | ||
</div> | ||
|
||
|
||
<div class="notify-shadow"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div class="notify-push-inner" role="region" aria-label="{{_globals._accessibility._ariaLabels.feedbackPopUp}}"> | ||
<div class="notify-push-title"> | ||
<div class="notify-push-title-inner h5" tabindex="0" role="heading" aria-level="1"> | ||
{{{title}}} | ||
</div> | ||
</div> | ||
<div class="notify-push-body"> | ||
<div class="notify-push-body-inner"> | ||
{{{a11y_text body}}} | ||
</div> | ||
</div> | ||
</div> | ||
<button class="base notify-push-close" role="button" aria-label="{{_globals._accessibility._ariaLabels.closePopup}}"> | ||
<span class="icon icon-cross"></span> | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<div class="page-inner article-container" role="main" aria-label="{{_globals._accessibility._ariaLabels.page}}"> | ||
|
||
<div class="page-header"> | ||
<div class="page-header-inner clearfix"> | ||
|
||
<div class="page-header-content"> | ||
<div class="page-header-content-inner"> | ||
|
||
{{#if displayTitle}} | ||
<div class="page-title"> | ||
<div class="page-title-inner h1" tabindex="0" role="heading" aria-level="1"> | ||
{{{displayTitle}}} | ||
</div> | ||
</div> | ||
{{/if}} | ||
|
||
{{#if body}} | ||
<div class="page-body"> | ||
<div class="page-body-inner"> | ||
{{#if pageBody}} | ||
{{{a11y_text pageBody}}} | ||
{{else}} | ||
{{{a11y_text body}}} | ||
{{/if}} | ||
</div> | ||
</div> | ||
{{/if}} | ||
|
||
</div> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
</div> | ||
<div class="aria-label relative a11y-ignore-focus prevent-default" tabindex="0" role="region">{{_globals._accessibility._ariaLabels.pageEnd}}</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<div class="{{_component}}-header component-header"> | ||
<div class="{{_component}}-header-inner component-header-inner"> | ||
|
||
{{#if displayTitle}} | ||
<div class="{{_component}}-title component-title"> | ||
<div role="heading" tabindex="0" class="{{_component}}-title-inner component-title-inner" aria-level="4"> | ||
{{{displayTitle}}} | ||
</div> | ||
</div> | ||
{{/if}} | ||
|
||
{{#if body}} | ||
<div class="{{_component}}-body component-body"> | ||
<div class="{{_component}}-body-inner component-body-inner"> | ||
{{{a11y_text body}}} | ||
</div> | ||
</div> | ||
{{/if}} | ||
|
||
{{#if instruction}} | ||
<div class="{{_component}}-instruction component-instruction"> | ||
<div class="{{_component}}-instruction-inner component-instruction-inner"> | ||
{{{a11y_text instruction}}} | ||
</div> | ||
</div> | ||
{{/if}} | ||
|
||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div class="accessibility-state"> | ||
{{#if _isComplete}} | ||
<span tabindex="0" role="region" class="aria-label a11y-ignore-focus prevent-default" id="buttons-aria-label-complete">{{a11y_normalize displayTitle}} {{_globals._accessibility._ariaLabels.complete}} {{#if _isQuestionType}}{{#if _canShowFeedback}}{{#if _isCorrect}}{{_globals._accessibility._ariaLabels.correct}}{{else}}{{_globals._accessibility._ariaLabels.incorrect}}{{/if}}{{/if}}{{/if}}</span> | ||
{{else}} | ||
<span tabindex="0" role="region" class="aria-label a11y-ignore-focus prevent-default" id="buttons-aria-label-incomplete">{{a11y_normalize displayTitle}} {{_globals._accessibility._ariaLabels.incomplete}}</span> | ||
{{/if}} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{{! drawerView.js will appends this on documnet's body}} | ||
<div id="shadow" class="shadow display-none"></div> |