More highlight tweaking for search, makes it much easier to theme
This commit is contained in:
parent
5aae2e937a
commit
a3863b52db
|
@ -8,8 +8,8 @@ export default Ember.CollectionView.extend({
|
||||||
didInsertElement: function(){
|
didInsertElement: function(){
|
||||||
var term = this.get('controller.term');
|
var term = this.get('controller.term');
|
||||||
if(!_.isEmpty(term)) {
|
if(!_.isEmpty(term)) {
|
||||||
this.$('.blurb').highlight(term.split(/\s+/));
|
this.$('.blurb').highlight(term.split(/\s+/), {className: 'search-highlight'});
|
||||||
this.$('.topic-title').highlight(term.split(/\s+/), {className: 'highlighted'} );
|
this.$('.topic-title').highlight(term.split(/\s+/), {className: 'search-highlight'} );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -339,3 +339,7 @@
|
||||||
.highlight-strong {
|
.highlight-strong {
|
||||||
background-color: dark-light-diff($highlight, $secondary, 40%, -50%);
|
background-color: dark-light-diff($highlight, $secondary, 40%, -50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search-highlight {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
|
@ -70,6 +70,9 @@ and (max-width : 570px) {
|
||||||
color: scale-color($primary, $lightness: 45%);
|
color: scale-color($primary, $lightness: 45%);
|
||||||
display: block;
|
display: block;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
|
.search-highlight {
|
||||||
|
color: scale-color($primary, $lightness: 25%);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.d-dropdown#search-dropdown {
|
.d-dropdown#search-dropdown {
|
||||||
|
|
Loading…
Reference in New Issue