feature - 3 - Add logos
This commit is contained in:
parent
6723c9813b
commit
0de6c30dab
6 changed files with 21 additions and 16 deletions
|
|
@ -11,6 +11,7 @@
|
|||
/**
|
||||
* @property int $id
|
||||
* @property static PlannerFactory factory($count = null, $state = [])
|
||||
* @method static first()
|
||||
*/
|
||||
class Planner extends Authenticatable
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ class DishesSeeder extends Seeder
|
|||
{
|
||||
public function run(): void
|
||||
{
|
||||
/** @var Planner $planner */
|
||||
$planner = Planner::first() ?? Planner::factory()->create();
|
||||
|
||||
// Get users belonging to this planner
|
||||
|
|
|
|||
BIN
public/images/logo-with-text.png
Normal file
BIN
public/images/logo-with-text.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 140 KiB |
BIN
public/images/logo-without-text.png
Normal file
BIN
public/images/logo-without-text.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
|
|
@ -20,8 +20,9 @@
|
|||
<div class="flex items-center">
|
||||
<!-- Logo -->
|
||||
<div class="flex-shrink-0 flex items-center">
|
||||
<a href="{{ route('dashboard') }}" class="text-2xl font-syncopate text-primary">
|
||||
DISH PLANNER
|
||||
<a href="{{ route('dashboard') }}" class="flex items-center">
|
||||
<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>
|
||||
</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" />
|
||||
</svg>
|
||||
</button>
|
||||
<div x-show="open"
|
||||
<div x-show="open"
|
||||
@click.away="open = false"
|
||||
x-cloak
|
||||
x-transition
|
||||
|
|
@ -164,7 +165,7 @@ class="block text-2xl font-medium {{ request()->routeIs('schedule.*') ? 'text-ac
|
|||
</div>
|
||||
|
||||
@livewireScripts
|
||||
|
||||
|
||||
{{-- CSRF Token Auto-Refresh for Livewire --}}
|
||||
<script>
|
||||
// Handle CSRF token expiration gracefully
|
||||
|
|
@ -173,7 +174,7 @@ class="block text-2xl font-medium {{ request()->routeIs('schedule.*') ? 'text-ac
|
|||
if (status === 419) {
|
||||
// Prevent the default error handling
|
||||
preventDefault();
|
||||
|
||||
|
||||
try {
|
||||
// Fetch a new CSRF token
|
||||
const response = await fetch("/refresh-csrf", {
|
||||
|
|
@ -184,22 +185,22 @@ class="block text-2xl font-medium {{ request()->routeIs('schedule.*') ? 'text-ac
|
|||
},
|
||||
credentials: "same-origin",
|
||||
});
|
||||
|
||||
|
||||
if (response.ok) {
|
||||
const data = await response.json();
|
||||
const newToken = data.token;
|
||||
|
||||
|
||||
// Update the CSRF token in the meta tag
|
||||
const csrfMeta = document.querySelector("meta[name='csrf-token']");
|
||||
if (csrfMeta) {
|
||||
csrfMeta.setAttribute("content", newToken);
|
||||
}
|
||||
|
||||
|
||||
// Update Livewire's CSRF token
|
||||
if (window.Livewire && Livewire.csrfToken) {
|
||||
Livewire.csrfToken = newToken;
|
||||
}
|
||||
|
||||
|
||||
// Retry the original request with the new token
|
||||
retry();
|
||||
} else {
|
||||
|
|
@ -215,9 +216,9 @@ class="block text-2xl font-medium {{ request()->routeIs('schedule.*') ? 'text-ac
|
|||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
[x-cloak] { display: none !important; }
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -12,12 +12,14 @@
|
|||
@livewireStyles
|
||||
</head>
|
||||
<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="w-full max-w-sm">
|
||||
<div class="text-center mb-6">
|
||||
<h1 class="text-2xl font-syncopate text-primary">DISH PLANNER</h1>
|
||||
</div>
|
||||
<div class="min-h-screen flex flex-col items-center px-4 py-8">
|
||||
<!-- Logo -->
|
||||
<div class="w-full max-w-xs mb-8">
|
||||
<img src="{{ asset('images/logo-with-text.png') }}" alt="Dish Planner" class="w-full">
|
||||
</div>
|
||||
|
||||
<!-- Login box -->
|
||||
<div class="w-full max-w-sm">
|
||||
<x-card>
|
||||
@yield('content')
|
||||
</x-card>
|
||||
|
|
|
|||
Loading…
Reference in a new issue