diff --git a/WebApp/Components/Features/Events/Index.razor b/WebApp/Components/Features/Events/Index.razor index 3eaf144..0530d49 100644 --- a/WebApp/Components/Features/Events/Index.razor +++ b/WebApp/Components/Features/Events/Index.razor @@ -2,16 +2,17 @@ @attribute [Authorize] @using Microsoft.EntityFrameworkCore @using WebApp.Models +@using WebApp.Components.Shared.Components @inject AppDbContext Context @inject IDialogService DialogService @inject ISnackbar Snackbar -Events - TSA Chapter Organizer - -Events - -Create New -Printable Descriptions + + + Create New + Printable Descriptions + + diff --git a/WebApp/Components/Features/Students/Index.razor b/WebApp/Components/Features/Students/Index.razor index 333cf6e..8f40949 100644 --- a/WebApp/Components/Features/Students/Index.razor +++ b/WebApp/Components/Features/Students/Index.razor @@ -2,17 +2,18 @@ @attribute [Authorize] @using Microsoft.EntityFrameworkCore @using WebApp.Models +@using WebApp.Components.Shared.Components @inject AppDbContext Context @inject IDialogService DialogService @inject ISnackbar Snackbar -Students - TSA Chapter Organizer - -Students - -Create New -Event Rankings -Registration + + + Create New + Event Rankings + Registration + + diff --git a/WebApp/Components/Features/Teams/Index.razor b/WebApp/Components/Features/Teams/Index.razor index fa355fd..f69c50e 100644 --- a/WebApp/Components/Features/Teams/Index.razor +++ b/WebApp/Components/Features/Teams/Index.razor @@ -1,18 +1,18 @@ @using Microsoft.EntityFrameworkCore +@using WebApp.Components.Shared.Components @page "/teams" @attribute [Authorize] @inject AppDbContext Context @inject IDialogService DialogService @inject ISnackbar Snackbar -TimeSlots - -Teams - -Create New -Assignment -Printout - + + + Create New + Assignment + Printout + + diff --git a/WebApp/Components/Shared/Components/PageHeader.razor b/WebApp/Components/Shared/Components/PageHeader.razor new file mode 100644 index 0000000..086091f --- /dev/null +++ b/WebApp/Components/Shared/Components/PageHeader.razor @@ -0,0 +1,126 @@ +@namespace WebApp.Components.Shared.Components +@using MudBlazor + +@GetPageTitle() + + + +@code { + // Required + [Parameter] + public string Title { get; set; } = string.Empty; + + // Optional - Basic + [Parameter] + public string? Subtitle { get; set; } + + [Parameter] + public string? Description { get; set; } + + [Parameter] + public string? Icon { get; set; } + + [Parameter] + public bool ShowDivider { get; set; } = true; + + // Optional - Navigation + [Parameter] + public List? BreadcrumbItems { get; set; } + + [Parameter] + public bool ShowBackButton { get; set; } = false; + + [Parameter] + public string? BackButtonUrl { get; set; } + + // Optional - Actions + [Parameter] + public RenderFragment? ActionButtons { get; set; } + + // Optional - Advanced + [Parameter] + public RenderFragment? TitleSuffix { get; set; } + + [Parameter] + public RenderFragment? HeaderContent { get; set; } + + private string GetPageTitle() + { + var baseTitle = Title; + if (!string.IsNullOrEmpty(Subtitle)) + { + baseTitle = $"{Title} {Subtitle}"; + } + + return $"{baseTitle} - TSA Chapter Organizer"; + } +} diff --git a/WebApp/wwwroot/app.css b/WebApp/wwwroot/app.css index 3af6ebb..4d2bebd 100644 --- a/WebApp/wwwroot/app.css +++ b/WebApp/wwwroot/app.css @@ -109,4 +109,13 @@ h1:focus { .pre-wrap-text { white-space: pre-wrap; } + +.page-header { + margin-bottom: 1.5rem; +} + +.page-header-actions { + display: flex; + gap: 0.5rem; + align-items: center; } \ No newline at end of file