Skip to content

Commit

Permalink
[Add] Error layout
Browse files Browse the repository at this point in the history
- Added a new error layout
- Updated Tailwind Css config
  • Loading branch information
kiritokatklian committed Apr 21, 2021
1 parent 510d9bb commit 358c0c8
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 13 deletions.
21 changes: 21 additions & 0 deletions app/View/Components/ErrorLayout.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace App\View\Components;

use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;

class ErrorLayout extends Component
{
/**
* Get the view / contents that represents the component.
*
* @return Application|Factory|View
*/
public function render()
{
return view('layouts.error');
}
}
2 changes: 1 addition & 1 deletion resources/views/layouts/base.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<meta name="csrf-token" content="{{ csrf_token() }}">
</head>

<body class="bg-white">
<body class="bg-white dark:bg-black">
@livewire('navigation-dropdown')

{{ $slot }}
Expand Down
36 changes: 36 additions & 0 deletions resources/views/layouts/error.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ $meta ?? '' }}

@if (empty($title))
<title>{{ config('app.name') }}</title>
@else
<title>{{ $title . ' - ' . config('app.name') }}</title>
@endif

<!-- Favicon -->
<link rel="shortcut icon" href="{{ url(asset('favicon.ico')) }}">

<!-- Fonts -->
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">

<!-- Styles -->
<link rel="stylesheet" href="{{ url(mix('css/app.css')) }}">
@livewireStyles

<!-- Scripts -->
<script src="{{ url(mix('js/app.js')) }}" defer></script>

<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
</head>

<body class="bg-white dark:bg-black">
{{ $slot }}

@livewireScripts
</body>
</html>
18 changes: 6 additions & 12 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,14 @@ const colors = require('tailwindcss/colors');
module.exports = {
mode: 'jit',

purge: {
content: [
'./app/**/*.php',
'./public/**/*.html',
'./resources/**/*.{html,js,jsx,md,php,ts,tsx,twig,vue}'
],
options: {
defaultExtractor: (content) => content.match(/[\w-/.:]+(?<!:)/g) || [],
whitelistPatterns: [/-active$/, /-enter$/, /-leave-to$/, /show$/],
},
},

darkMode: 'class',

purge: [
'./app/**/*.php',
'./public/**/*.html',
'./resources/**/*.{html,js,jsx,md,php,ts,tsx,twig,vue}'
],

theme: {
pagination: theme => ({
color: theme('colors.orange.500'),
Expand Down

0 comments on commit 358c0c8

Please sign in to comment.