<?php

use MintyPHP\Buffer;

$defaultTitle = appTitle();
$primaryVars = appPrimaryCssVars();
$theme = appDefaultTheme();
$statusCode = http_response_code() ?: 500;

?>
<!DOCTYPE html>
<html data-theme="<?php e($theme); ?>" <?php if ($primaryVars !== ''): ?>style="<?php e($primaryVars); ?>"<?php endif; ?>>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title><?php e($statusCode . ' - ' . $defaultTitle); ?></title>
  <link rel="icon" type="image/png" sizes="32x32" href="<?php e(appFaviconUrl('favicon-32x32.png')); ?>">
  <?php renderTemplateStyles('default'); ?>
  <?php renderTemplateStyles('error'); ?>
</head>

<body>
  <div class="error-page">
    <div class="error-page__code"><?php e($statusCode); ?></div>
    <div class="error-page__message"><?php Buffer::get('html'); ?></div>
    <a class="error-page__back" href="/"><?php e(t('Back to start')); ?></a>
  </div>
</body>

</html>
