Improved slightly error pages, Added card's corner triangular button

Update .gitignore, 403.php, and 7 more files...
This commit is contained in:
2022-09-21 21:52:49 +02:00
parent 97336cb8b5
commit 2555400b2d
9 changed files with 210 additions and 57 deletions

61
403.php
View File

@@ -2,6 +2,7 @@
set_include_path('./commons/');
include_once 'config.php';
include_once 'langs.php';
include_once 'modals.php';
?>
<!DOCTYPE html>
<html lang="<?php echo($user_language); ?>">
@@ -17,7 +18,18 @@ include_once 'langs.php';
<meta property="og:description" content="<?php print(localize('error.403.description')); ?>"/>
</head>
<body class="with-custom-webkit-scrollbars with-custom-css-scrollbars dark-mode" data-dm-shortcut-enabled="true" data-sidebar-shortcut-enabled="true">
<?php include 'body-root.php'; ?>
<?php
$debuggingText = "Referrer: " . (
array_key_exists('HTTP_REFERER', $_SERVER) ? htmlspecialchars($_SERVER['HTTP_REFERER']) : "<i>Not present in request !</i>"
) . "<br>";
$debuggingText .= "<br>TODO: Add more info once the cache if properly configured for 4xx errors !";
add_code_modal(
"http-error",
localize('modal.title.debugging'),
$debuggingText
);
include 'body-root.php';
?>
<div class="page-wrapper with-sidebar with-navbar-fixed-bottom">
<?php include 'sidebar.php'; ?>
<div class="content-wrapper">
@@ -28,32 +40,39 @@ include_once 'langs.php';
</h2>
<?php include 'header-lang.php'; ?>
</div>
<div class="row">
<div class="col-12 d-block">
<div class="content mb-0">
<div class="card p-0 m-0 card-bkgd">
<div class="content m-0">
<div class="px-card py-10 border-bottom px-20 bg-light-lm bg-very-dark-dm">
<div class="container-fluid">
<div class="row">
<div class="col-1 text-center"><i class="fad fa-exclamation-triangle"></i></div>
<div class="col-10 text-center">
<h2 class="card-title font-size-18 m-0"><?php print(localize("error.403.title")); ?></h2>
</div>
<div class="col-1 text-center"><i class="fad fa-exclamation-triangle"></i></div>
</div>
</div>
</div>
<div class="content m-20">
<h2 class="content-title font-size-20 mb-10"></h2>
<p class="ml-lg-10 mt-lg-5 text-center"><?php print(localize("error.403.description")); ?></p>
<div class="content mx-auto w-lg-p90">
<div class="card p-0 m-0">
<div class="px-card py-10 border-bottom px-20">
<div class="container-fluid">
<div class="row">
<div class="col-1 text-center"><i class="fad fa-exclamation-triangle"></i></div>
<div class="col-10 text-center">
<h2 class="card-title font-size-18 m-0"><?php print(localize("error.403.title")); ?></h2>
</div>
<div class="col-1 text-center"><i class="fad fa-exclamation-triangle"></i></div>
</div>
</div>
</div>
<div class="p-20 bg-light-lm rounded-bottom bg-very-dark title-bkgd text-center">
<p class="font-size-18 m-0 font-weight-semi-bold">
<?php print(localize("error.403.description")); ?>
</p>
<hr class="my-15">
<p class="font-size-14 m-0"><!--no hr => mt-lg-10 mt-lg-5-->
<?php print(localize("error.403.explanation")); ?>
</p>
<!--<hr class="my-20">
<a href="/" class="js-set-previous-url">
<button class="btn btn-primary" type="button">Go back to previous page</button>
</a>-->
<a href="#<?php echo(get_modal_id("http-error")); ?>">
<div class="container-card-fold secondary">
<i class="fad fa-bug"></i>
</div>
</a>
</div>
</div>
</div>
<!-- TODO: Add button to go back !-->
</div>
</div>
<?php include 'footer.php'; ?>