mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-14 18:52:05 +03:00
e3edcff41b
Related to #4844 The newly added user image in the content list uses a CSS property to crop `img` tags, but it's not supported in IE or Firefox. This issue corrects that by chancing them to be background images which can be cropped cross-browser. It also adjusts the nav bar user image (previously an `img` tag) which would squash a non-square image. Also removes the border around the settings/users/ user images, to be consistent with the rest of the UI.
32 lines
998 B
JavaScript
32 lines
998 B
JavaScript
var ApplicationController = Ember.Controller.extend({
|
|
// jscs: disable
|
|
hideNav: Ember.computed.match('currentPath', /(error|signin|signup|setup|forgotten|reset)/),
|
|
// jscs: enable
|
|
|
|
topNotificationCount: 0,
|
|
showGlobalMobileNav: false,
|
|
showSettingsMenu: false,
|
|
|
|
userImage: Ember.computed('session.user.image', function () {
|
|
return this.get('session.user.image') || this.get('ghostPaths.url').asset('/shared/img/user-image.png');
|
|
}),
|
|
|
|
userImageBackground: Ember.computed('userImage', function () {
|
|
return 'background-image: url(' + this.get('userImage') + ')';
|
|
}),
|
|
|
|
userImageAlt: Ember.computed('session.user.name', function () {
|
|
var name = this.get('session.user.name');
|
|
|
|
return (name) ? name + '\'s profile picture' : 'Profile picture';
|
|
}),
|
|
|
|
actions: {
|
|
topNotificationChange: function (count) {
|
|
this.set('topNotificationCount', count);
|
|
}
|
|
}
|
|
});
|
|
|
|
export default ApplicationController;
|