FEATURE: Allow logo URLs to be overridden easily using `reopenWidget()`
This commit is contained in:
parent
3ff3bb6e2a
commit
0083eec686
|
@ -16,18 +16,30 @@ export default createWidget("home-logo", {
|
||||||
return typeof href === "function" ? href() : href;
|
return typeof href === "function" ? href() : href;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
logoUrl() {
|
||||||
|
return this.siteSettings.site_logo_url || "";
|
||||||
|
},
|
||||||
|
|
||||||
|
mobileLogoUrl() {
|
||||||
|
return this.siteSettings.site_mobile_logo_url || "";
|
||||||
|
},
|
||||||
|
|
||||||
|
smallLogoUrl() {
|
||||||
|
return this.siteSettings.site_logo_small_url || "";
|
||||||
|
},
|
||||||
|
|
||||||
logo() {
|
logo() {
|
||||||
const { siteSettings } = this;
|
const { siteSettings } = this;
|
||||||
const mobileView = this.site.mobileView;
|
const mobileView = this.site.mobileView;
|
||||||
|
|
||||||
const mobileLogoUrl = siteSettings.site_mobile_logo_url || "";
|
const mobileLogoUrl = this.mobileLogoUrl();
|
||||||
const showMobileLogo = mobileView && mobileLogoUrl.length > 0;
|
const showMobileLogo = mobileView && mobileLogoUrl.length > 0;
|
||||||
|
|
||||||
const logoUrl = siteSettings.site_logo_url || "";
|
const logoUrl = this.logoUrl();
|
||||||
const title = siteSettings.title;
|
const title = siteSettings.title;
|
||||||
|
|
||||||
if (this.attrs.minimized) {
|
if (this.attrs.minimized) {
|
||||||
const logoSmallUrl = siteSettings.site_logo_small_url || "";
|
const logoSmallUrl = this.smallLogoUrl();
|
||||||
if (logoSmallUrl.length) {
|
if (logoSmallUrl.length) {
|
||||||
return h("img#site-logo.logo-small", {
|
return h("img#site-logo.logo-small", {
|
||||||
key: "logo-small",
|
key: "logo-small",
|
||||||
|
|
Loading…
Reference in New Issue