diff --git a/app/Providers/FortifyServiceProvider.php b/app/Providers/FortifyServiceProvider.php index 2d741e3..2412c97 100644 --- a/app/Providers/FortifyServiceProvider.php +++ b/app/Providers/FortifyServiceProvider.php @@ -42,5 +42,13 @@ class FortifyServiceProvider extends ServiceProvider RateLimiter::for('two-factor', function (Request $request) { return Limit::perMinute(5)->by($request->session()->get('login.id')); }); + + Fortify::registerView(function () { + return view('auth.register'); + }); + + Fortify::loginView(function () { + return view('auth.login'); + }); } } diff --git a/config/fortify.php b/config/fortify.php index 60cb2eb..91e9624 100644 --- a/config/fortify.php +++ b/config/fortify.php @@ -73,7 +73,7 @@ return [ | */ - 'home' => '/home', + 'home' => '/', /* |-------------------------------------------------------------------------- diff --git a/package-lock.json b/package-lock.json index 34ae4b0..e6ec2e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "tailwindcss": "^3.4.3" }, "devDependencies": { + "@tailwindcss/forms": "^0.5.7", "axios": "^1.6.4", "laravel-vite-plugin": "^1.0", "vite": "^5.0" @@ -702,6 +703,18 @@ "win32" ] }, + "node_modules/@tailwindcss/forms": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.7.tgz", + "integrity": "sha512-QE7X69iQI+ZXwldE+rzasvbJiyV/ju1FGHH0Qn2W3FKbuYtqp8LKcy6iSw79fVUT5/Vvf+0XgLCeYVG+UV6hOw==", + "dev": true, + "dependencies": { + "mini-svg-data-uri": "^1.2.3" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1" + } + }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -1410,6 +1423,15 @@ "node": ">= 0.6" } }, + "node_modules/mini-svg-data-uri": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz", + "integrity": "sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==", + "dev": true, + "bin": { + "mini-svg-data-uri": "cli.js" + } + }, "node_modules/minimatch": { "version": "9.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", diff --git a/package.json b/package.json index 735df7b..fa2ba0a 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "build": "vite build" }, "devDependencies": { + "@tailwindcss/forms": "^0.5.7", "axios": "^1.6.4", "laravel-vite-plugin": "^1.0", "vite": "^5.0" diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php new file mode 100644 index 0000000..ad751f8 --- /dev/null +++ b/resources/views/auth/login.blade.php @@ -0,0 +1,13 @@ + + Log In +
+
+
+ @csrf + + + Log In + +
+
+
diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php new file mode 100644 index 0000000..9cd39f4 --- /dev/null +++ b/resources/views/auth/register.blade.php @@ -0,0 +1,15 @@ + + Create an Account +
+
+
+ @csrf + + + + + Create Account + +
+
+
diff --git a/resources/views/components/auth/form-button.blade.php b/resources/views/components/auth/form-button.blade.php new file mode 100644 index 0000000..546df99 --- /dev/null +++ b/resources/views/components/auth/form-button.blade.php @@ -0,0 +1,6 @@ +@php + $buttonClasses = "flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"; +@endphp +
+ +
diff --git a/resources/views/components/auth/form-field.blade.php b/resources/views/components/auth/form-field.blade.php new file mode 100644 index 0000000..ec42541 --- /dev/null +++ b/resources/views/components/auth/form-field.blade.php @@ -0,0 +1,21 @@ +@props([ + 'name', + 'type', + 'label' => 'text' +]) +@php + $labelClasses = "block text-sm font-medium leading-6 text-gray-900"; + $inputClasses = "block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"; + $inputAttributes = [ + 'id' => $name, + 'name' => $name, + 'type' => $type, + 'class' => $inputClasses + ]; +@endphp +
+ +
+ merge($inputAttributes)}}> +
+
diff --git a/resources/views/components/auth/rememberme-forgotpassword.blade.php b/resources/views/components/auth/rememberme-forgotpassword.blade.php new file mode 100644 index 0000000..c68bd3b --- /dev/null +++ b/resources/views/components/auth/rememberme-forgotpassword.blade.php @@ -0,0 +1,10 @@ +
+
+ + +
+ +
+ Forgot password? +
+
diff --git a/resources/views/components/auth/thirdpartylogin.blade.php b/resources/views/components/auth/thirdpartylogin.blade.php new file mode 100644 index 0000000..6132c23 --- /dev/null +++ b/resources/views/components/auth/thirdpartylogin.blade.php @@ -0,0 +1,29 @@ +
+
+ +
+ Or continue with +
+
+ +
+ + + Google + + + + + GitHub + +
+
diff --git a/resources/views/components/layout/guest.blade.php b/resources/views/components/layout/guest.blade.php new file mode 100644 index 0000000..de1ed3b --- /dev/null +++ b/resources/views/components/layout/guest.blade.php @@ -0,0 +1,21 @@ + + + + + + + Document + @vite('resources/css/app.css') + + +
+
+ Your Company +

{{ $heading }}

+
+ + {{ $slot }} +
+ + diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index 868ce0d..ab99fd5 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -1,3 +1,4 @@ +@php use Illuminate\Support\Facades\Auth; @endphp @@ -10,5 +11,19 @@

Hello, World

+ + +
+ @csrf + @auth +

Logged in as: {{ Auth::user()->name }}

+ Logout + @endauth + @guest() +

Register

+

Login

+ @endguest + +
diff --git a/tailwind.config.js b/tailwind.config.js index ba17556..5ffdb41 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -3,11 +3,12 @@ export default { content: [ "./resources/**/*.blade.php", "./resources/**/*.js", - "./resources/**/*.vue", + "./resources/**/*.vue", ], theme: { extend: {}, }, - plugins: [], + plugins: [ + require('@tailwindcss/forms') + ], } -