Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasfroeller committed Jan 25, 2024
2 parents 67e6e1d + 05c7bfe commit 84e69d1
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 31 deletions.
15 changes: 15 additions & 0 deletions app/Livewire/HomePage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace App\Livewire;

use Livewire\Attributes\Layout;
use Livewire\Component;

#[Layout('layouts.app')]
class HomePage extends Component
{
public function render()
{
return view('livewire.home-page');
}
}
16 changes: 16 additions & 0 deletions app/Livewire/ProjectsPage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace App\Livewire;

use Livewire\Attributes\Layout;
use Livewire\Component;


#[Layout('layouts.app')]
class ProjectsPage extends Component
{
public function render()
{
return view('livewire.projects-page');
}
}
23 changes: 0 additions & 23 deletions app/Livewire/ShowProject.php

This file was deleted.

3 changes: 3 additions & 0 deletions resources/views/dashboard.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

@include('layouts.navigation')

<x-app-layout>
<x-slot name="header">
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
Expand Down
24 changes: 22 additions & 2 deletions resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,42 @@
@vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
<body class="font-sans antialiased">


<div class="min-h-screen bg-gray-100 dark:bg-gray-900">
@include('layouts.navigation')

<!-- Page Heading -->
@if (isset($header))
<header class="bg-white dark:bg-gray-800 shadow">
<header class="bg-white dark:bg-gray-800">
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
{{ $header }}
</div>
</header>
@endif

<div class="relative min-h-screen bg-gray-100 bg-center sm:flex sm:justify-center sm:items-center bg-dots-darker dark:bg-dots-lighter dark:bg-gray-900 selection:bg-red-500 selection:text-white">
@if (Route::has('login'))
<div class="z-10 p-6 text-right sm:fixed sm:top-0 sm:right-0">
@auth
<a href="{{ url('/dashboard') }}" class="font-semibold text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white focus:outline focus:outline-2 focus:rounded-sm focus:outline-red-500">Dashboard</a>
<br>
<a href="{{ url('/projects') }}" class="font-semibold text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white focus:outline focus:outline-2 focus:rounded-sm focus:outline-red-500">Projects</a>

@else
<a href="{{ route('login') }}" class="font-semibold text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white focus:outline focus:outline-2 focus:rounded-sm focus:outline-red-500">Log in</a>

@if (Route::has('register'))
<a href="{{ route('register') }}" class="ml-4 font-semibold text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white focus:outline focus:outline-2 focus:rounded-sm focus:outline-red-500">Register</a>
@endif
@endauth
</div>
@endif

<!-- Page Content -->
<main>
{{ $slot }}
</main>

</div>
</body>
</html>
3 changes: 3 additions & 0 deletions resources/views/livewire/home-page.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div>
<livewire:join-project-form />
</div>
3 changes: 3 additions & 0 deletions resources/views/livewire/projects-page.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div>
Projects
</div>
3 changes: 0 additions & 3 deletions resources/views/livewire/show-project.blade.php

This file was deleted.

5 changes: 2 additions & 3 deletions routes/web.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

use App\Http\Controllers\ProfileController;
use App\Livewire\HomePage;
use Illuminate\Support\Facades\Route;
use \App\Models\Project;

Expand All @@ -15,9 +16,7 @@
|
*/

Route::get('/', function () {
return view('welcome');
});
Route::get('/', HomePage::class);

Route::get('/projects', function () {
return view('projects');
Expand Down

0 comments on commit 84e69d1

Please sign in to comment.