From 859032c7e497f0aa2b9f28a4345773c06e3f2b65 Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Thu, 13 Jan 2022 19:45:49 +0000 Subject: [PATCH 1/8] Remove tailwind ui check --- package-lock.json | 26 +++-- resources/css/app.css | 1 - resources/css/forms.css | 104 ------------------ resources/views/articles/create.blade.php | 2 +- resources/views/articles/edit.blade.php | 2 +- resources/views/articles/overview.blade.php | 2 +- resources/views/forum/overview.blade.php | 2 +- .../views/forum/threads/create.blade.php | 2 +- resources/views/forum/threads/edit.blade.php | 2 +- resources/views/forum/threads/show.blade.php | 2 +- resources/views/home.blade.php | 2 +- resources/views/layouts/base.blade.php | 2 +- resources/views/replies/edit.blade.php | 2 +- .../views/users/settings/settings.blade.php | 2 +- 14 files changed, 25 insertions(+), 128 deletions(-) delete mode 100644 resources/css/forms.css diff --git a/package-lock.json b/package-lock.json index 19c8ecffd..af5cf0820 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,10 +1,10 @@ { - "name": "laravel.io", + "name": "laravelio", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "laravel.io", + "name": "laravelio", "devDependencies": { "@tailwindcss/aspect-ratio": "^0.2.0", "@tailwindcss/forms": "^0.4.0", @@ -4555,8 +4555,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.14.1", - "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==", + "version": "1.14.7", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", + "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==", "dev": true, "funding": [ { @@ -7907,9 +7908,9 @@ "dev": true }, "node_modules/selfsigned": { - "version": "1.10.11", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.11.tgz", - "integrity": "sha512-aVmbPOfViZqOZPgRBT0+3u4yZFHpmnIghLMlAcb5/xhp5ZtB/RVnKhz5vl2M32CLXAqR4kha9zfhNg0Lf/sxKA==", + "version": "1.10.14", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.14.tgz", + "integrity": "sha512-lkjaiAye+wBZDCBsu5BGi0XiLRxeUlsGod5ZP924CRSEoGuZAw/f7y9RKu28rwTfiHVhdavhB0qH0INV6P1lEA==", "dev": true, "dependencies": { "node-forge": "^0.10.0" @@ -12941,8 +12942,9 @@ } }, "follow-redirects": { - "version": "1.14.1", - "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==", + "version": "1.14.7", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", + "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==", "dev": true }, "forwarded": { @@ -15340,9 +15342,9 @@ "dev": true }, "selfsigned": { - "version": "1.10.11", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.11.tgz", - "integrity": "sha512-aVmbPOfViZqOZPgRBT0+3u4yZFHpmnIghLMlAcb5/xhp5ZtB/RVnKhz5vl2M32CLXAqR4kha9zfhNg0Lf/sxKA==", + "version": "1.10.14", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.14.tgz", + "integrity": "sha512-lkjaiAye+wBZDCBsu5BGi0XiLRxeUlsGod5ZP924CRSEoGuZAw/f7y9RKu28rwTfiHVhdavhB0qH0INV6P1lEA==", "dev": true, "requires": { "node-forge": "^0.10.0" diff --git a/resources/css/app.css b/resources/css/app.css index 7646440ba..626e29130 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -8,7 +8,6 @@ @import 'articles.css'; @import 'buttons.css'; -@import 'forms.css'; @import 'labels.css'; @import 'modal.css'; @import 'replies.css'; diff --git a/resources/css/forms.css b/resources/css/forms.css deleted file mode 100644 index 153e98dd1..000000000 --- a/resources/css/forms.css +++ /dev/null @@ -1,104 +0,0 @@ -.standard .form-group { - @apply flex flex-col mb-4; -} - -.standard label { - @apply mb-1 text-gray-600 block uppercase text-sm; -} - -.standard input[type='text'], -.standard input[type='password'], -.standard input[type='email'], -.standard select { - @apply h-12; -} - -.standard input[type='text'], -.standard input[type='password'], -.standard input[type='email'], -.standard textarea, -.standard select { - @apply rounded border-2 p-3 w-full border-gray-300; -} - -.standard select { - @apply appearance-none; -} - -.standard input.nav-search { - @apply pl-10 pr-3 py-2; -} - -.standard input[type='checkbox'] { - @apply mr-1 rounded border border-gray-300; -} - -.standard .help-block { - @apply text-red-500 text-sm; -} - -/** Markdown editor **/ -.standard .form-group .editor { - @apply rounded-t-none; -} - -.standard .form-group .editor-toolbar { - @apply border-2 border-b-0 rounded rounded-b-none border-gray-300; -} - -.standard .form-group .CodeMirror { - @apply border-2 rounded rounded-t-none border-gray-300; -} - -/** Choices.js **/ -.standard .choices__input.choices__input--cloned { - @apply hidden; -} - -.standard .choices__inner { - @apply rounded border-2 border-gray-300 w-full bg-white h-12 p-2 flex items-center !important; -} - -.standard .choices__list--dropdown { - @apply border-2 border-gray-300 !important; -} - -.standard .choices__list--single { - @apply p-0 !important; -} - -.standard .choices__item { - @apply text-sm bg-gray-200 text-gray-700 cursor-pointer rounded px-2 py-1 my-0 border-0 !important; -} - -.standard .choices__item.choices__item--choice { - @apply rounded-none py-2 !important; -} - -.standard .choices__item.choices__item--choice.choices__item--selectable { - @apply bg-white rounded-none text-gray-700 p-2 !important; -} - -.standard .choices__item.choices__item--choice.choices__item--selectable:hover { - @apply bg-gray-200 !important; -} - -.standard .choices__item.choices__item--selectable { - @apply bg-lio-500 border-lio-500 text-white !important; -} - -.standard .choices__list--single > .choices__item.choices__item--selectable { - @apply bg-white text-gray-700 !important; -} - -.standard .choices__item.is-highlighted { - @apply bg-lio-600 border-lio-600 text-white !important; -} - -.standard .choices[data-type*='select-one']:after { - border-color: theme('colors.gray.500') transparent transparent transparent !important; -} - -.standard .choices[data-type*='select-one'] .choices__input { - @apply rounded-none border-b-2 border-gray-300 !important; -} diff --git a/resources/views/articles/create.blade.php b/resources/views/articles/create.blade.php index 1014de544..e6b6213d5 100644 --- a/resources/views/articles/create.blade.php +++ b/resources/views/articles/create.blade.php @@ -1,6 +1,6 @@ @title('Write your article') -@extends('layouts.default', ['isTailwindUi' => true]) +@extends('layouts.default') @section('subnav')
diff --git a/resources/views/articles/edit.blade.php b/resources/views/articles/edit.blade.php index de34e3216..e6efeeb72 100644 --- a/resources/views/articles/edit.blade.php +++ b/resources/views/articles/edit.blade.php @@ -1,6 +1,6 @@ @title('Edit your article') -@extends('layouts.default', ['isTailwindUi' => true]) +@extends('layouts.default') @section('subnav')
diff --git a/resources/views/articles/overview.blade.php b/resources/views/articles/overview.blade.php index 36d3b8045..d42065240 100644 --- a/resources/views/articles/overview.blade.php +++ b/resources/views/articles/overview.blade.php @@ -1,7 +1,7 @@ @title('Community Articles') @canonical($canonical) -@extends('layouts.default', ['isTailwindUi' => true]) +@extends('layouts.default') @section('content')
diff --git a/resources/views/forum/overview.blade.php b/resources/views/forum/overview.blade.php index 18dc6bfe5..b4be447ca 100644 --- a/resources/views/forum/overview.blade.php +++ b/resources/views/forum/overview.blade.php @@ -2,7 +2,7 @@ @title('Forum' . (isset($subTitle) ? ' > ' . $subTitle : '')) @canonical($canonical) -@extends('layouts.default', ['hasShadow' => true, 'isTailwindUi' => true]) +@extends('layouts.default', ['hasShadow' => true]) @section('content')
diff --git a/resources/views/forum/threads/create.blade.php b/resources/views/forum/threads/create.blade.php index 034073c2c..fe15a46fb 100644 --- a/resources/views/forum/threads/create.blade.php +++ b/resources/views/forum/threads/create.blade.php @@ -1,6 +1,6 @@ @title('Create your thread') -@extends('layouts.default', ['isTailwindUi' => true]) +@extends('layouts.default') @section('subnav')
diff --git a/resources/views/forum/threads/edit.blade.php b/resources/views/forum/threads/edit.blade.php index 07e5d475e..b9168d86a 100644 --- a/resources/views/forum/threads/edit.blade.php +++ b/resources/views/forum/threads/edit.blade.php @@ -1,6 +1,6 @@ @title('Edit your thread') -@extends('layouts.default', ['isTailwindUi' => true]) +@extends('layouts.default') @section('subnav')
diff --git a/resources/views/forum/threads/show.blade.php b/resources/views/forum/threads/show.blade.php index ca95c88d6..426e13c4d 100644 --- a/resources/views/forum/threads/show.blade.php +++ b/resources/views/forum/threads/show.blade.php @@ -1,7 +1,7 @@ @title($thread->subject()) @canonical(route('thread', $thread->slug())) -@extends('layouts.default', ['hasShadow' => true, 'isTailwindUi' => true]) +@extends('layouts.default', ['hasShadow' => true]) @section('subnav')
diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index 18414df22..1fb3261a1 100644 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -1,4 +1,4 @@ -@extends('layouts.base', ['bodyClass' => 'home', 'disableFooterAds' => true, 'isTailwindUi' => true]) +@extends('layouts.base', ['bodyClass' => 'home', 'disableFooterAds' => true]) @push('meta') diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php index 867d2fbc1..be3a8ef18 100644 --- a/resources/views/layouts/base.blade.php +++ b/resources/views/layouts/base.blade.php @@ -38,7 +38,7 @@ @livewireStyles - + @include('layouts._ads._banner') @include('layouts._nav') diff --git a/resources/views/replies/edit.blade.php b/resources/views/replies/edit.blade.php index f8dad4470..cf778094d 100644 --- a/resources/views/replies/edit.blade.php +++ b/resources/views/replies/edit.blade.php @@ -1,6 +1,6 @@ @title('Edit your reply') -@extends('layouts.default', ['isTailwindUi' => true]) +@extends('layouts.default') @section('subnav')
diff --git a/resources/views/users/settings/settings.blade.php b/resources/views/users/settings/settings.blade.php index c141bc9f7..3f059e25a 100644 --- a/resources/views/users/settings/settings.blade.php +++ b/resources/views/users/settings/settings.blade.php @@ -1,6 +1,6 @@ @title('Settings') -@extends('layouts.base', ['isTailwindUi' => true]) +@extends('layouts.base') @section('body')
From 65662838bf2804b2b87ba2365cd1146dafb556d2 Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Thu, 13 Jan 2022 20:48:45 +0000 Subject: [PATCH 2/8] Refactor login page --- resources/views/auth/login.blade.php | 86 ++++++++++++------- .../buttons/primary-button.blade.php | 8 +- .../buttons/secondary-button.blade.php | 8 +- .../forms/inputs/checkbox.blade.php | 15 ++++ resources/views/layouts/small.blade.php | 15 ++-- 5 files changed, 88 insertions(+), 44 deletions(-) create mode 100644 resources/views/components/forms/inputs/checkbox.blade.php diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index cd5ab2691..ad9198449 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -1,40 +1,62 @@ -@title('Login') +@title('Sign in to your account') @extends('layouts.small') @section('small-content') -
- @csrf - - @formGroup('username') - - - @error('username') - @endFormGroup - - @formGroup('password') - - - @error('password') - @endFormGroup - -
- + +
+ + +
- - - - - Github - - - -@endsection +
+ + + +
+ +
+ + Remember me + + + +
-@section('small-content-after') - Forgot your password? +
+ + Sign in + +
+
+ +
+
+
+
+
+ +
+ + Or continue with + +
+
+ +
+
+ + + + Sign in with GitHub + + +
+
+
@endsection diff --git a/resources/views/components/buttons/primary-button.blade.php b/resources/views/components/buttons/primary-button.blade.php index 712685e28..ca1d64aaa 100644 --- a/resources/views/components/buttons/primary-button.blade.php +++ b/resources/views/components/buttons/primary-button.blade.php @@ -1,10 +1,12 @@ - +@props(['fullWidth' => false]) + + @if ($attributes->has('href')) - merge(['class' => 'bg-lio-500 border border-transparent rounded py-2 px-4 inline-flex justify-center text-base text-white hover:bg-lio-600 font-medium']) }}> + merge(['class' => ($fullWidth ? 'w-full ' : '') . 'bg-lio-500 border border-transparent rounded py-2 px-4 inline-flex justify-center text-base text-white hover:bg-lio-600 font-medium']) }}> {{ $slot }} @else - @endif diff --git a/resources/views/components/buttons/secondary-button.blade.php b/resources/views/components/buttons/secondary-button.blade.php index 362d6cf1d..2a13b3948 100644 --- a/resources/views/components/buttons/secondary-button.blade.php +++ b/resources/views/components/buttons/secondary-button.blade.php @@ -1,10 +1,12 @@ - +@props(['fullWidth' => false]) + + @if ($attributes->has('href')) - merge(['class' => 'bg-white border border-gray-200 rounded py-2 px-4 inline-flex justify-center text-base text-gray-900 hover:bg-gray-100 font-medium']) }}> + merge(['class' => ($fullWidth ? 'w-full ' : '') . 'bg-white border border-gray-200 rounded py-2 px-4 inline-flex justify-center text-base text-gray-900 hover:bg-gray-100 font-medium']) }}> {{ $slot }} @else - @endif diff --git a/resources/views/components/forms/inputs/checkbox.blade.php b/resources/views/components/forms/inputs/checkbox.blade.php new file mode 100644 index 000000000..1d4e30ffd --- /dev/null +++ b/resources/views/components/forms/inputs/checkbox.blade.php @@ -0,0 +1,15 @@ +
+
+ + + +
+ + @if ($errors->has($name)) + @foreach ($errors->get($name) as $error) +

