Browse Source

fix(account): fixed user login link style

- Align the login link with the language switch bar
pull/1220/head
colin 10 months ago
parent
commit
90a4c17a7d
  1. 18
      aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Bundling/AccountBundles.cs
  2. 14
      aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Bundling/UserLoginLinkStyleContributor.cs
  3. 5
      aspnet-core/modules/account/LINGYUN.Abp.Account.Web/LINGYUN.Abp.Account.Web.csproj
  4. 8
      aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Modules/Account/Components/Toolbar/UserLoginLink/Default.cshtml
  5. 4
      aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Modules/_ViewImports.cshtml
  6. 3
      aspnet-core/modules/account/LINGYUN.Abp.Account.Web/wwwroot/styles/user-login-link/fix-style.css

18
aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Bundling/AccountBundles.cs

@ -0,0 +1,18 @@
namespace LINGYUN.Abp.Account.Web.Bundling;
public static class AccountBundles
{
public static class Scripts
{
public const string Global = "Abp.Account";
public const string ChangePassword = Global + ".ChangePassword";
}
public static class Styles
{
public const string Global = "Abp.Account";
public const string UserLoginLink = Global + ".UserLoginLink";
}
}

14
aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Bundling/UserLoginLinkStyleContributor.cs

@ -0,0 +1,14 @@
using System.Threading.Tasks;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace LINGYUN.Abp.Account.Web.Bundling;
public class UserLoginLinkStyleContributor : BundleContributor
{
public override Task ConfigureBundleAsync(BundleConfigurationContext context)
{
context.Files.Add("/styles/user-login-link/fix-style.css");
return Task.CompletedTask;
}
}

5
aspnet-core/modules/account/LINGYUN.Abp.Account.Web/LINGYUN.Abp.Account.Web.csproj

@ -38,7 +38,6 @@
<ItemGroup>
<PackageReference Include="Volo.Abp.Sms" />
<PackageReference Include="Volo.Abp.Account.Web" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" />
</ItemGroup>
<ItemGroup>
@ -48,4 +47,8 @@
<ProjectReference Include="..\LINGYUN.Abp.Account.Emailing\LINGYUN.Abp.Account.Emailing.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" />
</ItemGroup>
</Project>

8
aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Modules/Account/Components/Toolbar/UserLoginLink/Default.cshtml

@ -0,0 +1,8 @@
@using Localization.Resources.AbpUi
@using Microsoft.AspNetCore.Mvc.Localization
@using LINGYUN.Abp.Account.Web.Bundling;
@inject IHtmlLocalizer<AbpUiResource> L
<abp-style-bundle name="@AccountBundles.Styles.UserLoginLink" />
<a class="nav-link fix-margin" role="button" href="~/Account/Login">@L["Login"]</a>

4
aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Modules/_ViewImports.cshtml

@ -0,0 +1,4 @@
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling

3
aspnet-core/modules/account/LINGYUN.Abp.Account.Web/wwwroot/styles/user-login-link/fix-style.css

@ -0,0 +1,3 @@
.fix-margin {
margin: 10px 0;
}
Loading…
Cancel
Save