More highlight tweaking for search, makes it much easier to theme

This commit is contained in:
Sam 2014-09-04 18:00:01 +10:00
parent 5aae2e937a
commit a3863b52db
3 changed files with 9 additions and 2 deletions

View File

@ -8,8 +8,8 @@ export default Ember.CollectionView.extend({
didInsertElement: function(){
var term = this.get('controller.term');
if(!_.isEmpty(term)) {
this.$('.blurb').highlight(term.split(/\s+/));
this.$('.topic-title').highlight(term.split(/\s+/), {className: 'highlighted'} );
this.$('.blurb').highlight(term.split(/\s+/), {className: 'search-highlight'});
this.$('.topic-title').highlight(term.split(/\s+/), {className: 'search-highlight'} );
}
}
});

View File

@ -339,3 +339,7 @@
.highlight-strong {
background-color: dark-light-diff($highlight, $secondary, 40%, -50%);
}
.search-highlight {
font-weight: bold;
}

View File

@ -70,6 +70,9 @@ and (max-width : 570px) {
color: scale-color($primary, $lightness: 45%);
display: block;
font-size: 11px;
.search-highlight {
color: scale-color($primary, $lightness: 25%);
}
}
.d-dropdown#search-dropdown {