Skip to content
Open
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
8 changes: 4 additions & 4 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "adapt-expose",
"description": "Content is hidden behind covers. Click the cover and expose the content below. Range of animations. Demo available.",
"version": "1.1.3",
"version": "1.1.7",
"framework": "^2.0.0",
"displayName": "Expose",
"component": "expose",
"main": "/js/adapt-expose.js",
"homepage": "https://github.com/danielstorey/adapt-expose",
"repository": "git://github.com/danielstorey/adapt-expose.git",
"issues": "https://github.com/danielstorey/adapt-expose/issues",
"homepage": "https://github.com/elearningdifferently/adapt-expose",
"repository": "git://github.com/elearningdifferently/adapt-expose.git",
"issues": "https://github.com/elearningdifferently/adapt-expose/issues",
"keywords": [
"adapt-plugin",
"adapt-component"
Expand Down
20 changes: 18 additions & 2 deletions less/expose.less
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,23 @@
padding: 0;
text-align: center;
color: @primary-color-inverted;

.text-bg {
position: relative;
display: inline-block;
position: relative;
top: 50%;
width: 80%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
font-size: 26px;
background-color: @primary-color;
padding-top: 25px;
padding-bottom: 5px;
}

.text {
position: relative;
Expand All @@ -66,8 +83,7 @@
transform: translateY(-50%);
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
font-size: 24px;

font-size: 26px;
}

.back,
Expand Down
15 changes: 15 additions & 0 deletions properties.schema
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,21 @@
"help": "The text to display on the front cover",
"translatable": true
},
"_front_graphic": {
"type": "object",
"required": false,
"title": "Front Image",
"properties":{
"src": {
"type": "string",
"required": false,
"default": "",
"inputType": "Asset:image",
"validators": [],
"help": "Optional image which will be rendered on the items front"
}
}
},
"back": {
"type": "object",
"required": true,
Expand Down
4 changes: 3 additions & 1 deletion templates/expose.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
<button class="expose-item-button"></button>
<div class="expose-item-cover">
<div class="back"></div>
<div class="front"></div>
<div class="front"{{#if _front_graphic.src}} style="background: url({{_front_graphic.src}}) no-repeat center center fixed;-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;" {{else}} {{/if}}></div>
<div class="text-bg">
<span class="text">{{#if front}} {{{a11y_text front}}} {{else}} ? {{/if}}</span>
</div>
</div>
<div class="expose-item-content">
{{#with back}}
Expand Down