mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 22:01:49 +03:00
🐛 fix more asset paths (#360)
no issue - #309 introduced a change to our asset path but some images, particularly around the team page and user avatars were missed, this fixes those URLs to use the new `ghostPaths.assetRoot` helper
This commit is contained in:
parent
69d32acfe5
commit
79ea7ad4e7
@ -33,7 +33,7 @@ export default Component.extend(ActiveLinkWrapper, {
|
||||
}),
|
||||
|
||||
authorAvatar: computed('post.author.image', function () {
|
||||
return this.get('post.author.image') || `${this.get('ghostPaths.subdir')}/ghost/img/user-image.png`;
|
||||
return this.get('post.author.image') || `${this.get('ghostPaths.assetRoot')}/img/user-image.png`;
|
||||
}),
|
||||
|
||||
authorAvatarBackground: computed('authorAvatar', function () {
|
||||
|
@ -44,7 +44,7 @@ export default Component.extend({
|
||||
},
|
||||
|
||||
defaultImage: computed('ghostPaths', function () {
|
||||
let url = `${this.get('ghostPaths.subdir')}/ghost/img/user-image.png`;
|
||||
let url = `${this.get('ghostPaths.assetRoot')}/img/user-image.png`;
|
||||
return htmlSafe(`background-image: url(${url})`);
|
||||
}),
|
||||
|
||||
@ -71,7 +71,7 @@ export default Component.extend({
|
||||
|
||||
this.get('ajax').request(gravatarUrl)
|
||||
.catch((error) => {
|
||||
let defaultImageUrl = `url("${this.get('ghostPaths.subdir')}/ghost/img/user-image.png")`;
|
||||
let defaultImageUrl = `url("${this.get('ghostPaths.assetRoot')}/img/user-image.png")`;
|
||||
|
||||
if (isNotFoundError(error)) {
|
||||
this.$('.placeholder-img')[0].style.backgroundImage = htmlSafe(defaultImageUrl);
|
||||
|
@ -11,7 +11,7 @@ export default Component.extend({
|
||||
ghostPaths: injectService(),
|
||||
|
||||
userDefault: computed('ghostPaths', function () {
|
||||
return `${this.get('ghostPaths.subdir')}/ghost/img/user-image.png`;
|
||||
return `${this.get('ghostPaths.assetRoot')}/img/user-image.png`;
|
||||
}),
|
||||
|
||||
userImageBackground: computed('user.image', 'userDefault', function () {
|
||||
|
@ -57,7 +57,7 @@ export default Controller.extend({
|
||||
|
||||
// duplicated in gh-user-active -- find a better home and consolidate?
|
||||
userDefault: computed('ghostPaths', function () {
|
||||
return `${this.get('ghostPaths.subdir')}/ghost/img/user-image.png`;
|
||||
return `${this.get('ghostPaths.assetRoot')}/img/user-image.png`;
|
||||
}),
|
||||
|
||||
userImageBackground: computed('user.image', 'userDefault', function () {
|
||||
@ -68,7 +68,7 @@ export default Controller.extend({
|
||||
// end duplicated
|
||||
|
||||
coverDefault: computed('ghostPaths', function () {
|
||||
return `${this.get('ghostPaths.subdir')}/ghost/img/user-cover.png`;
|
||||
return `${this.get('ghostPaths.assetRoot')}/img/user-cover.png`;
|
||||
}),
|
||||
|
||||
coverImageBackground: computed('user.cover', 'coverDefault', function () {
|
||||
|
Loading…
Reference in New Issue
Block a user