c1b11603e8
Build and Push Docker Image / build-and-push (push) Successful in 1m14s
Implemented a Blazor Web App (.NET 8) for a public-by-link birth registry platform, following project guidelines. Added domain entities, EF Core context, and Blazor components for authentication, registry management, and public views. Introduced core services for registries, theming, user context, platform owner bootstrapping, and SMTP email. Included static assets (Bootstrap, favicon), launch settings, Dockerfile, CI workflow, and deployment configs. Added bootstrap.min.css.map for improved CSS debugging.
87 lines
3.3 KiB
Plaintext
87 lines
3.3 KiB
Plaintext
@page "/"
|
|
|
|
<PageTitle>Birth Registry</PageTitle>
|
|
|
|
<h1>Birth Registry</h1>
|
|
|
|
<AuthorizeView>
|
|
<Authorized Context="authState">
|
|
<div class="mb-4">
|
|
<h2>Create your registry</h2>
|
|
<EditForm Model="Model" OnValidSubmit="CreateRegistryAsync" Context="formContext" FormName="create-registry-form">
|
|
<DataAnnotationsValidator />
|
|
<div class="row g-3">
|
|
<div class="col-md-5">
|
|
<label class="form-label">Title</label>
|
|
<InputText class="form-control" @bind-Value="Model.Title" />
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label class="form-label">Type</label>
|
|
<InputSelect class="form-select" @bind-Value="Model.RegistryType">
|
|
<option value="@BirthList.Domain.Entities.RegistryType.Birth">Birth</option>
|
|
<option value="@BirthList.Domain.Entities.RegistryType.Wedding">Wedding</option>
|
|
<option value="@BirthList.Domain.Entities.RegistryType.Birthday">Birthday</option>
|
|
</InputSelect>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<label class="form-label">Theme</label>
|
|
<InputSelect class="form-select" @bind-Value="Model.ThemeKey">
|
|
<option value="default">Default</option>
|
|
<option value="soft">Soft</option>
|
|
<option value="modern">Modern</option>
|
|
</InputSelect>
|
|
</div>
|
|
<div class="col-md-2 d-flex align-items-end">
|
|
<button class="btn btn-primary w-100" type="submit">Create</button>
|
|
</div>
|
|
</div>
|
|
</EditForm>
|
|
@if (!string.IsNullOrWhiteSpace(ErrorMessage))
|
|
{
|
|
<div class="alert alert-danger mt-3">@ErrorMessage</div>
|
|
}
|
|
</div>
|
|
|
|
<div class="mb-4">
|
|
<h2>Registries you manage</h2>
|
|
@if (MyRegistries.Count == 0)
|
|
{
|
|
<p>No registries yet.</p>
|
|
}
|
|
else
|
|
{
|
|
<ul>
|
|
@foreach (var registry in MyRegistries)
|
|
{
|
|
<li>
|
|
<a href="/registry/@registry.PublicLinkCode">@registry.Title</a>
|
|
|
|
|
<a href="/registry/@registry.Id/admin">Admin</a>
|
|
</li>
|
|
}
|
|
</ul>
|
|
}
|
|
</div>
|
|
|
|
<div>
|
|
<h2>Visited registries</h2>
|
|
@if (VisitedRegistries.Count == 0)
|
|
{
|
|
<p>No visited registries yet.</p>
|
|
}
|
|
else
|
|
{
|
|
<ul>
|
|
@foreach (var registry in VisitedRegistries)
|
|
{
|
|
<li><a href="/registry/@registry.PublicLinkCode">@registry.Title</a></li>
|
|
}
|
|
</ul>
|
|
}
|
|
</div>
|
|
</Authorized>
|
|
<NotAuthorized>
|
|
<p>Please <a href="Account/Login">log in</a> to create and manage registries.</p>
|
|
</NotAuthorized>
|
|
</AuthorizeView>
|