ErrorView und ErrorViewModel hinzugefügt; ContactLink als Singleton konfiguriert, serialisiert aus appSettings
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
@model ErrorViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Error";
|
||||
}
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
|
||||
@if (Model.ShowRequestId)
|
||||
{
|
||||
<p>
|
||||
<strong>Request ID:</strong> <code>@Model.RequestId</code>
|
||||
</p>
|
||||
}
|
||||
|
||||
<h3>Development Mode</h3>
|
||||
<p>
|
||||
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
|
||||
</p>
|
||||
<p>
|
||||
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
|
||||
It can result in displaying sensitive information from exceptions to end users.
|
||||
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
|
||||
and restarting the app.
|
||||
</p>
|
||||
69
EnvelopeGenerator.Web/Views/Shared/_Error.cshtml
Normal file
69
EnvelopeGenerator.Web/Views/Shared/_Error.cshtml
Normal file
@@ -0,0 +1,69 @@
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
@model ErrorViewModel
|
||||
@{
|
||||
var errorModel = Model ?? new ErrorViewModel();
|
||||
}
|
||||
@inject ContactLink _contactLink
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<link rel="stylesheet" href="~/css/error-space.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="moon"></div>
|
||||
<div class="moon__crater moon__crater1"></div>
|
||||
<div class="moon__crater moon__crater2"></div>
|
||||
<div class="moon__crater moon__crater3"></div>
|
||||
|
||||
<div class="star star1"></div>
|
||||
<div class="star star2"></div>
|
||||
<div class="star star3"></div>
|
||||
<div class="star star4"></div>
|
||||
<div class="star star5"></div>
|
||||
|
||||
<div class="error">
|
||||
<div class="error__title">@errorModel.Title</div>
|
||||
<div class="error__subtitle">@errorModel.Subtitle</div>
|
||||
<div class="error__description">@errorModel.Body</div>
|
||||
<a href="@_contactLink.Href" class="error__button" target="@_contactLink.Target" hreflang="@_contactLink.HrefLang" title="@_contactLink.Title">@_contactLink.Label</a>
|
||||
</div>
|
||||
|
||||
<div class="astronaut">
|
||||
<div class="astronaut__backpack"></div>
|
||||
<div class="astronaut__body"></div>
|
||||
<div class="astronaut__body__chest"></div>
|
||||
<div class="astronaut__arm-left1"></div>
|
||||
<div class="astronaut__arm-left2"></div>
|
||||
<div class="astronaut__arm-right1"></div>
|
||||
<div class="astronaut__arm-right2"></div>
|
||||
<div class="astronaut__arm-thumb-left"></div>
|
||||
<div class="astronaut__arm-thumb-right"></div>
|
||||
<div class="astronaut__leg-left"></div>
|
||||
<div class="astronaut__leg-right"></div>
|
||||
<div class="astronaut__foot-left"></div>
|
||||
<div class="astronaut__foot-right"></div>
|
||||
<div class="astronaut__wrist-left"></div>
|
||||
<div class="astronaut__wrist-right"></div>
|
||||
|
||||
<div class="astronaut__cord">
|
||||
<canvas id="cord" height="500px" width="500px"></canvas>
|
||||
</div>
|
||||
|
||||
<div class="astronaut__head">
|
||||
<canvas id="visor" width="60px" height="60px"></canvas>
|
||||
<div class="astronaut__head-visor-flare1"></div>
|
||||
<div class="astronaut__head-visor-flare2"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="~/js/error-space.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user