mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:33:24 +08:00
FIX: Add a vdom key to the logo to avoid weird resizing
This commit is contained in:
parent
87efa0eddd
commit
7a079f6de5
|
@ -19,16 +19,16 @@ export default createWidget('home-logo', {
|
|||
if (!mobileView && this.attrs.minimized) {
|
||||
const logoSmallUrl = siteSettings.logo_small_url || '';
|
||||
if (logoSmallUrl.length) {
|
||||
return h('img#site-logo.logo-small', { attributes: { src: logoSmallUrl, width: 33, height: 33, alt: title } });
|
||||
return h('img#site-logo.logo-small', { key: 'logo-small', attributes: { src: logoSmallUrl, width: 33, height: 33, alt: title } });
|
||||
} else {
|
||||
return iconNode('home');
|
||||
}
|
||||
} else if (showMobileLogo) {
|
||||
return h('img#site-logo.logo-big', { attributes: { src: mobileLogoUrl, alt: title } });
|
||||
return h('img#site-logo.logo-big', { key: 'logo-mobile', attributes: { src: mobileLogoUrl, alt: title } });
|
||||
} else if (logoUrl.length) {
|
||||
return h('img#site-logo.logo-big', { attributes: { src: logoUrl, alt: title } });
|
||||
return h('img#site-logo.logo-big', { key: 'logo-big', attributes: { src: logoUrl, alt: title } });
|
||||
} else {
|
||||
return h('h2#site-text-logo.text-logo', title);
|
||||
return h('h2#site-text-logo.text-logo', { key: 'logo-text' }, title);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user