mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Use different approach for background image
This commit is contained in:
@@ -1,9 +1,3 @@
|
||||
export default Ember.Controller.extend({
|
||||
styleCategory: null,
|
||||
|
||||
backgroundClass: function() {
|
||||
var id = this.get('styleCategory.id');
|
||||
if (Em.isNone(id)) { return; }
|
||||
return "category-" + this.get('styleCategory.id');
|
||||
}.property('styleCategory')
|
||||
});
|
||||
|
||||
15
app/assets/javascripts/discourse/views/application.js.es6
Normal file
15
app/assets/javascripts/discourse/views/application.js.es6
Normal file
@@ -0,0 +1,15 @@
|
||||
export default Ember.View.extend({
|
||||
_appendCategoryClass: function(obj, key) {
|
||||
var newClass = Em.get(obj, key);
|
||||
if (newClass) {
|
||||
$('body').addClass('category-' + newClass);
|
||||
}
|
||||
}.observes('controller.styleCategory.id'),
|
||||
|
||||
_removeOldClass: function(obj, key) {
|
||||
var oldClass = Em.get(obj, key);
|
||||
if (oldClass) {
|
||||
$('body').removeClass('category-' + oldClass);
|
||||
}
|
||||
}.observesBefore('controller.styleCategory.id')
|
||||
});
|
||||
@@ -22,7 +22,10 @@ a.no-href {
|
||||
}
|
||||
|
||||
body {
|
||||
button.ok {
|
||||
background-attachment: fixed;
|
||||
background-size: cover;
|
||||
|
||||
button.ok {
|
||||
background: $success;
|
||||
color: $secondary;
|
||||
@include hover {
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
|
||||
#main-outlet {
|
||||
padding-top: 82px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
// Dropdowns
|
||||
|
||||
Reference in New Issue
Block a user