Extracting common layout for Error Pages

This commit is contained in:
rockstardev 2021-01-24 13:33:34 -06:00
parent 1627c05224
commit ca25eedfbc
6 changed files with 78 additions and 172 deletions

View file

@ -1,39 +1,14 @@
@{
Layout = "_LayoutError";
ViewData["Title"] = "404 - Page not found";
}
<div class="row">
<div class="col-12 col-head" style="justify-content:center; flex-direction: row; display:flex; flex-direction:row; text-align:center;">
<a asp-controller="Home" asp-action="Index">
<img src="~/img/btcpay-logo.svg" alt="BTCPay Server" class="head-logo" height="70" asp-append-version="true" />
</a>
<h1 class="text-uppercase mt-3 ml-4">@ViewData["Title"]</h1>
</div>
</div>
<center>
<hr class="primary" />
</center>
<p class="lead text-center">
This is like searching for a person more beautiful than <a href="https://twitter.com/NicolasDorier" target="_blank">Nicolas Dorier</a>.
<br /><br />
<a href="https://twitter.com/NicolasDorier" target="_blank">
<img src="~/img/errorpages/404_nicolas.jpg" alt="Nicolas Dorier beauty" title="Slowly stroke the image" asp-append-version="true" />
</a>
<br /><br />
It doesn't exist.
<br /><br />
You can always try <a href="/">navigating back to home</a>.
</p>
<center>
<hr class="primary" />
</center>
<div class="row justify-content-center mt-5">
<div class="col">
<partial name="_BTCPaySupporters" />
</div>
</div>
This is like searching for a person more beautiful than <a href="https://twitter.com/NicolasDorier" target="_blank">Nicolas Dorier</a>.
<br /><br />
<a href="https://twitter.com/NicolasDorier" target="_blank">
<img src="~/img/errorpages/404_nicolas.jpg" alt="Nicolas Dorier beauty" title="Slowly stroke the image" asp-append-version="true" />
</a>
<br /><br />
It doesn't exist.
<br /><br />
You can always try <a href="/">navigating back to home</a>.

View file

@ -1,37 +1,12 @@
@{
Layout = "_LayoutError";
ViewData["Title"] = "417 - Expectation Failed";
}
<div class="row">
<div class="col-12 col-head" style="justify-content:center; flex-direction: row; display:flex; flex-direction:row; text-align:center;">
<a asp-controller="Home" asp-action="Index">
<img src="~/img/btcpay-logo.svg" alt="BTCPay Server" class="head-logo" height="70" asp-append-version="true" />
</a>
<h1 class="text-uppercase mt-3 ml-4">@ViewData["Title"]</h1>
</div>
</div>
<center>
<hr class="primary" />
</center>
<p class="lead text-center">
You've unfortunately failed expectations of manager <a href="https://twitter.com/pavlenex" target="_blank">Pavlenex</a>. Poor you.
<br /><br />
<a href="https://twitter.com/pavlenex" target="_blank">
<img src="~/img/errorpages/417_pavlenex.png" alt="Pavlenex avatar" title="Pavlenex fighting the system, while building better systems" asp-append-version="true" />
</a>
<br /><br />
Check your request `Except` header and do better.
</p>
<center>
<hr class="primary" />
</center>
<div class="row justify-content-center mt-5">
<div class="col">
<partial name="_BTCPaySupporters" />
</div>
</div>
You've unfortunately failed expectations of manager <a href="https://twitter.com/pavlenex" target="_blank">Pavlenex</a>. Poor you.
<br /><br />
<a href="https://twitter.com/pavlenex" target="_blank">
<img src="~/img/errorpages/417_pavlenex.png" alt="Pavlenex avatar" title="Pavlenex fighting the system, while building better systems" asp-append-version="true" />
</a>
<br /><br />
Check your request `Except` header and do better.

View file

@ -1,39 +1,14 @@
@{
Layout = "_LayoutError";
ViewData["Title"] = "429 - Too Many Requests";
}
<div class="row">
<div class="col-12 col-head" style="justify-content:center; flex-direction: row; display:flex; flex-direction:row; text-align:center;">
<a asp-controller="Home" asp-action="Index">
<img src="~/img/btcpay-logo.svg" alt="BTCPay Server" class="head-logo" height="70" asp-append-version="true" />
</a>
<h1 class="text-uppercase mt-3 ml-4">@ViewData["Title"]</h1>
</div>
</div>
<center>
<hr class="primary" />
</center>
<p class="lead text-center">
Please send requests slower. Or face the wrath of <a href="https://twitter.com/r0ckstardev" target="_blank">Vin Diesel</a>.
<br /><br />
<a href="https://twitter.com/r0ckstardev" target="_blank">
<img src="~/img/errorpages/429_rockstardev.jpg" alt="Vin is angry because you caused 429" title="Move away that cursor" asp-append-version="true" />
</a>
<br /><br />
You sure you want to risk that?
<br /><br />
Slowly <a href="/">navigate back to home</a>.
</p>
<center>
<hr class="primary" />
</center>
<div class="row justify-content-center mt-5">
<div class="col">
<partial name="_BTCPaySupporters" />
</div>
</div>
Please send requests slower. Or face the wrath of <a href="https://twitter.com/r0ckstardev" target="_blank">Vin Diesel</a>.
<br /><br />
<a href="https://twitter.com/r0ckstardev" target="_blank">
<img src="~/img/errorpages/429_rockstardev.jpg" alt="Vin is angry because you caused 429" title="Move away that cursor" asp-append-version="true" />
</a>
<br /><br />
You sure you want to risk that?
<br /><br />
Slowly <a href="/">navigate back to home</a>.