{{ $error }}

+ @endforeach + @endif +
\ No newline at end of file diff --git a/resources/views/layouts/small.blade.php b/resources/views/layouts/small.blade.php index 1225441a5..8d1752102 100644 --- a/resources/views/layouts/small.blade.php +++ b/resources/views/layouts/small.blade.php @@ -1,15 +1,18 @@ @extends('layouts.base') @section('body') -
-
-

{{ $title }}

-
+
+
+

+ {{ $title }} +

+
+ +
+
@include('layouts._alerts') @yield('small-content') - - @yield('small-content-after')
From af600e75d279ceb222d00e04de163d0a61e63a6c Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Thu, 13 Jan 2022 20:48:54 +0000 Subject: [PATCH 3/8] Refactor register page --- resources/views/auth/register.blade.php | 78 ++++++++++++------------- 1 file changed, 37 insertions(+), 41 deletions(-) diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index 46a0fe78e..256d0a71c 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -4,54 +4,50 @@ @section('small-content') @if (! session()->has('githubData')) -

To register, we require you to login with your Github account. After login you can choose your password in the settings screen.

+

To register, we require you to login with your GitHub account. After login you can choose your password in the settings screen.

- - - - Github + + + + Sign in with GitHub - + @else -
- @csrf - - @formGroup('name') - - - @error('name') - @endFormGroup - - @formGroup('email') - - - @error('email') - @endFormGroup - - @formGroup('username') - - - @error('username') - @endFormGroup - - @formGroup('rules') - - @error('rules') - - - @error('terms') - @endFormGroup + +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + I agree to the rules of the portal + +
+ +
+ + I agree to Terms & Conditions and Privacy Policy + +
- +
@endif @endsection From df5f819cdd72ca6e178df8d9c3c5b839e1e3cb4d Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Thu, 13 Jan 2022 20:52:27 +0000 Subject: [PATCH 4/8] Refactor verify page --- resources/views/auth/verify.blade.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/views/auth/verify.blade.php b/resources/views/auth/verify.blade.php index 2c8cd9fad..a748f53ef 100644 --- a/resources/views/auth/verify.blade.php +++ b/resources/views/auth/verify.blade.php @@ -7,9 +7,9 @@

