feature - 3 - Add logos

This commit is contained in:
myrmidex 2026-01-04 03:58:47 +01:00
parent 6723c9813b
commit 0de6c30dab
6 changed files with 21 additions and 16 deletions

View file

@ -11,6 +11,7 @@
/** /**
* @property int $id * @property int $id
* @property static PlannerFactory factory($count = null, $state = []) * @property static PlannerFactory factory($count = null, $state = [])
* @method static first()
*/ */
class Planner extends Authenticatable class Planner extends Authenticatable
{ {

View file

@ -11,6 +11,7 @@ class DishesSeeder extends Seeder
{ {
public function run(): void public function run(): void
{ {
/** @var Planner $planner */
$planner = Planner::first() ?? Planner::factory()->create(); $planner = Planner::first() ?? Planner::factory()->create();
// Get users belonging to this planner // Get users belonging to this planner

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View file

@ -20,8 +20,9 @@
<div class="flex items-center"> <div class="flex items-center">
<!-- Logo --> <!-- Logo -->
<div class="flex-shrink-0 flex items-center"> <div class="flex-shrink-0 flex items-center">
<a href="{{ route('dashboard') }}" class="text-2xl font-syncopate text-primary"> <a href="{{ route('dashboard') }}" class="flex items-center">
DISH PLANNER <img src="{{ asset('images/logo-without-text.png') }}" alt="Dish Planner" class="h-8 mr-2">
<span class="text-2xl font-syncopate text-primary relative top-[3px]">DISH PLANNER</span>
</a> </a>
</div> </div>
@ -58,7 +59,7 @@ class="inline-flex items-center px-3 py-2 text-sm font-medium {{ request()->rout
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" /> <path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg> </svg>
</button> </button>
<div x-show="open" <div x-show="open"
@click.away="open = false" @click.away="open = false"
x-cloak x-cloak
x-transition x-transition
@ -164,7 +165,7 @@ class="block text-2xl font-medium {{ request()->routeIs('schedule.*') ? 'text-ac
</div> </div>
@livewireScripts @livewireScripts
{{-- CSRF Token Auto-Refresh for Livewire --}} {{-- CSRF Token Auto-Refresh for Livewire --}}
<script> <script>
// Handle CSRF token expiration gracefully // Handle CSRF token expiration gracefully
@ -173,7 +174,7 @@ class="block text-2xl font-medium {{ request()->routeIs('schedule.*') ? 'text-ac
if (status === 419) { if (status === 419) {
// Prevent the default error handling // Prevent the default error handling
preventDefault(); preventDefault();
try { try {
// Fetch a new CSRF token // Fetch a new CSRF token
const response = await fetch("/refresh-csrf", { const response = await fetch("/refresh-csrf", {
@ -184,22 +185,22 @@ class="block text-2xl font-medium {{ request()->routeIs('schedule.*') ? 'text-ac
}, },
credentials: "same-origin", credentials: "same-origin",
}); });
if (response.ok) { if (response.ok) {
const data = await response.json(); const data = await response.json();
const newToken = data.token; const newToken = data.token;
// Update the CSRF token in the meta tag // Update the CSRF token in the meta tag
const csrfMeta = document.querySelector("meta[name='csrf-token']"); const csrfMeta = document.querySelector("meta[name='csrf-token']");
if (csrfMeta) { if (csrfMeta) {
csrfMeta.setAttribute("content", newToken); csrfMeta.setAttribute("content", newToken);
} }
// Update Livewire's CSRF token // Update Livewire's CSRF token
if (window.Livewire && Livewire.csrfToken) { if (window.Livewire && Livewire.csrfToken) {
Livewire.csrfToken = newToken; Livewire.csrfToken = newToken;
} }
// Retry the original request with the new token // Retry the original request with the new token
retry(); retry();
} else { } else {
@ -215,9 +216,9 @@ class="block text-2xl font-medium {{ request()->routeIs('schedule.*') ? 'text-ac
}); });
}); });
</script> </script>
<style> <style>
[x-cloak] { display: none !important; } [x-cloak] { display: none !important; }
</style> </style>
</body> </body>
</html> </html>

View file

@ -12,12 +12,14 @@
@livewireStyles @livewireStyles
</head> </head>
<body class="font-sans antialiased bg-gray-600 text-gray-100"> <body class="font-sans antialiased bg-gray-600 text-gray-100">
<div class="min-h-screen flex flex-col items-center justify-center px-4"> <div class="min-h-screen flex flex-col items-center px-4 py-8">
<div class="w-full max-w-sm"> <!-- Logo -->
<div class="text-center mb-6"> <div class="w-full max-w-xs mb-8">
<h1 class="text-2xl font-syncopate text-primary">DISH PLANNER</h1> <img src="{{ asset('images/logo-with-text.png') }}" alt="Dish Planner" class="w-full">
</div> </div>
<!-- Login box -->
<div class="w-full max-w-sm">
<x-card> <x-card>
@yield('content') @yield('content')
</x-card> </x-card>