Skip to content

Commit d3d1b88

Browse files
committed
Add 404 and 403 error pages
1 parent e075b90 commit d3d1b88

File tree

4 files changed

+176
-0
lines changed

4 files changed

+176
-0
lines changed

resources/lang/en/base.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
return [
44
'validation_error' => 'There was an error with one or more fields in the request.',
5+
'errors' => [
6+
'return' => 'Return to Previous Page',
7+
'home' => 'Go Home',
8+
'403' => [
9+
'header' => 'Forbidden',
10+
'desc' => 'You do not have permission to access this resource on this server.',
11+
],
12+
'404' => [
13+
'header' => 'File Not Found',
14+
'desc' => 'We were unable to locate the requested resource on the server.',
15+
],
16+
],
517
'index' => [
618
'header' => 'Your Servers',
719
'header_sub' => 'Servers you own and have access to.',
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{{-- Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com> --}}
2+
3+
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
4+
{{-- of this software and associated documentation files (the "Software"), to deal --}}
5+
{{-- in the Software without restriction, including without limitation the rights --}}
6+
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
7+
{{-- copies of the Software, and to permit persons to whom the Software is --}}
8+
{{-- furnished to do so, subject to the following conditions: --}}
9+
10+
{{-- The above copyright notice and this permission notice shall be included in all --}}
11+
{{-- copies or substantial portions of the Software. --}}
12+
13+
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
14+
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
15+
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
16+
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
17+
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
18+
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
19+
{{-- SOFTWARE. --}}
20+
@extends('layouts.error')
21+
22+
@section('title')
23+
@lang('base.errors.403.header')
24+
@endsection
25+
26+
@section('content-header')
27+
@endsection
28+
29+
@section('content')
30+
<!-- This is why we don't let Pterodactyl's make links... fat fingered dinosaurs... -->
31+
<div class="row">
32+
<div class="col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1 col-xs-12">
33+
<div class="box box-danger">
34+
<div class="box-body text-center">
35+
<h1 class="text-red" style="font-size: 160px !important;font-weight: 100 !important;">403</h1>
36+
<p class="text-muted">@lang('base.errors.403.desc')</p>
37+
</div>
38+
<div class="box-footer with-border">
39+
<a href="{{ URL::previous() }}"><button class="btn btn-danger">&larr; @lang('base.errors.return')</button></a>
40+
<a href="/"><button class="btn btn-default">@lang('base.errors.home')</button></a>
41+
</div>
42+
</div>
43+
</div>
44+
</div>
45+
@endsection
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{{-- Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com> --}}
2+
3+
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
4+
{{-- of this software and associated documentation files (the "Software"), to deal --}}
5+
{{-- in the Software without restriction, including without limitation the rights --}}
6+
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
7+
{{-- copies of the Software, and to permit persons to whom the Software is --}}
8+
{{-- furnished to do so, subject to the following conditions: --}}
9+
10+
{{-- The above copyright notice and this permission notice shall be included in all --}}
11+
{{-- copies or substantial portions of the Software. --}}
12+
13+
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
14+
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
15+
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
16+
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
17+
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
18+
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
19+
{{-- SOFTWARE. --}}
20+
@extends('layouts.error')
21+
22+
@section('title')
23+
@lang('base.errors.404.header')
24+
@endsection
25+
26+
@section('content-header')
27+
@endsection
28+
29+
@section('content')
30+
<!-- This is why we don't let Pterodactyl's make links... fat fingered dinosaurs... -->
31+
<div class="row">
32+
<div class="col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1 col-xs-12">
33+
<div class="box box-warning">
34+
<div class="box-body text-center">
35+
<h1 class="text-yellow" style="font-size: 160px !important;font-weight: 100 !important;">404</h1>
36+
<p class="text-muted">@lang('base.errors.404.desc')</p>
37+
</div>
38+
<div class="box-footer with-border">
39+
<a href="{{ URL::previous() }}"><button class="btn btn-warning">&larr; @lang('base.errors.return')</button></a>
40+
<a href="/"><button class="btn btn-default">@lang('base.errors.home')</button></a>
41+
</div>
42+
</div>
43+
</div>
44+
</div>
45+
@endsection
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{{-- Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com> --}}
2+
3+
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
4+
{{-- of this software and associated documentation files (the "Software"), to deal --}}
5+
{{-- in the Software without restriction, including without limitation the rights --}}
6+
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
7+
{{-- copies of the Software, and to permit persons to whom the Software is --}}
8+
{{-- furnished to do so, subject to the following conditions: --}}
9+
10+
{{-- The above copyright notice and this permission notice shall be included in all --}}
11+
{{-- copies or substantial portions of the Software. --}}
12+
13+
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
14+
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
15+
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
16+
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
17+
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
18+
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
19+
{{-- SOFTWARE. --}}
20+
<!DOCTYPE html>
21+
<html>
22+
<head>
23+
<meta charset="utf-8">
24+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
25+
<title>{{ Settings::get('company', 'Pterodactyl') }} - @yield('title')</title>
26+
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
27+
<meta name="_token" content="{{ csrf_token() }}">
28+
@section('scripts')
29+
{!! Theme::css('vendor/bootstrap/bootstrap.min.css') !!}
30+
{!! Theme::css('vendor/adminlte/admin.min.css') !!}
31+
{!! Theme::css('vendor/adminlte/colors/skin-blue.min.css') !!}
32+
{!! Theme::css('vendor/sweetalert/sweetalert.min.css') !!}
33+
{!! Theme::css('css/pterodactyl.css') !!}
34+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
35+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
36+
37+
<!--[if lt IE 9]>
38+
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
39+
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
40+
<![endif]-->
41+
@show
42+
</head>
43+
<body class="hold-transition skin-blue fixed sidebar-mini">
44+
<div class="wrapper">
45+
<header class="main-header">
46+
<a href="{{ route('index') }}" class="logo">
47+
<span>{{ Settings::get('company', 'Pterodactyl') }}</span>
48+
</a>
49+
<nav class="navbar navbar-static-top"></nav>
50+
</header>
51+
<div class="content-wrapper" style="margin-left: 0;">
52+
<section class="content-header">
53+
@yield('content-header')
54+
</section>
55+
<section class="content">
56+
@yield('content')
57+
</section>
58+
</div>
59+
<footer class="main-footer" style="margin-left: 0;">
60+
<div class="pull-right hidden-xs small text-gray">
61+
<strong>v</strong> {{ config('app.version') }}
62+
</div>
63+
Copyright &copy; 2015 - {{ date('Y') }} <a href="https://pterodactyl.io/">Pterodactyl Software &amp; Design</a>.
64+
</footer>
65+
</div>
66+
@section('footer-scripts')
67+
{!! Theme::js('js/laroute.js') !!}
68+
{!! Theme::js('js/vendor/jquery/jquery.min.js') !!}
69+
{!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!}
70+
{!! Theme::js('vendor/slimscroll/jquery.slimscroll.min.js') !!}
71+
{!! Theme::js('vendor/adminlte/app.min.js') !!}
72+
@show
73+
</body>
74+
</html>

0 commit comments

Comments
 (0)