From 924fb17927d4b1784370e5483e999b1d66e53dd9 Mon Sep 17 00:00:00 2001 From: David Katrinka Date: Sun, 6 Jul 2025 13:48:20 +0200 Subject: [PATCH] TIST-45: added custom error page --- apps/Index/Templates/error.php | 31 ++++++++++++++++++------------- assets/css/style.css | 21 +++++++++++++++++++++ urls.php | 3 ++- 3 files changed, 41 insertions(+), 14 deletions(-) diff --git a/apps/Index/Templates/error.php b/apps/Index/Templates/error.php index 7b31a6e..e04c8cc 100644 --- a/apps/Index/Templates/error.php +++ b/apps/Index/Templates/error.php @@ -1,23 +1,28 @@ -get_http_error(), - '', - 'error', + $error->get_http_error(), + '', + 'error', [ ['robots', 'nofollow, noindex'] - ]); + ] +); + +/** + * @var PageError + */ - /** - * @var PageError - */ - ?> -
-
get_http_error() ?>
-
getMessage() ?>
+
+
+
get_http_error() ?>
+
getMessage() ?>
+
- \ No newline at end of file diff --git a/assets/css/style.css b/assets/css/style.css index d98053a..ad28aed 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -1288,6 +1288,27 @@ label { opacity: 0.7; } +.error-page{ + margin-top: 46px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +.error-code{ + font-family: var(--title-font); + font-size: 100px; + color: var(--title-color); + margin-bottom: 20px; +} + +.error-message{ + font-size: 24px; + color: var(--common-text); + text-align: center; +} + @media (max-width: 768px) { .catalog-items { diff --git a/urls.php b/urls.php index 8a2d6bb..2b2d536 100644 --- a/urls.php +++ b/urls.php @@ -1,4 +1,5 @@ \ No newline at end of file