Updated fallback site icon for navigation header

This commit is contained in:
Peter Zimon 2021-03-03 14:01:44 +01:00
parent 4a79a94993
commit 332e54533a

View File

@ -95,14 +95,7 @@ export default Component.extend(ShortcutsMixin, {
return; return;
} }
let subdirRegExp = new RegExp(`^${this.get('ghostPaths.subdir')}`); let iconUrl = 'https://static.ghost.org/v3.0.0/images/ghost-squircle.png';
let blogIcon = icon ? icon : 'favicon.ico';
let iconUrl;
blogIcon = blogIcon.replace(subdirRegExp, '');
iconUrl = this.get('ghostPaths.url').join(this.get('config.blogUrl'), blogIcon).replace(/\/$/, '');
iconUrl += `?t=${(new Date()).valueOf()}`;
this.set('iconStyle', htmlSafe(`background-image: url(${iconUrl})`)); this.set('iconStyle', htmlSafe(`background-image: url(${iconUrl})`));
} }