Convert quote controls to use d-icon

This commit is contained in:
Robin Ward 2017-10-06 15:27:02 -04:00
parent f4decf9193
commit 494ad1e9de
2 changed files with 8 additions and 5 deletions

View File

@ -163,7 +163,8 @@ export default class PostCooked {
// If we have a post reference
if (postNumber) {
navLink = `<a href='${this._urlForPostNumber(postNumber)}' title='${quoteTitle}' class='back'></a>`;
let icon = iconHTML('arrow-up');
navLink = `<a href='${this._urlForPostNumber(postNumber)}' title='${quoteTitle}' class='back'>${icon}</a>`;
}
// Only add the expand/contract control if it's not a full post
@ -188,7 +189,8 @@ export default class PostCooked {
// Unless it's a full quote, allow click to expand
if (!($aside.data('full') || $title.data('has-quote-controls'))) {
$title.on('click', e2 => {
if ($(e2.target).is('a')) return true;
let $target = $(e2.target);
if ($target.closest('a').length) { return true; }
this._toggleQuote($aside);
});
$title.data('has-quote-controls', true);

View File

@ -87,7 +87,7 @@ aside.quote {
}
}
.quote-controls {
.quote-controls, .quote-controls .d-icon {
color: dark-light-choose(scale-color($primary, $lightness: 70%), scale-color($secondary, $lightness: 30%));
}
@ -114,8 +114,9 @@ aside.quote {
.quote-controls {
float: right;
a {
margin: 0;
display: flex;
.d-icon {
margin-left: 0.2em;
}
}