-
-
-
-
-
-
-
-
-
+
{{site.siteUrl}}
diff --git a/src/core/features/login/pages/credentials/credentials.ts b/src/core/features/login/pages/credentials/credentials.ts
index 9ee00529ab9..fabf6d53b2e 100644
--- a/src/core/features/login/pages/credentials/credentials.ts
+++ b/src/core/features/login/pages/credentials/credentials.ts
@@ -57,8 +57,6 @@ export class CoreLoginCredentialsPage implements OnInit, OnDestroy {
credForm!: FormGroup;
site!: CoreUnauthenticatedSite;
- siteName?: string;
- logoUrl?: string;
authInstructions?: string;
canSignup?: boolean;
pageLoaded = false;
@@ -104,11 +102,9 @@ export class CoreLoginCredentialsPage implements OnInit, OnDestroy {
}
this.site = CoreSitesFactory.makeUnauthenticatedSite(siteUrl, this.siteConfig);
- this.logoUrl = this.site.getLogoUrl(this.siteConfig);
this.urlToOpen = CoreNavigator.getRouteParam('urlToOpen');
this.supportConfig = this.siteConfig && new CoreUserGuestSupportConfig(this.site, this.siteConfig);
this.displaySiteUrl = this.site.shouldDisplayInformativeLinks();
- this.siteName = await this.site.getSiteName();
} catch (error) {
CoreDomUtils.showErrorModal(error);
@@ -220,8 +216,6 @@ export class CoreLoginCredentialsPage implements OnInit, OnDestroy {
if (this.site.isDemoModeSite()) {
this.showScanQR = false;
} else {
- this.siteName = this.siteConfig.sitename;
- this.logoUrl = this.site.getLogoUrl(this.siteConfig);
this.showScanQR = await CoreLoginHelper.displayQRInCredentialsScreen(this.siteConfig.tool_mobile_qrcodetype);
}
diff --git a/src/core/features/login/pages/reconnect/reconnect.html b/src/core/features/login/pages/reconnect/reconnect.html
index 2a5c92b3a1a..ca1e726a468 100644
--- a/src/core/features/login/pages/reconnect/reconnect.html
+++ b/src/core/features/login/pages/reconnect/reconnect.html
@@ -31,16 +31,8 @@
{{ 'core.login.reconnect' | translate }}
-
-
-
-
-
+
-
-
-
{{site.siteUrl}}
diff --git a/src/core/features/login/pages/reconnect/reconnect.ts b/src/core/features/login/pages/reconnect/reconnect.ts
index 684d36a1e7a..1db1c98f7e6 100644
--- a/src/core/features/login/pages/reconnect/reconnect.ts
+++ b/src/core/features/login/pages/reconnect/reconnect.ts
@@ -49,7 +49,6 @@ export class CoreLoginReconnectPage implements OnInit, OnDestroy {
credForm: FormGroup;
site!: CoreSite;
- logoUrl?: string;
displaySiteUrl = false;
showForgottenPassword = true;
showUserAvatar = false;
@@ -202,7 +201,6 @@ export class CoreLoginReconnectPage implements OnInit, OnDestroy {
}
this.isBrowserSSO = CoreLoginHelper.isSSOLoginNeeded(this.siteConfig.typeoflogin);
- this.logoUrl = this.site.getLogoUrl();
await CoreSites.checkApplication(this.siteConfig);
}
diff --git a/src/core/features/login/pages/site/site.scss b/src/core/features/login/pages/site/site.scss
index 0fc9e7a879d..8c1a82000be 100644
--- a/src/core/features/login/pages/site/site.scss
+++ b/src/core/features/login/pages/site/site.scss
@@ -99,7 +99,8 @@
}
@include media-breakpoint-up(md) {
- ion-content .core-login-site-logo {
+ ion-content .core-login-site-logo,
+ ion-content core-site-logo {
margin-top: 20%;
&.hidden {
margin-top: 0;
diff --git a/src/core/features/mainmenu/components/user-menu/user-menu.html b/src/core/features/mainmenu/components/user-menu/user-menu.html
index ae58884dc1d..e1e1b86e5db 100644
--- a/src/core/features/mainmenu/components/user-menu/user-menu.html
+++ b/src/core/features/mainmenu/components/user-menu/user-menu.html
@@ -13,18 +13,14 @@
-
+
@@ -32,11 +28,7 @@
diff --git a/src/core/features/mainmenu/components/user-menu/user-menu.scss b/src/core/features/mainmenu/components/user-menu/user-menu.scss
index 1cfd248fd88..a2ffe306716 100644
--- a/src/core/features/mainmenu/components/user-menu/user-menu.scss
+++ b/src/core/features/mainmenu/components/user-menu/user-menu.scss
@@ -22,23 +22,17 @@
}
}
-.core-usermenu-sitename {
- font: var(--mdl-typography-subtitle-font-lg);
-}
-
-img.core-usermenu-site-logo {
- margin-bottom: 8px;
- max-height: var(--core-user-menu-site-logo-max-height);
-}
+core-site-logo {
+ --core-site-logo-margin-bottom: 8px;
+ --core-site-logo-maxheight: var(--core-user-menu-site-logo-max-height);
+ --core-site-logo-sitename-display: block;
-img.image-not-found {
- display: none;
+ --core-site-logo-sitename-font: var(--mdl-typography-subtitle-font-lg);
}
-
@if ($core-user-hide-sitename) {
- .core-usermenu-sitename {
- display: none;
+ core-site-logo {
+ --core-site-logo-sitename-display: none;
}
}
diff --git a/src/core/features/mainmenu/components/user-menu/user-menu.ts b/src/core/features/mainmenu/components/user-menu/user-menu.ts
index 1aecec73fb9..6fbb49298b8 100644
--- a/src/core/features/mainmenu/components/user-menu/user-menu.ts
+++ b/src/core/features/mainmenu/components/user-menu/user-menu.ts
@@ -15,7 +15,6 @@
import { CoreConstants } from '@/core/constants';
import { CoreSharedModule } from '@/core/shared.module';
import { Component, OnDestroy, OnInit } from '@angular/core';
-import { CoreSite } from '@classes/sites/site';
import { CoreSiteInfo } from '@classes/sites/unauthenticated-site';
import { CoreFilter } from '@features/filter/services/filter';
import { CoreUserAuthenticatedSupportConfig } from '@features/user/classes/support/authenticated-support-config';
@@ -31,10 +30,10 @@ import { CoreModals } from '@services/modals';
import { CoreNavigator } from '@services/navigator';
import { CoreSites } from '@services/sites';
import { CoreDomUtils } from '@services/utils/dom';
-import { CorePromiseUtils } from '@singletons/promise-utils';
import { ModalController } from '@singletons';
import { Subscription } from 'rxjs';
import { CoreLoginHelper } from '@features/login/services/login-helper';
+import { CoreSiteLogoComponent } from '@/core/components/site-logo/site-logo';
/**
* Component to display a user menu.
@@ -46,6 +45,7 @@ import { CoreLoginHelper } from '@features/login/services/login-helper';
standalone: true,
imports: [
CoreSharedModule,
+ CoreSiteLogoComponent,
],
})
export class CoreMainMenuUserMenuComponent implements OnInit, OnDestroy {
@@ -53,8 +53,6 @@ export class CoreMainMenuUserMenuComponent implements OnInit, OnDestroy {
siteId?: string;
siteInfo?: CoreSiteInfo;
siteName?: string;
- siteLogo?: string;
- siteLogoLoaded = false;
siteUrl?: string;
displaySiteUrl = false;
handlers: CoreUserProfileHandlerData[] = [];
@@ -81,8 +79,6 @@ export class CoreMainMenuUserMenuComponent implements OnInit, OnDestroy {
this.removeAccountOnLogout = !!CoreConstants.CONFIG.removeaccountonlogout;
this.displaySiteUrl = currentSite.shouldDisplayInformativeLinks();
- this.loadSiteLogo(currentSite);
-
if (!this.siteInfo) {
return;
}
@@ -127,25 +123,6 @@ export class CoreMainMenuUserMenuComponent implements OnInit, OnDestroy {
});
}
- /**
- * Load site logo from current site public config.
- *
- * @param currentSite Current site object.
- * @returns Promise resolved when done.
- */
- protected async loadSiteLogo(currentSite: CoreSite): Promise {
- if (currentSite.forcesLocalLogo()) {
- this.siteLogo = currentSite.getLogoUrl();
- this.siteLogoLoaded = true;
-
- return;
- }
-
- const siteConfig = await CorePromiseUtils.ignoreErrors(currentSite.getPublicConfig());
- this.siteLogo = currentSite.getLogoUrl(siteConfig);
- this.siteLogoLoaded = true;
- }
-
/**
* Opens User profile page.
*
diff --git a/src/core/features/mainmenu/mainmenu-home-lazy.module.ts b/src/core/features/mainmenu/mainmenu-home-lazy.module.ts
index a0541483197..5f18ed2d82e 100644
--- a/src/core/features/mainmenu/mainmenu-home-lazy.module.ts
+++ b/src/core/features/mainmenu/mainmenu-home-lazy.module.ts
@@ -22,6 +22,7 @@ import { CoreMainMenuHomeHandlerService } from '@features/mainmenu/services/hand
import { CoreMainMenuComponentsModule } from '@features/mainmenu/components/components.module';
import { resolveHomeRoutes } from '@features/mainmenu/mainmenu-home-routing.module';
import { CoreMainMenuHomePage } from '@features/mainmenu/pages/home/home';
+import { CoreSiteLogoComponent } from '@/core/components/site-logo/site-logo';
/**
* Build module routes.
@@ -49,6 +50,7 @@ function buildRoutes(injector: Injector): Routes {
imports: [
CoreSharedModule,
CoreMainMenuComponentsModule,
+ CoreSiteLogoComponent,
],
providers: [
{ provide: ROUTES, multi: true, useFactory: buildRoutes, deps: [Injector] },
diff --git a/src/core/features/mainmenu/pages/home/home.html b/src/core/features/mainmenu/pages/home/home.html
index f1769431a6a..5bb4d7ef959 100644
--- a/src/core/features/mainmenu/pages/home/home.html
+++ b/src/core/features/mainmenu/pages/home/home.html
@@ -5,8 +5,7 @@
-
-
+
diff --git a/src/theme/components/ion-header.scss b/src/theme/components/ion-header.scss
index 8a82ca47d7b..319c2dd2912 100644
--- a/src/theme/components/ion-header.scss
+++ b/src/theme/components/ion-header.scss
@@ -69,15 +69,10 @@ ion-header.header-md {
display: inline !important;
}
- h1 {
- .core-header-logo {
- max-height: var(--core-mainpage-headerlogo-maxheight);
- display: var( --core-mainpage-headerlogo-display);
- }
-
- .core-header-sitename {
- display: var(--core-mainpage-sitename-display);
- }
+ h1 core-site-logo {
+ --core-site-logo-maxheight: var(--core-mainpage-headerlogo-maxheight);
+ --core-site-logo-display: var(--core-mainpage-headerlogo-display);
+ --core-site-logo-sitename-display: var(--core-mainpage-sitename-display);
}
h1, h2, .subheading {
diff --git a/src/theme/theme.design-system.scss b/src/theme/theme.design-system.scss
index ba3453db499..bea73948ab6 100644
--- a/src/theme/theme.design-system.scss
+++ b/src/theme/theme.design-system.scss
@@ -236,9 +236,9 @@
--core-mainpage-headerlogo-maxheight: calc(var(--core-header-toolbar-height) - 16px);
@if ($core-dashboard-logo) {
- --core-mainpage-headerlogo-display: inline;
+ --core-mainpage-headerlogo-display: block;
} @else {
- --core-mainpage-sitename-display: inline;
+ --core-mainpage-sitename-display: block;
}
}