If you did not receive the email, click below to request another.

-
- @csrf - - -
+ + + Request Another + + @endsection From 02ae3058ee0e6211a50cf7995630f1bcd9cae7b3 Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Thu, 13 Jan 2022 20:55:33 +0000 Subject: [PATCH 5/8] Refactor password reset page --- resources/views/auth/passwords/email.blade.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/resources/views/auth/passwords/email.blade.php b/resources/views/auth/passwords/email.blade.php index aadbb9459..20a8a5848 100644 --- a/resources/views/auth/passwords/email.blade.php +++ b/resources/views/auth/passwords/email.blade.php @@ -5,15 +5,15 @@ @section('small-content')

{{ Session::get('status', 'Please fill in your email address below.') }}

-
- @csrf + +
+ - @formGroup('email') - - - @error('email') - @endFormGroup + +
- - + + Send Password Reset Link + +
@endsection From c9c018661a3d6a5270638d4cf66f2cce15e352bf Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Thu, 13 Jan 2022 20:59:58 +0000 Subject: [PATCH 6/8] Refactor password reset page --- .../views/auth/passwords/reset.blade.php | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/resources/views/auth/passwords/reset.blade.php b/resources/views/auth/passwords/reset.blade.php index 6875b92eb..bbe3f3bfb 100644 --- a/resources/views/auth/passwords/reset.blade.php +++ b/resources/views/auth/passwords/reset.blade.php @@ -3,27 +3,29 @@ @extends('layouts.small') @section('small-content') -
- @csrf + - @formGroup('email') - - - @error('email') - @endFormGroup - - @formGroup('password') - - - @error('password') - @endFormGroup - -
- - +
+ + + +
+ +
+ + + +
+ +
+ + +
- - + + Reset Password + + @endsection From f1bf607f0be534ae46fbb9f6b5cfaf5301d0fedb Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Thu, 13 Jan 2022 21:10:16 +0000 Subject: [PATCH 7/8] Update formatting --- resources/views/auth/login.blade.php | 8 ++++---- resources/views/auth/passwords/email.blade.php | 4 ++-- resources/views/auth/passwords/reset.blade.php | 8 ++++---- resources/views/auth/register.blade.php | 14 ++++++++------ 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index ad9198449..73550b960 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -3,17 +3,17 @@ @extends('layouts.small') @section('small-content') - +
- +
- +
@@ -29,7 +29,7 @@
- + Sign in
diff --git a/resources/views/auth/passwords/email.blade.php b/resources/views/auth/passwords/email.blade.php index 20a8a5848..cb730ed6d 100644 --- a/resources/views/auth/passwords/email.blade.php +++ b/resources/views/auth/passwords/email.blade.php @@ -9,10 +9,10 @@
- +
- + Send Password Reset Link
diff --git a/resources/views/auth/passwords/reset.blade.php b/resources/views/auth/passwords/reset.blade.php index bbe3f3bfb..1f2be51b8 100644 --- a/resources/views/auth/passwords/reset.blade.php +++ b/resources/views/auth/passwords/reset.blade.php @@ -9,22 +9,22 @@
- +
- +
- +
- + Reset Password
diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index 256d0a71c..272f09128 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -13,7 +13,7 @@ @else - +
@@ -23,31 +23,33 @@
- +
- +
- + + Register + @endif @endsection From c671b68e04ee6e2c26d149f5d7353a81e65b86d9 Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Thu, 13 Jan 2022 21:25:01 +0000 Subject: [PATCH 8/8] Update tests --- tests/Feature/AuthTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/Feature/AuthTest.php b/tests/Feature/AuthTest.php index d70e5296d..b84de7c12 100644 --- a/tests/Feature/AuthTest.php +++ b/tests/Feature/AuthTest.php @@ -103,7 +103,7 @@ $this->visit('/login') ->type('johndoe', 'username') ->type('password', 'password') - ->press('Login') + ->press('Sign in') ->seePageIs('/user/johndoe') ->see('John Doe'); }); @@ -112,7 +112,7 @@ $this->createUser(); $this->visit('/login') - ->press('Login') + ->press('Sign in') ->seePageIs('/login') ->see('The username field is required.') ->see('The password field is required.'); @@ -124,7 +124,7 @@ $this->visit('/login') ->type('johndoe', 'username') ->type('invalidpass', 'password') - ->press('Login') + ->press('Sign in') ->seePageIs('/login') ->see('These credentials do not match our records.'); }); @@ -135,7 +135,7 @@ $this->visit('/login') ->type('johndoe', 'username') ->type('password', 'password') - ->press('Login') + ->press('Sign in') ->seePageIs('/') ->see('This account is banned.'); }); @@ -177,7 +177,7 @@ ->visit('/login') ->type('johndoe', 'username') ->type('QFq^$cz#P@MZa5z7', 'password') - ->press('Login') + ->press('Sign in') ->seePageIs('/user/johndoe'); });