<?php

use MintyPHP\Http\Request;

http_response_code(404);

$path = Request::safeReturnTarget($_GET['url'] ?? '');
$pathDisplay = $path === '' ? '/' : '/' . $path;
$home = lurl('');
$backUrl = $path !== '' ? lurl($path) : $home;

?>
  <header>
    <h1><?php e(t('Page not found')); ?></h1>
    <p><?php e(t('The page you requested does not exist or has moved.')); ?></p>
  </header>
  <?php if ($path !== ''): ?>
    <p><small><?php e(t('Requested path')); ?>: <?php e($pathDisplay); ?></small></p>
  <?php endif; ?>
    <a class="outline secondary" role="button" href="<?php e($backUrl); ?>"><?php e(t('Back')); ?></a>
    <a role="button" href="<?php e($home); ?>"><?php e(t('Home')); ?></a>
