57 lines
2.6 KiB
PHP
57 lines
2.6 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
require_once __DIR__ . '/../bootstrap.php';
|
|
|
|
try {
|
|
$controller = \App\Http\AppController::create();
|
|
$controller->handle();
|
|
} catch (Throwable $throwable) {
|
|
http_response_code(500);
|
|
$message = htmlspecialchars($throwable->getMessage(), ENT_QUOTES, 'UTF-8');
|
|
$appName = htmlspecialchars((string) app_config('app.name', 'Spreadsheet Importer'), ENT_QUOTES, 'UTF-8');
|
|
$assetUrl = htmlspecialchars(asset_url('styles.css'), ENT_QUOTES, 'UTF-8');
|
|
echo <<<HTML
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{$appName}</title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
|
<script>
|
|
tailwind = {
|
|
config: {
|
|
theme: {
|
|
extend: {
|
|
fontFamily: {
|
|
sans: ['Inter', 'ui-sans-serif', 'system-ui'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<link href="{$assetUrl}" rel="stylesheet">
|
|
</head>
|
|
<body class="min-h-screen bg-slate-100 text-slate-900 antialiased">
|
|
<main class="flex min-h-screen items-center justify-center px-4 py-12">
|
|
<section class="w-full max-w-2xl rounded-[2rem] border border-white/70 bg-white/90 p-6 shadow-[0_24px_80px_rgba(15,23,42,0.1)] backdrop-blur sm:p-8">
|
|
<div class="inline-flex items-center rounded-full bg-rose-50 px-3 py-1 text-xs font-semibold uppercase tracking-[0.2em] text-rose-700">Setup issue</div>
|
|
<h1 class="mt-5 text-3xl font-semibold tracking-tight">{$appName} cannot start</h1>
|
|
<p class="mt-3 text-sm leading-6 text-slate-500">The app hit a startup error while connecting to the database or loading a required dependency.</p>
|
|
<div class="mt-6 rounded-2xl border border-rose-200 bg-rose-50 px-4 py-3 text-sm font-medium text-rose-900">{$message}</div>
|
|
<div class="mt-5 text-sm leading-6 text-slate-500">
|
|
Check the PostgreSQL credentials in <code class="rounded bg-slate-100 px-1.5 py-0.5 text-slate-700">config.php</code>, run <code class="rounded bg-slate-100 px-1.5 py-0.5 text-slate-700">composer run migrate</code>, and make sure the database server is running.
|
|
</div>
|
|
</section>
|
|
</main>
|
|
</body>
|
|
</html>
|
|
HTML;
|
|
}
|