From b57fd38fc9bb5f22efc7bf8a193397a52cc21934 Mon Sep 17 00:00:00 2001 From: macdanson Date: Tue, 27 May 2025 15:49:58 +0300 Subject: [PATCH 1/4] Added a reusable button component --- app/View/Components/Button.php | 40 ++++++++++++++++++++ resources/views/components/button.blade.php | 41 +++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 app/View/Components/Button.php create mode 100644 resources/views/components/button.blade.php diff --git a/app/View/Components/Button.php b/app/View/Components/Button.php new file mode 100644 index 0000000..6cf873c --- /dev/null +++ b/app/View/Components/Button.php @@ -0,0 +1,40 @@ +type = $type; + $this->loadingTarget = $loadingTarget; + $this->class = $class; + $this->variant = $variant; + } + + /** + * Get the view / contents that represent the component. + * + * @return View + */ + public function render(): View + { + return view('components.button'); + } +} diff --git a/resources/views/components/button.blade.php b/resources/views/components/button.blade.php new file mode 100644 index 0000000..6e5b1cf --- /dev/null +++ b/resources/views/components/button.blade.php @@ -0,0 +1,41 @@ +{{-- resources/views/components/button.blade.php --}} +@props([ + 'type' => 'submit', + 'loadingTarget' => null, + 'variant' => 'blue', + 'class' => '', +]) + +@php + // Define color classes + $colorClasses = [ + 'blue' => 'bg-blue-700 hover:bg-blue-800 focus:ring-blue-300', + 'green' => 'bg-green-700 hover:bg-green-800 focus:ring-green-300', + 'red' => 'bg-red-700 hover:bg-red-800 focus:ring-red-300', + 'yellow' => 'bg-yellow-700 hover:bg-yellow-800 focus:ring-yellow-300', + 'indigo' => 'bg-indigo-700 hover:bg-indigo-800 focus:ring-indigo-300', + ]; + + $selectedColor = $colorClasses[$variant] ?? $colorClasses['blue']; +@endphp + + From fbb3f362c489e0f278a84035f0cc53ee61166894 Mon Sep 17 00:00:00 2001 From: macdanson Date: Tue, 27 May 2025 15:50:33 +0300 Subject: [PATCH 2/4] Set project variables --- .env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 35db1dd..4c25f9a 100644 --- a/.env.example +++ b/.env.example @@ -15,7 +15,7 @@ PHP_CLI_SERVER_WORKERS=4 BCRYPT_ROUNDS=12 -LOG_CHANNEL=stack +LOG_CHANNEL=daily LOG_STACK=single LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug From 4fd5f9935479c2076c912fc604fd48b9ec8b0d31 Mon Sep 17 00:00:00 2001 From: macdanson Date: Tue, 27 May 2025 15:53:34 +0300 Subject: [PATCH 3/4] Set bg and text colors of auth-session-status blade component --- resources/views/components/auth-session-status.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/components/auth-session-status.blade.php b/resources/views/components/auth-session-status.blade.php index f7b3b32..a81b246 100644 --- a/resources/views/components/auth-session-status.blade.php +++ b/resources/views/components/auth-session-status.blade.php @@ -1,7 +1,7 @@ @props(['status']) @if ($status) - diff --git a/resources/views/livewire/auth/forgot-password.blade.php b/resources/views/livewire/auth/forgot-password.blade.php index b8f67a3..efd3a3b 100644 --- a/resources/views/livewire/auth/forgot-password.blade.php +++ b/resources/views/livewire/auth/forgot-password.blade.php @@ -23,9 +23,7 @@ - + Create account @if(Route::has('login'))
diff --git a/resources/views/livewire/auth/login.blade.php b/resources/views/livewire/auth/login.blade.php index 7a6fc82..375f0b2 100644 --- a/resources/views/livewire/auth/login.blade.php +++ b/resources/views/livewire/auth/login.blade.php @@ -40,7 +40,7 @@
@endif - + Create account @if(Route::has('register'))
diff --git a/resources/views/livewire/auth/register.blade.php b/resources/views/livewire/auth/register.blade.php index 172e190..0b1fcfb 100644 --- a/resources/views/livewire/auth/register.blade.php +++ b/resources/views/livewire/auth/register.blade.php @@ -40,7 +40,7 @@
- + Create account @if(Route::has('login'))
diff --git a/resources/views/livewire/auth/reset-password.blade.php b/resources/views/livewire/auth/reset-password.blade.php index c580ea0..7f0e893 100644 --- a/resources/views/livewire/auth/reset-password.blade.php +++ b/resources/views/livewire/auth/reset-password.blade.php @@ -31,9 +31,7 @@
- + Create account diff --git a/resources/views/livewire/auth/verify-email.blade.php b/resources/views/livewire/auth/verify-email.blade.php index 89249b9..2e8faa7 100644 --- a/resources/views/livewire/auth/verify-email.blade.php +++ b/resources/views/livewire/auth/verify-email.blade.php @@ -14,13 +14,17 @@ @if (session('status') == 'verification-link-sent') -