Skip to content

Commit 3fbf34d

Browse files
Update button color classes for consistency and improve dark mode support in the thank-you component. (#40)
* Update button color classes for consistency and improve dark mode support in the thank-you component. * Add Rector configuration and dependencies for automated code quality and Laravel upgrades; reorganize .gitignore for better clarity and coverage.
1 parent a98bb38 commit 3fbf34d

File tree

8 files changed

+94
-29
lines changed

8 files changed

+94
-29
lines changed

.gitignore

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,49 @@
1-
.idea
2-
.phpunit.cache
3-
build
1+
# Composer Related
42
composer.lock
5-
coverage
6-
docs
3+
/vendor
4+
5+
# Frontend Assets
6+
/node_modules
7+
8+
# Logs
9+
npm-debug.log
10+
yarn-error.log
11+
12+
# Caches
13+
.phpunit.cache
14+
.phpunit.result.cache
15+
/build
16+
17+
# IDE Helper
18+
_ide_helper.php
19+
_ide_helper_models.php
20+
.phpstorm.meta.php
21+
22+
# Editors
23+
/.idea
24+
/.fleet
25+
/.vscode
26+
27+
# Misc
728
phpunit.xml
829
phpstan.neon
930
testbench.yaml
10-
node_modules
31+
/docs
32+
/coverage
33+
build
34+
coverage
35+
docs
1136
/.phpunit.cache
12-
/node_modules
13-
/public/hot
14-
/public/storage
15-
/storage/*.key
16-
/vendor
1737
.env
1838
.env.backup
1939
.env.production
20-
.phpunit.result.cache
21-
.editorconfig
2240
Homestead.json
2341
Homestead.yaml
2442
auth.json
25-
npm-debug.log
26-
yarn-error.log
27-
/.fleet
28-
/.idea
29-
/.vscode
3043
.user.ini
3144
php.ini
3245
error_log
3346
.DS_Store
47+
/.DS_Store
48+
/storage/**/*
3449
.php-cs-fixer.cache

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^8.3||^8.2",
19+
"php": "^8.3",
2020
"spatie/laravel-package-tools": "^1.16",
2121
"illuminate/contracts": "^10.0||^11.0||^12.0"
2222
},
@@ -28,7 +28,9 @@
2828
"orchestra/testbench": "^10.2||^9.0.0||^8.22.0",
2929
"pestphp/pest": "^3.0||^2.34",
3030
"pestphp/pest-plugin-arch": "^3.0||^2.7",
31-
"pestphp/pest-plugin-laravel": "^3.2||^2.3"
31+
"pestphp/pest-plugin-laravel": "^3.2||^2.3",
32+
"rector/rector": "^2.0",
33+
"driftingly/rector-laravel": "^2.0"
3234
},
3335
"autoload": {
3436
"psr-4": {

rector.php

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
6+
use Rector\CodeQuality\Rector\FuncCall\CompactToVariablesRector;
7+
use Rector\Config\RectorConfig;
8+
use Rector\Set\ValueObject\SetList;
9+
use Rector\ValueObject\PhpVersion;
10+
use RectorLaravel\Set\LaravelLevelSetList;
11+
12+
return static function (RectorConfig $rectorConfig): void {
13+
// Paths to analyze
14+
$rectorConfig->paths([
15+
__DIR__.'/src',
16+
__DIR__.'/config',
17+
__DIR__.'/database',
18+
__DIR__.'/resources',
19+
__DIR__.'/storage',
20+
__DIR__.'/tests',
21+
]);
22+
23+
// Skip specific rules
24+
$rectorConfig->skip([
25+
CompactToVariablesRector::class,
26+
]);
27+
28+
// Enable caching for Rector
29+
$rectorConfig->cacheDirectory(__DIR__.'/storage/rector');
30+
$rectorConfig->cacheClass(FileCacheStorage::class);
31+
32+
// Apply sets for Laravel and general code quality
33+
$rectorConfig->sets([
34+
LaravelLevelSetList::UP_TO_LARAVEL_110,
35+
SetList::TYPE_DECLARATION,
36+
SetList::PRIVATIZATION,
37+
SetList::CODE_QUALITY,
38+
SetList::CODING_STYLE,
39+
SetList::EARLY_RETURN,
40+
SetList::INSTANCEOF,
41+
SetList::DEAD_CODE,
42+
SetList::NAMING,
43+
SetList::PHP_84,
44+
]);
45+
46+
// Define PHP version for Rector
47+
$rectorConfig->phpVersion(PhpVersion::PHP_84);
48+
};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<button class="bg-red-500 hover:bg-red-700 text-white text-md font-bold py-2 px-4 rounded-lg hidden">
1+
<button class="bg-alt-500 hover:bg-alt-700 text-white text-md font-bold py-2 px-4 rounded-lg hidden">
22
{{ $buttonText }}
33
</button>

resources/views/components/buttons/location-button.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
class="sr-only peer" wire:model="location">
33

44
<label for="location_{{ $location }}"
5-
class="bg-gray-500 text-white font-bold text-md py-4 px-3 cursor-pointer hover:bg-blue-500 peer-checked:bg-blue-700 rounded-lg">
5+
class="bg-gray-500 text-white font-bold text-md py-2 px-3 cursor-pointer hover:bg-gray-700 peer-checked:bg-gray-700 rounded-lg">
66
{{ ucfirst($location) }}
77
</label>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<button wire:click="nextStep"
2-
class="bg-red-500 hover:bg-red-700 text-white text-md font-bold py-2 px-4 rounded-lg">
2+
class="bg-prime-500 hover:bg-prime-700 text-white text-md font-bold py-2 px-4 rounded-lg">
33
{{ $buttonText }}
44
</button>

resources/views/components/buttons/submit-button.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<button wire:click="nextStep"
22
wire:loading.attr="disabled"
3-
class="bg-red-500 hover:bg-red-700 text-white text-md font-bold py-2 px-4 rounded-lg disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center">
3+
class="bg-prime-500 hover:bg-prime-700 text-white text-md font-bold py-2 px-4 rounded-lg disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center">
44
<svg wire:loading wire:target="nextStep" class="animate-spin -ml-1 mr-2 h-4 w-4 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
55
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
66
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>

resources/views/components/thank-you.blade.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<x-sabhero-wrapper::layouts.app>
2-
<div class="flex h-screen prose text-center justify-center mx-auto text-black items-center">
2+
<div class="flex h-screen prose dark:prose-invert text-center justify-center mx-auto text-black dark:text-white items-center">
33
@if(session('status') === 'success')
4-
<div class="alert alert-success">
5-
<h1>🎉🏠<br /><br />
4+
<div class="alert alert-success dark:bg-green-900 dark:text-green-100">
5+
<h1 class="text-black dark:text-white">🎉🏠<br /><br />
66
{{ session('message', 'Form submitted successfully!') }}
77
</h1>
88
</div>
99
@endif
1010

1111
@if(session('status') === 'failure')
12-
<div class="alert alert-danger">
13-
<h1>❌🚫<br /><br />
12+
<div class="alert alert-danger dark:bg-red-900 dark:text-red-100">
13+
<h1 class="text-black dark:text-white">❌🚫<br /><br />
1414
{{ session('message', 'There was an issue submitting the form.') }}
1515
</h1>
1616
</div>

0 commit comments

Comments
 (0)