From 637787d0169317fe5101d0cf42c4a03dba16efca Mon Sep 17 00:00:00 2001 From: Ccjcarkbla Date: Mon, 23 Feb 2026 12:53:03 -0500 Subject: [PATCH] Add Templates --- Pages/Errors/Generic.cshtml | 36 ++++++++ Pages/Errors/Generic.cshtml.cs | 10 +++ Pages/Errors/Template.cshtml | 64 +++++++++++++ Pages/Errors/Template.cshtml.cs | 47 ++++++++++ Pages/Errors/Unavailable.cshtml | 37 ++++++++ Pages/Errors/Unavailable.cshtml.cs | 10 +++ wwwroot/css/max_error.css | 140 +++++++++++++++++++++++++++++ 7 files changed, 344 insertions(+) create mode 100644 Pages/Errors/Generic.cshtml create mode 100644 Pages/Errors/Generic.cshtml.cs create mode 100644 Pages/Errors/Template.cshtml create mode 100644 Pages/Errors/Template.cshtml.cs create mode 100644 Pages/Errors/Unavailable.cshtml create mode 100644 Pages/Errors/Unavailable.cshtml.cs create mode 100644 wwwroot/css/max_error.css diff --git a/Pages/Errors/Generic.cshtml b/Pages/Errors/Generic.cshtml new file mode 100644 index 0000000..faccd29 --- /dev/null +++ b/Pages/Errors/Generic.cshtml @@ -0,0 +1,36 @@ +@page "/errors/generic" +@model maintenance.Pages.Errors.GenericModel +@{ + Layout = null; +} + + + + + + MAX - System Error + + + +
MAX
+
+
+

System Error

+
+

A system error has occurred. Please contact MAX Support.

+
+
+

MAX Support:

+
+

Email: maxsupport@max.gov

+

Available
 
8:00AM - 8:00PM Weekdays,
9:00AM - 6:00PM Weekends (2 hour response time)

+
+

Phone: 202-395-6860

+

Available 8:00AM - 6:30PM Weekdays

+
+

All hours in Eastern Time (ET)

+
+

(Error Code: eag)

+
+ + diff --git a/Pages/Errors/Generic.cshtml.cs b/Pages/Errors/Generic.cshtml.cs new file mode 100644 index 0000000..eae36e8 --- /dev/null +++ b/Pages/Errors/Generic.cshtml.cs @@ -0,0 +1,10 @@ +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace maintenance.Pages.Errors; + +public sealed class GenericModel : PageModel +{ + public void OnGet() + { + } +} diff --git a/Pages/Errors/Template.cshtml b/Pages/Errors/Template.cshtml new file mode 100644 index 0000000..dd624e9 --- /dev/null +++ b/Pages/Errors/Template.cshtml @@ -0,0 +1,64 @@ +@page "/errors/template" +@model maintenance.Pages.Errors.TemplateModel +@{ + Layout = null; +} + + + + + + MAX - @Model.ErrorName + + + +
MAX
+
+
+

@Model.ErrorName

+
+ @if (!string.IsNullOrWhiteSpace(Model.ShortDescription)) + { +

@Model.ShortDescription

+ } +

@Model.Description

+
+ @if (Model.ShowInstructions) + { +
+ @if (!string.IsNullOrWhiteSpace(Model.InstructionsHeader)) + { +

@Model.InstructionsHeader

+
+ } +

To correct this problem:

+

+
    + @foreach (var step in Model.InstructionSteps) + { +
  1. @step
  2. + } +
  3. Reload this page
  4. +
+

+

If this does not solve the problem, please contact MAX Support for assistance.

+
+ } + @if (Model.ShowSupport) + { +
+

MAX Support:

+
+

Email: maxsupport@max.gov

+

Available
 
8:00AM - 8:00PM Weekdays,
9:00AM - 6:00PM Weekends (2 hour response time)

+
+

Phone: 202-395-6860

+

Available 8:00AM - 6:30PM Weekdays

+
+

All hours in Eastern Time (ET)

+
+ } +

(Error Code: @Model.ErrorCode)

+
+ + diff --git a/Pages/Errors/Template.cshtml.cs b/Pages/Errors/Template.cshtml.cs new file mode 100644 index 0000000..4d91a52 --- /dev/null +++ b/Pages/Errors/Template.cshtml.cs @@ -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 InstructionSteps { get; private set; } = new List + { + "Change some setting" + }; + + public void OnGet() + { + if (!string.IsNullOrWhiteSpace(StepsCsv)) + { + InstructionSteps = StepsCsv + .Split('|', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries) + .Where(x => !string.IsNullOrWhiteSpace(x)) + .ToArray(); + } + } +} diff --git a/Pages/Errors/Unavailable.cshtml b/Pages/Errors/Unavailable.cshtml new file mode 100644 index 0000000..e4c38ed --- /dev/null +++ b/Pages/Errors/Unavailable.cshtml @@ -0,0 +1,37 @@ +@page "/errors/unavailable" +@model maintenance.Pages.Errors.UnavailableModel +@{ + Layout = null; +} + + + + + + MAX - Application Unavailable + + + +
MAX
+
+
+

Application Unavailable

+
+

MAX applications may be down for scheduled maintenance 2AM-8AM Sunday morning.

+

If you are receiving this message at any other time, please contact MAX Support.

+
+
+

MAX Support:

+
+

Email: maxsupport@max.gov

+

Available
 
8:00AM - 8:00PM Weekdays,
9:00AM - 6:00PM Weekends (2 hour response time)

+
+

Phone: 202-395-6860

+

Available 8:00AM - 6:30PM Weekdays

+
+

All hours in Eastern Time (ET)

+
+

(Error Code: eau)

+
+ + diff --git a/Pages/Errors/Unavailable.cshtml.cs b/Pages/Errors/Unavailable.cshtml.cs new file mode 100644 index 0000000..4dfb271 --- /dev/null +++ b/Pages/Errors/Unavailable.cshtml.cs @@ -0,0 +1,10 @@ +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace maintenance.Pages.Errors; + +public sealed class UnavailableModel : PageModel +{ + public void OnGet() + { + } +} diff --git a/wwwroot/css/max_error.css b/wwwroot/css/max_error.css new file mode 100644 index 0000000..b6f2f6a --- /dev/null +++ b/wwwroot/css/max_error.css @@ -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; + } +}