Add Templates

This commit is contained in:
Ccjcarkbla
2026-02-23 12:53:03 -05:00
parent 829a71ab5e
commit 637787d016
7 changed files with 344 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
@page "/errors/generic"
@model maintenance.Pages.Errors.GenericModel
@{
Layout = null;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MAX - System Error</title>
<link rel="stylesheet" href="~/css/max_error.css" />
</head>
<body>
<div class="header">MAX</div>
<div class="center-box-vertically" style="margin-bottom: -224px;"></div>
<div class="box">
<div class="title"><img src="~/favicon.ico" alt="" /><h1>System Error</h1></div>
<div class="description">
<h2>A system error has occurred. Please contact MAX Support.</h2>
</div>
<div class="support">
<h2>MAX Support:</h2>
<br />
<h3>Email: <a href="mailto:maxsupport@max.gov">maxsupport@max.gov</a></h3>
<h4><span>Available<br />&nbsp;</span> <span>8:00AM - 8:00PM Weekdays,<br />9:00AM - 6:00PM Weekends (2 hour response time)</span></h4>
<br />
<h3>Phone: 202-395-6860</h3>
<h4>Available 8:00AM - 6:30PM Weekdays</h4>
<br />
<h4>All hours in Eastern Time (ET)</h4>
</div>
<div class="code"><h4>(Error Code: eag)</h4></div>
</div>
</body>
</html>
+10
View File
@@ -0,0 +1,10 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace maintenance.Pages.Errors;
public sealed class GenericModel : PageModel
{
public void OnGet()
{
}
}
+64
View File
@@ -0,0 +1,64 @@
@page "/errors/template"
@model maintenance.Pages.Errors.TemplateModel
@{
Layout = null;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MAX - @Model.ErrorName</title>
<link rel="stylesheet" href="~/css/max_error.css" />
</head>
<body>
<div class="header">MAX</div>
<div class="center-box-vertically" style="margin-bottom: -325px;"></div>
<div class="box">
<div class="title"><img src="~/favicon.ico" alt="" /><h1>@Model.ErrorName</h1></div>
<div class="description">
@if (!string.IsNullOrWhiteSpace(Model.ShortDescription))
{
<h2>@Model.ShortDescription</h2>
}
<h2>@Model.Description</h2>
</div>
@if (Model.ShowInstructions)
{
<div class="instructions">
@if (!string.IsNullOrWhiteSpace(Model.InstructionsHeader))
{
<h2>@Model.InstructionsHeader</h2>
<br />
}
<h2>To correct this problem:</h2>
<h4>
<ol>
@foreach (var step in Model.InstructionSteps)
{
<li>@step</li>
}
<li><a href="javascript:location.reload(true)">Reload</a> this page</li>
</ol>
</h4>
<h3>If this does not solve the problem, please contact MAX Support for assistance.</h3>
</div>
}
@if (Model.ShowSupport)
{
<div class="support">
<h2>MAX Support:</h2>
<br />
<h3>Email: <a href="mailto:maxsupport@max.gov">maxsupport@max.gov</a></h3>
<h4><span>Available<br />&nbsp;</span> <span>8:00AM - 8:00PM Weekdays,<br />9:00AM - 6:00PM Weekends (2 hour response time)</span></h4>
<br />
<h3>Phone: 202-395-6860</h3>
<h4>Available 8:00AM - 6:30PM Weekdays</h4>
<br />
<h4>All hours in Eastern Time (ET)</h4>
</div>
}
<div class="code"><h4>(Error Code: @Model.ErrorCode)</h4></div>
</div>
</body>
</html>
+47
View File
@@ -0,0 +1,47 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace maintenance.Pages.Errors;
public sealed class TemplateModel : PageModel
{
[FromQuery(Name = "errorName")]
public string ErrorName { get; set; } = "Error Name";
[FromQuery(Name = "short")]
public string? ShortDescription { get; set; }
[FromQuery(Name = "desc")]
public string Description { get; set; } = "An error has occurred. Please contact MAX Support for assistance.";
[FromQuery(Name = "instructionsHeader")]
public string? InstructionsHeader { get; set; }
[FromQuery(Name = "steps")]
public string? StepsCsv { get; set; }
[FromQuery(Name = "showSupport")]
public bool ShowSupport { get; set; } = true;
[FromQuery(Name = "showInstructions")]
public bool ShowInstructions { get; set; } = true;
[FromQuery(Name = "code")]
public string ErrorCode { get; set; } = "eaX";
public IReadOnlyList<string> InstructionSteps { get; private set; } = new List<string>
{
"Change some setting"
};
public void OnGet()
{
if (!string.IsNullOrWhiteSpace(StepsCsv))
{
InstructionSteps = StepsCsv
.Split('|', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries)
.Where(x => !string.IsNullOrWhiteSpace(x))
.ToArray();
}
}
}
+37
View File
@@ -0,0 +1,37 @@
@page "/errors/unavailable"
@model maintenance.Pages.Errors.UnavailableModel
@{
Layout = null;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MAX - Application Unavailable</title>
<link rel="stylesheet" href="~/css/max_error.css" />
</head>
<body>
<div class="header">MAX</div>
<div class="center-box-vertically" style="margin-bottom: -232px;"></div>
<div class="box">
<div class="title"><img src="~/favicon.ico" alt="" /><h1>Application Unavailable</h1></div>
<div class="description">
<h2 style="font-size: 13px;">MAX applications may be down for scheduled maintenance <b>2AM-8AM Sunday</b> morning.</h2>
<h2 style="font-size: 13px;">If you are receiving this message at any other time, please contact MAX Support.</h2>
</div>
<div class="support">
<h2>MAX Support:</h2>
<br />
<h3>Email: <a href="mailto:maxsupport@max.gov">maxsupport@max.gov</a></h3>
<h4><span>Available<br />&nbsp;</span> <span>8:00AM - 8:00PM Weekdays,<br />9:00AM - 6:00PM Weekends (2 hour response time)</span></h4>
<br />
<h3>Phone: 202-395-6860</h3>
<h4>Available 8:00AM - 6:30PM Weekdays</h4>
<br />
<h4>All hours in Eastern Time (ET)</h4>
</div>
<div class="code"><h4>(Error Code: eau)</h4></div>
</div>
</body>
</html>
+10
View File
@@ -0,0 +1,10 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace maintenance.Pages.Errors;
public sealed class UnavailableModel : PageModel
{
public void OnGet()
{
}
}