From 633a4b584b624b65021b01aa47351410dd6595cd Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 31 Oct 2017 15:40:23 -0300 Subject: [PATCH 1/3] auth scaffolding --- README.md | 22 +++++++ src/tachyons-stubs/views/auth/login.blade.php | 48 ++++++++++++++ .../views/auth/passwords/email.blade.php | 40 ++++++++++++ .../views/auth/passwords/reset.blade.php | 54 +++++++++++++++ .../views/auth/register.blade.php | 65 +++++++++++++++++++ src/tachyons-stubs/views/home.blade.php | 32 ++++----- .../views/layouts/app.blade.php | 35 +++++----- 7 files changed, 263 insertions(+), 33 deletions(-) create mode 100644 src/tachyons-stubs/views/auth/passwords/email.blade.php create mode 100644 src/tachyons-stubs/views/auth/passwords/reset.blade.php create mode 100644 src/tachyons-stubs/views/auth/register.blade.php diff --git a/README.md b/README.md index d9dc3ba..cf7667a 100644 --- a/README.md +++ b/README.md @@ -1 +1,23 @@ # Tachyons preset for the Laravel framework + +### Installing +```bash +$ npm install +``` + +### Setting up the new preset +```bash +$ php artisan preset tachyons +``` + +### Auth scaffolding +```bash +$ php artisan preset tachyons-auth +``` + +### Compiling assets +```bash +$ npm run dev +``` + +Enjoy! diff --git a/src/tachyons-stubs/views/auth/login.blade.php b/src/tachyons-stubs/views/auth/login.blade.php index e69de29..7995eb5 100644 --- a/src/tachyons-stubs/views/auth/login.blade.php +++ b/src/tachyons-stubs/views/auth/login.blade.php @@ -0,0 +1,48 @@ +@extends('layouts.app') + +@section('content') + +
+
+ {{ csrf_field() }} +
+ Login +
+ + + @if ($errors->has('email')) +

{{ $errors->first('email') }}

+ @endif + + + @if ($errors->has('password')) +

{{ $errors->first('password') }}

+ @endif + + + Forgot your password? + +
+
+
+
+@endsection diff --git a/src/tachyons-stubs/views/auth/passwords/email.blade.php b/src/tachyons-stubs/views/auth/passwords/email.blade.php new file mode 100644 index 0000000..ec76dd7 --- /dev/null +++ b/src/tachyons-stubs/views/auth/passwords/email.blade.php @@ -0,0 +1,40 @@ +@extends('layouts.app') + +@section('content') +
+ @if (session('status')) + + @endif + +
+ {{ csrf_field() }} +
+ Reset Password +
+ + + @if ($errors->has('email')) +

{{ $errors->first('email') }}

+ @endif + + +
+
+
+
+@endsection diff --git a/src/tachyons-stubs/views/auth/passwords/reset.blade.php b/src/tachyons-stubs/views/auth/passwords/reset.blade.php new file mode 100644 index 0000000..68b5a29 --- /dev/null +++ b/src/tachyons-stubs/views/auth/passwords/reset.blade.php @@ -0,0 +1,54 @@ +@extends('layouts.app') + +@section('content') + +
+
+ {{ csrf_field() }} + +
+ Register +
+ + + @if ($errors->has('email')) +

{{ $errors->first('email') }}

+ @endif + + + @if ($errors->has('password')) +

{{ $errors->first('password') }}

+ @endif + + + @if ($errors->has('password_confirmation')) +

{{ $errors->first('password_confirmation') }}

+ @endif + + +
+
+
+
+@endsection diff --git a/src/tachyons-stubs/views/auth/register.blade.php b/src/tachyons-stubs/views/auth/register.blade.php new file mode 100644 index 0000000..4487e28 --- /dev/null +++ b/src/tachyons-stubs/views/auth/register.blade.php @@ -0,0 +1,65 @@ +@extends('layouts.app') + +@section('content') + +
+
+ {{ csrf_field() }} +
+ Register +
+ + + @if ($errors->has('name')) +

{{ $errors->first('name') }}

+ @endif + + + + @if ($errors->has('email')) +

{{ $errors->first('email') }}

+ @endif + + + @if ($errors->has('password')) +

{{ $errors->first('password') }}

+ @endif + + + @if ($errors->has('password_confirmation')) +

{{ $errors->first('password_confirmation') }}

+ @endif + + +
+
+
+
+@endsection diff --git a/src/tachyons-stubs/views/home.blade.php b/src/tachyons-stubs/views/home.blade.php index 32c2e8f..e4b612c 100644 --- a/src/tachyons-stubs/views/home.blade.php +++ b/src/tachyons-stubs/views/home.blade.php @@ -1,20 +1,22 @@ @extends('layouts.app') @section('content') -
- -
+ @endif +
+
+

Dashboard

+
+
+

+ You are logged in! +

+
@endsection diff --git a/src/tachyons-stubs/views/layouts/app.blade.php b/src/tachyons-stubs/views/layouts/app.blade.php index c28a15f..9525402 100644 --- a/src/tachyons-stubs/views/layouts/app.blade.php +++ b/src/tachyons-stubs/views/layouts/app.blade.php @@ -15,26 +15,25 @@
-
From 6c1f1ec22415af52e53bac8e2cb5ec8f2efebbef Mon Sep 17 00:00:00 2001 From: Michael Dyrynda Date: Wed, 1 Nov 2017 09:50:28 +1030 Subject: [PATCH 2/3] updateBootstrapping is defined but not called Withouth overwriting the default `bootstrap.js` file, `npm install` will fail because it tries to install the (now-removed) bootstrap-sass. --- src/TachyonsPreset.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/TachyonsPreset.php b/src/TachyonsPreset.php index d6580e3..7933140 100644 --- a/src/TachyonsPreset.php +++ b/src/TachyonsPreset.php @@ -13,6 +13,7 @@ public static function install() { static::updatePackages(); static::updateSass(); + static::updateBootstrapping(); static::updateWelcomePage(); static::removeNodeModules(); } From c03bfd16b75778a970dc5838476aa02757afc998 Mon Sep 17 00:00:00 2001 From: Michael Dyrynda Date: Wed, 1 Nov 2017 09:54:21 +1030 Subject: [PATCH 3/3] Rename file --- src/tachyons-stubs/{boostrap.js => bootstrap.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/tachyons-stubs/{boostrap.js => bootstrap.js} (100%) diff --git a/src/tachyons-stubs/boostrap.js b/src/tachyons-stubs/bootstrap.js similarity index 100% rename from src/tachyons-stubs/boostrap.js rename to src/tachyons-stubs/bootstrap.js