Commit 113f2b82 authored by Robert Knight's avatar Robert Knight

Make the full width of an annotation quote clickable to expand it

For consistency with annotation bodies and to provide an easier hit
target on mobile, make the full width of annotation quotes clickable
to expand them.
parent 3d3df156
...@@ -28,6 +28,14 @@ function ExcerptController() { ...@@ -28,6 +28,14 @@ function ExcerptController() {
this.showInlineControls = function () { this.showInlineControls = function () {
return this.overflowing() && this.inlineControls; return this.overflowing() && this.inlineControls;
} }
this.bottomShadowStyles = function () {
return {
'excerpt__shadow': true,
'excerpt__shadow--transparent': this.inlineControls,
'is-hidden': !this.isExpandable(),
};
}
} }
function toPx(val) { function toPx(val) {
......
...@@ -57,6 +57,10 @@ ...@@ -57,6 +57,10 @@
transition: opacity $expand-duration linear; transition: opacity $expand-duration linear;
} }
.excerpt__shadow--transparent {
background-image: none;
}
.excerpt__shadow.is-hidden { .excerpt__shadow.is-hidden {
opacity: 0; opacity: 0;
pointer-events: none; pointer-events: none;
......
...@@ -14,9 +14,7 @@ ...@@ -14,9 +14,7 @@
</span> </span>
</div> </div>
</div> </div>
<div class="excerpt__shadow" <div ng-click="vm.toggle()"
ng-click="vm.toggle()" ng-class="vm.bottomShadowStyles()"
ng-class="{'is-hidden' : !vm.isExpandable()}"
ng-if="!vm.inlineControls"
title="Show the full excerpt"></div> title="Show the full excerpt"></div>
</div> </div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment