Skip to content

Commit

Permalink
Merge pull request #19279 from abpframework/8.1-blazor-pagetitle
Browse files Browse the repository at this point in the history
Blazor Page Title
  • Loading branch information
oykuermann committed Mar 13, 2024
2 parents 38bf025 + 5478f6d commit 3780659
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
@using Blazorise
@using Microsoft.Extensions.Options
@using Microsoft.AspNetCore.Components.Web
@using Volo.Abp.Ui.Branding

@inject IOptions<PageHeaderOptions> Options
@inject IBrandingProvider BrandingProvider

<Row Class="entry-row">

@if (PageLayout.Title.IsNullOrEmpty())
{
<PageTitle>@BrandingProvider.AppName</PageTitle>
}
else
{
<PageTitle>@PageLayout.Title | @BrandingProvider.AppName</PageTitle>
}

@if(Options.Value.RenderPageTitle)
{
{
<Column ColumnSize="ColumnSize.IsAuto">
<h1 class="content-header-title">@PageLayout.Title</h1>
</Column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<base href="~/" />

<abp-style-bundle name="@BlazorLeptonXLiteThemeBundles.Styles.Global"/>
<HeadOutlet />
</head>
<body class="abp-application-layout bg-light @rtl">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<base href="~/" />

<abp-style-bundle name="@BlazorLeptonXLiteThemeBundles.Styles.Global"/>
<HeadOutlet />
</head>
<body class="abp-application-layout bg-light @rtl">

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Blazorise.Bootstrap5;
using Blazorise.Icons.FontAwesome;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using MyCompanyName.MyProjectName.Menus;
using MyCompanyName.MyProjectName;
Expand Down Expand Up @@ -121,7 +122,7 @@ private static void ConfigureAuthentication(WebAssemblyHostBuilder builder)
private static void ConfigureUI(WebAssemblyHostBuilder builder)
{
builder.RootComponents.Add<App>("#ApplicationContainer");

builder.RootComponents.Add<HeadOutlet>("head::after");
}

private static void ConfigureHttpClient(ServiceConfigurationContext context, IWebAssemblyHostEnvironment environment)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@using Volo.Abp.MultiTenancy
@inherits MyProjectNameComponentBase
@inject AuthenticationStateProvider AuthenticationStateProvider

<div class="container">
<div class="p-5 text-center">
<Badge Color="Color.Success" class="mb-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<base href="~/" />

<abp-style-bundle name="@BlazorLeptonXLiteThemeBundles.Styles.Global"/>
<HeadOutlet />
</head>
<body class="abp-application-layout bg-light @rtl">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
@using Volo.Abp.MultiTenancy
@inherits MyProjectNameComponentBase
@inject AuthenticationStateProvider AuthenticationStateProvider

<PageTitle>Index</PageTitle>

<div class="container">
<div class="p-5 text-center">
<Badge Color="Color.Success" class="mb-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<base href="~/" />

<abp-style-bundle name="@BlazorLeptonXLiteThemeBundles.Styles.Global" />
<HeadOutlet />
</head>
<body class="abp-application-layout bg-light @rtl">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Net.Http;
using Blazorise.Bootstrap5;
using Blazorise.Icons.FontAwesome;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand Down Expand Up @@ -86,7 +87,7 @@ private static void ConfigureAuthentication(WebAssemblyHostBuilder builder)
private static void ConfigureUI(WebAssemblyHostBuilder builder)
{
builder.RootComponents.Add<App>("#ApplicationContainer");

builder.RootComponents.Add<HeadOutlet>("head::after");
}

private static void ConfigureHttpClient(ServiceConfigurationContext context, IWebAssemblyHostEnvironment environment)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@using Volo.Abp.MultiTenancy
@inherits MyProjectNameComponentBase
@inject AuthenticationStateProvider AuthenticationStateProvider

<div class="container">
<div class="p-5 text-center">
<Badge Color="Color.Success" class="mb-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Net.Http;
using Blazorise.Bootstrap5;
using Blazorise.Icons.FontAwesome;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand Down Expand Up @@ -80,6 +81,7 @@ private static void ConfigureAuthentication(WebAssemblyHostBuilder builder)
private static void ConfigureUI(WebAssemblyHostBuilder builder)
{
builder.RootComponents.Add<App>("#ApplicationContainer");
builder.RootComponents.Add<HeadOutlet>("head::after");
}

private static void ConfigureHttpClient(ServiceConfigurationContext context, IWebAssemblyHostEnvironment environment)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<base href="~/" />

<abp-style-bundle name="@BlazorBasicThemeBundles.Styles.Global" />
<HeadOutlet />
</head>
<body class="abp-application-layout bg-light @rtl">
<component type="typeof(App)" render-mode="Server" />
Expand Down

0 comments on commit 3780659

Please sign in to comment.