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()
{
}
}
+140
View File
@@ -0,0 +1,140 @@
@charset "UTF-8";
body {
font-family: Arial, sans-serif;
font-size: 12px;
}
h1, h2, h3, h4 {
font-weight: normal;
font-size: inherit;
padding: 0;
margin: 0;
}
.header {
margin: auto;
max-width: 960px;
height: 64px;
display: flex;
align-items: center;
padding: 0 16px;
box-sizing: border-box;
border-bottom: 1px solid #d6d6d6;
color: #333;
font-size: 22px;
}
html, body {
height: 100%;
margin: 0;
}
.center-box-vertically {
height: 50%;
float: left;
width: 100%;
}
.box {
clear: both;
margin: auto;
width: 600px;
background-color: #ebebeb;
border: 1px solid #c2c2c2;
border-radius: 5px;
box-shadow: 0 4px 8px #888;
text-align: left;
}
body {
text-align: center;
}
.title {
overflow: hidden;
width: 560px;
padding: 20px;
border-bottom: 1px solid #cccccc;
margin-bottom: 20px;
}
.title img {
float: left;
margin-right: 15px;
width: 40px;
height: 40px;
}
.title h1 {
font-size: 30px;
color: #d03a00;
margin-top: 2px;
}
.description {
background-color: #d85635;
border: 1px solid #7d0000;
background: linear-gradient(#e97d71, #ca3604);
border-radius: 5px;
padding: 8px;
text-align: center;
margin: 20px;
}
.description h2 {
font-size: 16px;
color: white;
line-height: 150%;
}
.instructions,
.support {
background-color: #d7d7d7;
background: linear-gradient(#d7d7d7, #ebebeb);
border-radius: 5px;
padding: 10px;
margin: 20px;
}
.instructions h2,
.support h2 {
font-size: 21px;
}
.instructions h3,
.support h3 {
font-size: 15px;
}
.instructions h4,
.support h4 {
font-size: 13px;
color: #505050;
}
.support span {
display: inline-block;
}
.code h4 {
text-align: right;
font-size: 13px;
color: #505050;
margin: 0 20px 20px 0;
}
@media (max-width: 700px) {
.box {
width: calc(100% - 20px);
margin: 0 10px;
}
.title {
width: auto;
}
.title h1 {
font-size: 24px;
}
}