Add placeholder images, enhance alert styles, and implement theme toggle component with dark mode support

This commit is contained in:
pacnpal
2025-02-23 22:12:26 -05:00
parent 27e584f427
commit 0ba7add72f
44 changed files with 2188 additions and 227 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Livewire;
use Livewire\Component;
class ThemeToggleComponent extends Component
{
public bool $isDark = false;
public function mount()
{
$this->isDark = session('theme') === 'dark';
}
public function toggleTheme()
{
$this->isDark = !$this->isDark;
session(['theme' => $this->isDark ? 'dark' : 'light']);
$this->dispatch('theme-changed', theme: $this->isDark ? 'dark' : 'light');
}
public function render()
{
return view('livewire.theme-toggle-component');
}
}