Skip to content

Commit

Permalink
Implement layout into View component and configure Setup views
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrooksuk committed Jan 17, 2024
1 parent 09228cb commit b21e102
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 35 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
@props([
'title',
])
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="bg-background-light text-base-light dark:bg-background-dark dark:text-base-dark">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<title>{{ config('cachet.title', 'Cachet') }}</title>
<title>{{ $title ?? config('cachet.title', 'Cachet') }}</title>

@vite(['resources/css/cachet.css', 'resources/js/cachet.js'], 'vendor/cachethq/cachet')

Expand All @@ -19,6 +22,6 @@
</style>
</head>
<body class="antialiased">
@yield('content')
{{ $slot }}
</body>
</html>
18 changes: 0 additions & 18 deletions resources/views/dashboard/index.blade.php

This file was deleted.

14 changes: 14 additions & 0 deletions resources/views/setup/index.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<x-cachet::cachet :title="$title">
<div class="flex items-center justify-center px-8 py-6">
<div>
<a href="{{ route('cachet.status-page') }}" class="transition hover:opacity-80">
<x-cachet::logo class="hidden h-8 w-auto sm:block"/>
<x-cachet::logomark class="h-8 w-auto sm:hidden"/>
</a>
</div>
</div>

Setup Content

<x-cachet::footer/>
</x-cachet::cachet>
26 changes: 13 additions & 13 deletions resources/views/status-page/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
@extends('cachet::layouts.status-page')
@section('content')
<x-cachet::header />
<x-cachet::cachet>
<x-cachet::header/>

<div class="mx-auto max-w-5xl px-4 py-10 sm:px-6 lg:px-8">
<div>
<h2 class="text-3xl font-semibold">About This Site</h2>
<div class="prose prose-zinc mt-1 dark:prose-invert prose-a:text-primary-500 prose-a:underline">
{{-- format-ignore-start --}}
<p>
This is the demo instance of <a href="https://cachethq.io/" target="_blank">Cachet</a>. The open-source status page system.
</p>
<p>
This is the demo instance of <a href="https://cachethq.io/" target="_blank">Cachet</a>. The
open-source status page system.
</p>
{{-- format-ignore-end --}}
</div>
</div>

<div class="mt-6 space-y-10">
<x-cachet::status-bar />
<x-cachet::status-bar/>

<x-cachet::component-group title="Laravel" />
<x-cachet::component-group title="Cachet" />
<x-cachet::component-group title="Laravel"/>
<x-cachet::component-group title="Cachet"/>

<x-cachet::maintenance />
<x-cachet::maintenance/>

<x-cachet::incidents />
<x-cachet::incidents/>
</div>
</div>

<x-cachet::footer />
@endsection
<x-cachet::footer/>
</x-cachet::cachet>
5 changes: 3 additions & 2 deletions src/Http/Controllers/Setup/SetupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
namespace Cachet\Http\Controllers\Setup;

use Illuminate\Routing\Controller;
use Inertia\Inertia;

class SetupController extends Controller
{
public function index()
{
return Inertia::render('Setup/Index');
return view('cachet::setup.index', [
'title' => __('Setup Cachet')
]);
}
}

0 comments on commit b21e102

Please sign in to comment.