Ends in:
2 DAYS
17 HRS
28 MIN
2 SEC
Ends in:
2 D
17 H
28 M
2 S
Open Closed

The logo and reverse-logo can not be replaced automatically in Blazor Server Application? #4215


User avatar
0
zhongfang created
  • ABP Framework version: v6.0.1
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • the logo image is the default value: /images/logo/logo-light.png
  • Steps to reproduce the issue:"
  • Set the LogoUrl in BrandingProvier class
private string _logoUrl;

    public override string LogoUrl
    {
        get
        {
            if (string.IsNullOrEmpty(this._logoUrl))
            {
                this._logoUrl = "/images/logo/zimuceping.png";
            }

            return this._logoUrl;
        }
    }

    private string _logoReverseUrl;

    public override string LogoReverseUrl 
    {
        get
        {
            if (string.IsNullOrEmpty(this._logoReverseUrl))
            {
                this._logoReverseUrl = "/images/logo/zimuceping.png";
            }

            return this._logoReverseUrl;
        }
    }
  • The logo displayed correctly in Login Page
  • The logo is not displayed in my own blazor pages.

3 Answer(s)
  • User Avatar
    0
    zhongfang created

    I noticed that the below style code at head area within MVC pages. But can't find below code at head area within Blazor pages.

    <style>
                :root {
                    --logo: url(/images/logo/zimuceping.png) !important;
                    --logo-reverse: url(/images/logo/zimuceping.png) !important;
                }
            </style>
    
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    You can place the css code into both wwwroot/global-styles.css and blazor-global-styles.css files at the same time. On the blazor-server you need to override both blazor & razor pages

  • User Avatar
    0
    zhongfang created

    After I replaced Lepton with LeptonX, I can resolve the problem follow abp document.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 02, 2024, 12:35