mirror of
https://github.com/alexjustesen/speedtest-tracker.git
synced 2026-06-23 06:50:09 +00:00
[Feature] Custom 500 server error page (#1417)
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\View\Components;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class GuestLayout extends Component
|
||||
{
|
||||
public $title = '';
|
||||
|
||||
public function __construct(?string $title = '')
|
||||
{
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*/
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
return view('layouts.guest');
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"resources/css/app.css": {
|
||||
"file": "assets/app-Cvdm5QA4.css",
|
||||
"file": "assets/app-zAziKUDq.css",
|
||||
"src": "resources/css/app.css",
|
||||
"isEntry": true
|
||||
},
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<x-guest-layout :title="__('Server Error')">
|
||||
<div class="grid px-4 min-h-dvh place-content-center">
|
||||
<div class="text-center">
|
||||
<h1 class="font-black text-gray-200 dark:text-gray-800 text-9xl">500</h1>
|
||||
|
||||
<p class="text-2xl font-bold tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl">{{ __('Oops, server error!') }}</p>
|
||||
|
||||
<p class="mt-4 text-gray-500 dark:text-gray-300">There was an issue, check the logs or view the docs for help.</p>
|
||||
|
||||
<a
|
||||
href="https://docs.speedtest-tracker.dev/help/faqs#im-getting-a-500-or-server-error-error"
|
||||
target="_blank"
|
||||
rel="nofollow"
|
||||
class="inline-block px-5 py-3 mt-6 text-sm font-medium text-white rounded bg-amber-400 hover:bg-amber-500 focus:outline-none focus:ring focus:ring-amber-400/80">
|
||||
{{ __('Documentation') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</x-guest-layout>
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="min-h-dvh">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="min-h-screen antialiased bg-gray-50 dark:bg-gray-950 text-gray-950 dark:text-white">
|
||||
<body class="antialiased min-h-dvh bg-gray-50 dark:bg-gray-950 text-gray-950 dark:text-white">
|
||||
<main class="p-4 sm:p-6 lg:p-8 mx-auto max-w-{{ config('speedtest.content_width') }} space-y-4 sm:space-y-8">
|
||||
<header class="flex flex-col gap-4 sm:flex-row sm:justify-between sm:items-center">
|
||||
<div>
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="min-h-dvh">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>{{ $title }} - {{ config('app.name') }}</title>
|
||||
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}">
|
||||
|
||||
{{-- Fonts --}}
|
||||
<link href="{{ asset('fonts/inter/inter.css') }}" rel="stylesheet" />
|
||||
|
||||
{{-- Styles --}}
|
||||
@filamentStyles
|
||||
@vite('resources/css/app.css')
|
||||
|
||||
<script>
|
||||
const theme = localStorage.getItem('theme') ?? 'system'
|
||||
|
||||
if (
|
||||
theme === 'dark' ||
|
||||
(theme === 'system' &&
|
||||
window.matchMedia('(prefers-color-scheme: dark)')
|
||||
.matches)
|
||||
) {
|
||||
document.documentElement.classList.add('dark')
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="antialiased min-h-dvh bg-gray-50 dark:bg-gray-950 text-gray-950 dark:text-white">
|
||||
{{ $slot }}
|
||||
|
||||
{{-- Scripts --}}
|
||||
@filamentScripts
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user