View file

@ -1,39 +1,14 @@
@{
Layout = "_LayoutError";
ViewData["Title"] = "500 - Internal Server Error";
}
<div class="row">
<div class="col-12 col-head" style="justify-content:center; flex-direction: row; display:flex; flex-direction:row; text-align:center;">
<a asp-controller="Home" asp-action="Index">
<img src="~/img/btcpay-logo.svg" alt="BTCPay Server" class="head-logo" height="70" asp-append-version="true" />
</a>
<h1 class="text-uppercase mt-3 ml-4">@ViewData["Title"]</h1>
</div>
</div>
<center>
<hr class="primary" />
</center>
<p class="lead text-center">
Whoops, something really went wrong! <a href="https://twitter.com/mrkukks">Mr Kukks</a> is so sorry.
<br /><br />
<a href="https://twitter.com/mrkukks" target="_blank">
<img src="~/img/errorpages/500_mrkukks.jpg" alt="Mr Kukks puppy eyes" title="The most innocent look you'll ever see" asp-append-version="true" />
</a>
<br /><br />
Consult server log and consider submitting issue on BTCPayServer GitHub.
<br /><br />
<a href="/">Navigate back to home</a>.
</p>
<center>
<hr class="primary" />
</center>
<div class="row justify-content-center mt-5">
<div class="col">
<partial name="_BTCPaySupporters" />
</div>
</div>
Whoops, something really went wrong! <a href="https://twitter.com/mrkukks">Mr Kukks</a> is so sorry.
<br /><br />
<a href="https://twitter.com/mrkukks" target="_blank">
<img src="~/img/errorpages/500_mrkukks.jpg" alt="Mr Kukks puppy eyes" title="The most innocent look you'll ever see" asp-append-version="true" />
</a>
<br /><br />
Consult server log and consider submitting issue on BTCPayServer GitHub.
<br /><br />
<a href="/">Navigate back to home</a>.

View file

@ -1,38 +1,13 @@
@{
Layout = "_LayoutError";
ViewData["Title"] = "502 - Bad Gateway";
}
<div class="row">
<div class="col-12 col-head d-flex flex-row justify-content-center text-center">
<a asp-controller="Home" asp-action="Index">
<img src="~/img/btcpay-logo.svg" alt="BTCPay Server" class="head-logo" height="70" asp-append-version="true" />
</a>
<h1 class="text-uppercase mt-3 ml-4">@ViewData["Title"]</h1>
</div>
</div>
<center>
<hr class="primary" />
</center>
<p class="lead text-center">
The life is all about finding the right Gateways.<br />
Unfortunately, this time you've found a bad one.
<br /><br />
<a href="https://twitter.com/milessuter" target="_blank">
<img src="~/img/errorpages/502_milessuter.jpg" alt="Miles obfuscated profile pic" title="But full name is not obfuscated" asp-append-version="true" />
</a>
<br /><br />
Maybe <a href="https://twitter.com/milessuter">Gateway Tzar Miles</a> can help you out?
</p>
<center>
<hr class="primary" />
</center>
<div class="row justify-content-center mt-5">
<div class="col">
<partial name="_BTCPaySupporters" />
</div>
</div>
The life is all about finding the right Gateways.<br />
Unfortunately, this time you've found a bad one.
<br /><br />
<a href="https://twitter.com/milessuter" target="_blank">
<img src="~/img/errorpages/502_milessuter.jpg" alt="Miles obfuscated profile pic" title="But full name is not obfuscated" asp-append-version="true" />
</a>
<br /><br />
Maybe <a href="https://twitter.com/milessuter">Gateway Tzar Miles</a> can help you out?

View file

@ -0,0 +1,31 @@
@{
Layout = "_LayoutSimple";
}
<div class="row">
<div class="col-12 col-head" style="justify-content:center; flex-direction: row; display:flex; flex-direction:row; text-align:center;">
<a asp-controller="Home" asp-action="Index">
<img src="~/img/btcpay-logo.svg" alt="BTCPay Server" class="head-logo" height="70" asp-append-version="true" />
</a>
<h1 class="text-uppercase mt-3 ml-4">@ViewData["Title"]</h1>
</div>
</div>
<center>
<hr class="primary" />
</center>
<p class="lead text-center">
@RenderBody()
</p>
<center>
<hr class="primary" />
</center>
<div class="row justify-content-center mt-5">
<div class="col">
<partial name="_BTCPaySupporters" />
</div>
</div>