mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 19:01:52 +08:00
Convert quote controls to use d-icon
This commit is contained in:
parent
f4decf9193
commit
494ad1e9de
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user