From ca25eedfbce478b1a4f5d878c050ccec4c87d710 Mon Sep 17 00:00:00 2001 From: rockstardev Date: Sun, 24 Jan 2021 13:33:34 -0600 Subject: [PATCH] Extracting common layout for Error Pages --- BTCPayServer/Views/Error/404.cshtml | 45 +++++--------------- BTCPayServer/Views/Error/417.cshtml | 41 ++++-------------- BTCPayServer/Views/Error/429.cshtml | 45 +++++--------------- BTCPayServer/Views/Error/500.cshtml | 45 +++++--------------- BTCPayServer/Views/Error/502.cshtml | 43 ++++--------------- BTCPayServer/Views/Error/_LayoutError.cshtml | 31 ++++++++++++++ 6 files changed, 78 insertions(+), 172 deletions(-) create mode 100644 BTCPayServer/Views/Error/_LayoutError.cshtml diff --git a/BTCPayServer/Views/Error/404.cshtml b/BTCPayServer/Views/Error/404.cshtml index 5d4d9d82b..fa3499a04 100644 --- a/BTCPayServer/Views/Error/404.cshtml +++ b/BTCPayServer/Views/Error/404.cshtml @@ -1,39 +1,14 @@ @{ + Layout = "_LayoutError"; ViewData["Title"] = "404 - Page not found"; } -
-
- - - - -

@ViewData["Title"]

-
-
- -
-
-
- -

- This is like searching for a person more beautiful than Nicolas Dorier. -

- - Nicolas Dorier beauty - -

- It doesn't exist. -

- You can always try navigating back to home. -

- -
-
-
- -
-
- -
-
+This is like searching for a person more beautiful than Nicolas Dorier. +

+ + Nicolas Dorier beauty + +

+It doesn't exist. +

+You can always try navigating back to home. diff --git a/BTCPayServer/Views/Error/417.cshtml b/BTCPayServer/Views/Error/417.cshtml index e800c83cc..a225207fa 100644 --- a/BTCPayServer/Views/Error/417.cshtml +++ b/BTCPayServer/Views/Error/417.cshtml @@ -1,37 +1,12 @@ @{ + Layout = "_LayoutError"; ViewData["Title"] = "417 - Expectation Failed"; } -
-
- - - - -

@ViewData["Title"]

-
-
- -
-
-
- -

- You've unfortunately failed expectations of manager Pavlenex. Poor you. -

- - Pavlenex avatar - -

- Check your request `Except` header and do better. -

- -
-
-
- -
-
- -
-
+You've unfortunately failed expectations of manager Pavlenex. Poor you. +

+ + Pavlenex avatar + +

+Check your request `Except` header and do better. diff --git a/BTCPayServer/Views/Error/429.cshtml b/BTCPayServer/Views/Error/429.cshtml index 24205a7dd..ca9f3850c 100644 --- a/BTCPayServer/Views/Error/429.cshtml +++ b/BTCPayServer/Views/Error/429.cshtml @@ -1,39 +1,14 @@ @{ + Layout = "_LayoutError"; ViewData["Title"] = "429 - Too Many Requests"; } -
-
- - - - -

@ViewData["Title"]

-
-
- -
-
-
- -

- Please send requests slower. Or face the wrath of Vin Diesel. -

- - Vin is angry because you caused 429 - -

- You sure you want to risk that? -

- Slowly navigate back to home. -

- -
-
-
- -
-
- -
-
+Please send requests slower. Or face the wrath of Vin Diesel. +

+ + Vin is angry because you caused 429 + +

+You sure you want to risk that? +

+Slowly navigate back to home. diff --git a/BTCPayServer/Views/Error/500.cshtml b/BTCPayServer/Views/Error/500.cshtml index 4a6897838..151ecae12 100644 --- a/BTCPayServer/Views/Error/500.cshtml +++ b/BTCPayServer/Views/Error/500.cshtml @@ -1,39 +1,14 @@ @{ + Layout = "_LayoutError"; ViewData["Title"] = "500 - Internal Server Error"; } -
-
- - - - -

@ViewData["Title"]

-
-
- -
-
-
- -

- Whoops, something really went wrong! Mr Kukks is so sorry. -

- - Mr Kukks puppy eyes - -

- Consult server log and consider submitting issue on BTCPayServer GitHub. -

- Navigate back to home. -

- -
-
-
- -
-
- -
-
+Whoops, something really went wrong! Mr Kukks is so sorry. +

+ + Mr Kukks puppy eyes + +

+Consult server log and consider submitting issue on BTCPayServer GitHub. +

+Navigate back to home. diff --git a/BTCPayServer/Views/Error/502.cshtml b/BTCPayServer/Views/Error/502.cshtml index a12e26111..7095e07d7 100644 --- a/BTCPayServer/Views/Error/502.cshtml +++ b/BTCPayServer/Views/Error/502.cshtml @@ -1,38 +1,13 @@ @{ + Layout = "_LayoutError"; ViewData["Title"] = "502 - Bad Gateway"; } -
-
- - - - -

@ViewData["Title"]

-
-
- -
-
-
- -

- The life is all about finding the right Gateways.
- Unfortunately, this time you've found a bad one. -

- - Miles obfuscated profile pic - -

- Maybe Gateway Tzar Miles can help you out? -

- -
-
-
- -
-
- -
-
+The life is all about finding the right Gateways.
+Unfortunately, this time you've found a bad one. +

+ + Miles obfuscated profile pic + +

+Maybe Gateway Tzar Miles can help you out? diff --git a/BTCPayServer/Views/Error/_LayoutError.cshtml b/BTCPayServer/Views/Error/_LayoutError.cshtml new file mode 100644 index 000000000..a85a784f4 --- /dev/null +++ b/BTCPayServer/Views/Error/_LayoutError.cshtml @@ -0,0 +1,31 @@ +@{ + Layout = "_LayoutSimple"; +} + +
+
+ + + + +

@ViewData["Title"]

+
+
+ +
+
+
+ +

+ @RenderBody() +

+ +
+
+
+ +
+
+ +
+