Better handling for 404 pages, http 500 page, and some home page improvements.

This commit is contained in:
Graphictoria 2022-04-15 23:26:30 -04:00
parent ab5b1e08c4
commit d00bbab8e4
7 changed files with 58 additions and 17 deletions

View File

@ -36,7 +36,11 @@ class Handler extends ExceptionHandler
public function register()
{
$this->renderable(function (NotFoundHttpException $e, $request) {
return response()->view('main', [], 404);
return response()->view('errors.404', [], 404);
});
$this->renderable(function (\ErrorException $e, $request) {
return response()->view('errors.500', ['stack' => $e->getTraceAsString()], 500);
});
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

View File

@ -185,6 +185,24 @@ html {
display: flex;
}
.graphictoria-home-about {
background-image: url("/Images/Backgrounds/About.png");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
min-height: 500px;
}
.graphictoria-home-about-card {
color: #fff;
background: #000000ad;
border-radius: 5px;
padding: 20px;
max-width: 600px;
border: solid tint-color(#000000ad, 10%);
border-width: 0 0 2px;
}
.graphictoria-nojs {
background-image: url("/Images/Backgrounds/NoJs.png");
background-size: cover;

View File

@ -1,5 +0,0 @@
@extends('layouts.app')
@section('content')
<h1>abcd</h1>
@endsection

View File

@ -0,0 +1,26 @@
@extends('layouts.app')
@section('content')
<div class="container graphictoria-center-vh">
<x-card title="INTERNAL SERVER ERROR">
<x-slot name="body">
Oops, we ran into an issue while trying to process your request, please try again later in a few minutes. If the issue persists after a few minutes, please contact us at <a href="mailto:support@gtoria.net" class="fw-bold text-decoration-none">support@gtoria.net</a>.
@env(['production', 'staging'])
@if(isset($stack))
<div class="border border-primary bg-dark p-3 m-4">
<code>
STACK TRACE<br/>{{ str_repeat('-', 15) }}<br/>{{ $stack }}
</code>
</div>
@endif
@endenv
</x-slot>
<x-slot name="footer">
<div class="mt-2">
<a class="btn btn-primary px-4 me-2" href="{{ url('/') }}">Home</a>
<a class="btn btn-secondary px-4" onclick="history.back();return false;">Back</a>
</div>
</x-slot>
</x-card>
</div>
@endsection

View File

@ -11,11 +11,15 @@
<a href="{{ url('/register') }}" class="btn btn-success">Create your account<i class="ps-2 graphictoria-small-aligned-text fas fa-chevron-right"></i></a>
</div>
</div>
<div class="container text-center my-5">
<h1 class="fw-bold">So what is Graphictoria?</h1>
<h4>Ever wanted to experience or revisit classic Roblox? Graphictoria provides the platform for everyone to relive the classic Roblox experience.</h4>
<div class="graphictoria-home-about my-1">
<div class="col-10 d-flex h-100">
<div class="graphictoria-home-about-card text-center m-auto">
<h1 class="fw-bold">So what is Graphictoria?</h1>
<h4>Ever wanted to experience or revisit classic Roblox? Graphictoria provides the platform for anyone and everyone looking to relive the classic Roblox experience. Play with friends in an immersive 3D environment, or create your own game. Your imagination is the only limit.</h4>
</div>
</div>
</div>
<div class="container text-center">
<div class="container text-center my-5">
<h1 class="mb-5 fw-bold">Social Links</h1>
<div class="row mb-5">
<x-socialcard title="YouTube" description="Subscribe to our YouTube channel, where we upload trailers for future events and Graphictoria gameplay videos." link="https://www.youtube.com/graphictoria?sub_confirmation=1" />

View File

@ -17,10 +17,4 @@ use Illuminate\Support\Facades\Route;
Route::view('/', 'home');
// misc
Route::view('/javascript', 'javascript');
// fallback
Route::fallback(function(){
return response()
->view('errors.404', [], 404);
});
Route::view('/javascript', 'javascript');