oliverbooth.dev/OliverBooth/Pages/Contact/Blacklist.cshtml
Oliver Booth 6ec4103a3a
refactor: separate Markdig extensions from project
Also introduces .Common project to house common references and types
2024-05-05 02:18:20 +01:00

39 lines
1.2 KiB
Plaintext

@page
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using OliverBooth.Common.Data.Web
@using OliverBooth.Common.Services
@inject IContactService ContactService
@{
ViewData["Title"] = "Blacklist";
}
<main class="container">
<h1 class="display-4">Contact Blacklist</h1>
<p>
Below is a list of email addresses that have been blocked from contacting me. This list is public so that others
may also block these addresses if they wish. Any email address that contains an asterisk (*) is a wildcard,
meaning that any email address that matches the pattern will be blocked.
</p>
<p>
You can view this list in JSON format
<a asp-controller="FormattedBlacklist" asp-action="OnGet" asp-route-format="json">here</a>,
or in CSV format
<a asp-controller="FormattedBlacklist" asp-action="OnGet" asp-route-format="csv">here</a>.
</p>
<table class="table">
<tr>
<th>Name / Email</th>
<th>Reason</th>
</tr>
@foreach (IBlacklistEntry entry in ContactService.GetBlacklist())
{
<tr>
<td>@entry.Name &lt;@entry.EmailAddress&gt;</td>
<td>@entry.Reason</td>
</tr>
}
</table>
</main>