From c7ba81eb83bbb84eb452fe287a1ec902316ee578 Mon Sep 17 00:00:00 2001 From: Nasir Khan Saikat Date: Fri, 11 Oct 2024 02:11:03 +0600 Subject: [PATCH 1/3] code cleanup --- resources/views/backend/users/create.blade.php | 2 +- resources/views/components/backend/layouts/create.blade.php | 2 +- resources/views/components/backend/layouts/edit.blade.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/backend/users/create.blade.php b/resources/views/backend/users/create.blade.php index 2837200aa..9d44be503 100644 --- a/resources/views/backend/users/create.blade.php +++ b/resources/views/backend/users/create.blade.php @@ -28,7 +28,7 @@ class="text-muted">{{ __($module_action) }}
- {{ html()->form('POST', route("backend.$module_name.store"))->class('form')->acceptsFiles()->open() }} + {{ html()->form('POST', route("backend.$module_name.store"))->acceptsFiles()->open() }}
diff --git a/resources/views/components/backend/layouts/create.blade.php b/resources/views/components/backend/layouts/create.blade.php index ee37fb401..9861bf71c 100644 --- a/resources/views/components/backend/layouts/create.blade.php +++ b/resources/views/components/backend/layouts/create.blade.php @@ -11,7 +11,7 @@
- {{ html()->form('POST', route("backend.$module_name.store"))->class('form')->acceptsFiles()->open() }} + {{ html()->form('POST', route("backend.$module_name.store"))->acceptsFiles()->open() }} @include ("$module_path.$module_name.form") diff --git a/resources/views/components/backend/layouts/edit.blade.php b/resources/views/components/backend/layouts/edit.blade.php index 33f7b1678..9219b7bb6 100644 --- a/resources/views/components/backend/layouts/edit.blade.php +++ b/resources/views/components/backend/layouts/edit.blade.php @@ -11,7 +11,7 @@
- {{ html()->modelForm($data, 'PATCH', route("backend.$module_name.update", $data))->class('form')->acceptsFiles()->open() }} + {{ html()->modelForm($data, 'PATCH', route("backend.$module_name.update", $data))->acceptsFiles()->open() }} @include ("$module_path.$module_name.form") From 78217ed09ddd8cfcf740a6f806bf857c0698f75c Mon Sep 17 00:00:00 2001 From: Nasir Khan Saikat Date: Mon, 14 Oct 2024 01:25:30 +0600 Subject: [PATCH 2/3] prettier formatter added, code format --- .prettierignore | 10 + .prettierrc | 15 + .../views/backend/categories/create.blade.php | 20 +- .../views/backend/categories/edit.blade.php | 21 +- .../views/backend/categories/form.blade.php | 59 +-- .../views/backend/categories/trash.blade.php | 13 +- .../views/frontend/categories/show.blade.php | 2 - .../views/backend/posts/form.blade.php | 1 - .../views/backend/posts/trash.blade.php | 4 +- .../views/backend/tags/create.blade.php | 20 +- .../views/backend/tags/edit.blade.php | 21 +- .../views/backend/tags/form.blade.php | 48 +- .../views/backend/tags/trash.blade.php | 15 +- .../views/frontend/tags/show.blade.php | 1 - package.json | 6 +- .../views/auth/confirm-password.blade.php | 6 +- .../views/auth/forgot-password.blade.php | 3 +- resources/views/auth/register.blade.php | 20 +- resources/views/auth/reset-password.blade.php | 11 +- resources/views/auth/verify-email.blade.php | 3 +- .../views/backend/backups/backups.blade.php | 168 +++---- .../backend/includes/action_column.blade.php | 8 +- .../backend/includes/activitylog.blade.php | 105 +++-- .../includes/dashboard_demo_data.blade.php | 41 +- .../views/backend/includes/header.blade.php | 7 +- .../views/backend/includes/show.blade.php | 24 +- .../views/backend/includes/sidebar.blade.php | 66 +-- .../backend/includes/user_actions.blade.php | 24 +- .../backend/includes/user_roles.blade.php | 4 +- resources/views/backend/index.blade.php | 42 +- .../views/backend/layouts/app-copy.blade.php | 14 +- resources/views/backend/layouts/app.blade.php | 112 ++--- .../backend/notifications/index.blade.php | 168 +++---- .../backend/notifications/show.blade.php | 128 ++--- resources/views/backend/roles/edit.blade.php | 2 +- resources/views/backend/roles/show.blade.php | 7 +- .../backend/settings/fields/email.blade.php | 21 +- .../backend/settings/fields/number.blade.php | 21 +- .../backend/settings/fields/select.blade.php | 20 +- .../backend/settings/fields/text.blade.php | 21 +- .../settings/fields/textarea.blade.php | 37 +- .../views/backend/settings/index.blade.php | 46 +- .../backend/users/index_datatable.blade.php | 152 +++--- resources/views/backend/users/show.blade.php | 3 +- .../components/application-logo.blade.php | 2 +- .../components/auth-social-login.blade.php | 50 +- .../backend/breadcrumb-item.blade.php | 30 +- .../components/backend/breadcrumbs.blade.php | 5 +- .../backend/buttons/cancel.blade.php | 6 +- .../backend/buttons/create.blade.php | 4 +- .../components/backend/buttons/edit.blade.php | 4 +- .../backend/buttons/return-back.blade.php | 6 +- .../components/backend/buttons/save.blade.php | 4 +- .../backend/includes/header.blade.php | 6 +- .../backend/includes/menu-user.blade.php | 7 +- .../backend/layouts/create.blade.php | 65 +-- .../components/backend/layouts/edit.blade.php | 72 +-- .../components/backend/layouts/show.blade.php | 44 +- .../backend/layouts/trash.blade.php | 3 +- .../components/backend/page-wrapper.blade.php | 1 - .../backend/section-footer.blade.php | 2 +- .../backend/section-header.blade.php | 9 +- .../backend/section-show-table.blade.php | 26 +- resources/views/components/button-a.blade.php | 3 +- resources/views/components/button.blade.php | 3 +- .../views/components/buttons/cancel.blade.php | 5 +- .../views/components/buttons/create.blade.php | 28 +- .../views/components/buttons/edit.blade.php | 28 +- .../components/buttons/return-back.blade.php | 5 +- .../views/components/buttons/show.blade.php | 28 +- .../views/components/danger-button.blade.php | 3 +- .../views/components/dropdown-link.blade.php | 3 +- resources/views/components/dropdown.blade.php | 49 +- .../views/components/frontend/card.blade.php | 23 +- .../frontend/flash-message.blade.php | 53 ++- .../frontend/footer-credit.blade.php | 2 +- .../components/frontend/nav-item.blade.php | 6 +- .../components/google-analytics.blade.php | 29 +- .../views/components/layouts/app.blade.php | 12 +- .../components/library/lightbox.blade.php | 10 +- .../components/library/select2.blade.php | 32 +- resources/views/components/modal.blade.php | 105 ++--- resources/views/components/nav-link.blade.php | 3 +- .../views/components/primary-button.blade.php | 3 +- .../components/responsive-nav-link.blade.php | 3 +- .../components/secondary-button.blade.php | 3 +- .../views/components/selected-theme.blade.php | 9 +- .../views/components/text-input.blade.php | 5 +- .../views/frontend/includes/errors.blade.php | 22 +- .../views/frontend/includes/footer.blade.php | 6 +- .../frontend/includes/messages.blade.php | 24 +- .../views/frontend/includes/meta.blade.php | 69 ++- .../views/frontend/layouts/app.blade.php | 64 +-- .../frontend/users/profileEdit.blade.php | 1 - resources/views/layouts/app.blade.php | 57 +-- resources/views/layouts/guest.blade.php | 46 +- resources/views/layouts/navigation.blade.php | 26 +- resources/views/livewire/privacy.blade.php | 3 +- .../views/livewire/users-index.blade.php | 3 +- .../partials/delete-user-form.blade.php | 15 +- .../partials/update-password-form.blade.php | 18 +- .../update-profile-information-form.blade.php | 20 +- yarn.lock | 439 +++++++++++++++++- 103 files changed, 1866 insertions(+), 1286 deletions(-) create mode 100644 .prettierignore create mode 100644 .prettierrc diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..1fd4782f5 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,10 @@ +node_modules +dist +.env* +vendor/ +/vendor +public/ +.git +**/.git +package-lock.json +composer.lock \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..baa60171c --- /dev/null +++ b/.prettierrc @@ -0,0 +1,15 @@ +{ + "printWidth": 120, + "semi": true, + "tabWidth": 4, + "trailingComma": "all", + "plugins": ["@shufo/prettier-plugin-blade", "prettier-plugin-tailwindcss"], + "overrides": [ + { + "files": ["*.blade.php"], + "options": { + "parser": "blade" + } + } + ] +} diff --git a/Modules/Category/Resources/views/backend/categories/create.blade.php b/Modules/Category/Resources/views/backend/categories/create.blade.php index e18f963ba..2b59040b1 100644 --- a/Modules/Category/Resources/views/backend/categories/create.blade.php +++ b/Modules/Category/Resources/views/backend/categories/create.blade.php @@ -1,16 +1,18 @@ @extends('backend.layouts.app') -@section('title') {{ __($module_action) }} {{ __($module_title) }} @endsection +@section('title') + {{ __($module_action) }} {{ __($module_title) }} +@endsection @section('breadcrumbs') - - - {{ __($module_title) }} - - {{ __($module_action) }} - + + + {{ __($module_title) }} + + {{ __($module_action) }} + @endsection @section('content') - -@endsection \ No newline at end of file + +@endsection diff --git a/Modules/Category/Resources/views/backend/categories/edit.blade.php b/Modules/Category/Resources/views/backend/categories/edit.blade.php index 96d75290c..b384b3335 100644 --- a/Modules/Category/Resources/views/backend/categories/edit.blade.php +++ b/Modules/Category/Resources/views/backend/categories/edit.blade.php @@ -1,16 +1,19 @@ @extends('backend.layouts.app') -@section('title') {{ __($module_action) }} {{ __($module_title) }} @endsection +@section('title') + {{ __($module_action) }} {{ __($module_title) }} +@endsection @section('breadcrumbs') - - - {{ __($module_title) }} - - {{ __($module_action) }} - + + + {{ __($module_title) }} + + {{ __($module_action) }} + @endsection @section('content') - -@endsection \ No newline at end of file + +@endsection diff --git a/Modules/Category/Resources/views/backend/categories/form.blade.php b/Modules/Category/Resources/views/backend/categories/form.blade.php index 6117af248..5f85ab65b 100644 --- a/Modules/Category/Resources/views/backend/categories/form.blade.php +++ b/Modules/Category/Resources/views/backend/categories/form.blade.php @@ -5,7 +5,7 @@ $field_name = 'name'; $field_lable = label_case($field_name); $field_placeholder = $field_lable; - $required = "required"; + $required = 'required'; ?> {{ html()->label($field_lable, $field_name)->class('form-label') }} {!! field_required($required) !!} {{ html()->text($field_name)->placeholder($field_placeholder)->class('form-control')->attributes(["$required"]) }} @@ -17,7 +17,7 @@ $field_name = 'slug'; $field_lable = label_case($field_name); $field_placeholder = $field_lable; - $required = ""; + $required = ''; ?> {{ html()->label($field_lable, $field_name)->class('form-label') }} {!! field_required($required) !!} {{ html()->text($field_name)->placeholder($field_placeholder)->class('form-control')->attributes(["$required"]) }} @@ -29,7 +29,7 @@ $field_name = 'group_name'; $field_lable = label_case($field_name); $field_placeholder = $field_lable; - $required = ""; + $required = ''; ?> {{ html()->label($field_lable, $field_name)->class('form-label') }} {!! field_required($required) !!} {{ html()->text($field_name)->placeholder($field_placeholder)->class('form-control')->attributes(["$required"]) }} @@ -43,31 +43,34 @@ $field_name = 'image'; $field_lable = label_case($field_name); $field_placeholder = $field_lable; - $required = ""; + $required = ''; ?> {{ html()->label($field_lable, $field_name)->class('form-label') }} {!! field_required($required) !!} - {{ html()->input("file", $field_name)->class('form-control')->attributes(["$required"]) }} + {{ html()->input('file', $field_name)->class('form-control')->attributes(["$required"]) }}
- @if($data && $data->getMedia($module_name)->first()) -
-
-
- - - - -
-
- - + @if ($data && $data->getMedia($module_name)->first()) +
+
+
+ + + + +
+
+ + +
-
- + @endif
@@ -77,7 +80,7 @@ $field_name = 'description'; $field_lable = label_case($field_name); $field_placeholder = $field_lable; - $required = ""; + $required = ''; ?> {{ html()->label($field_lable, $field_name)->class('form-label') }} {!! field_required($required) !!} {{ html()->textarea($field_name)->placeholder($field_placeholder)->class('form-control')->attributes(["$required"]) }} @@ -92,7 +95,7 @@ $field_name = 'meta_title'; $field_lable = label_case($field_name); $field_placeholder = $field_lable; - $required = ""; + $required = ''; ?> {{ html()->label($field_lable, $field_name)->class('form-label') }} {!! field_required($required) !!} {{ html()->text($field_name)->placeholder($field_placeholder)->class('form-control')->attributes(["$required"]) }} @@ -104,7 +107,7 @@ $field_name = 'meta_keyword'; $field_lable = label_case($field_name); $field_placeholder = $field_lable; - $required = ""; + $required = ''; ?> {{ html()->label($field_lable, $field_name)->class('form-label') }} {!! field_required($required) !!} {{ html()->text($field_name)->placeholder($field_placeholder)->class('form-control')->attributes(["$required"]) }} @@ -116,7 +119,7 @@ $field_name = 'meta_description'; $field_lable = label_case($field_name); $field_placeholder = $field_lable; - $required = ""; + $required = ''; ?> {{ html()->label($field_lable, $field_name)->class('form-label') }} {!! field_required($required) !!} {{ html()->text($field_name)->placeholder($field_placeholder)->class('form-control')->attributes(["$required"]) }} @@ -130,12 +133,12 @@ {{ html()->label($field_lable, $field_name)->class('form-label') }} {!! field_required($required) !!} {{ html()->select($field_name, $select_options)->class('form-select')->attributes(["$required"]) }}
-
\ No newline at end of file +
diff --git a/Modules/Category/Resources/views/backend/categories/trash.blade.php b/Modules/Category/Resources/views/backend/categories/trash.blade.php index cc895031c..33aa1fc68 100644 --- a/Modules/Category/Resources/views/backend/categories/trash.blade.php +++ b/Modules/Category/Resources/views/backend/categories/trash.blade.php @@ -1,13 +1,16 @@ @extends ('backend.layouts.app') -@section('title') {{ __($module_action) }} {{ __($module_title) }} @endsection +@section('title') + {{ __($module_action) }} {{ __($module_title) }} +@endsection @section('breadcrumbs') - - {{ __($module_title) }} - + + {{ __($module_title) }} + @endsection @section('content') - + @endsection diff --git a/Modules/Category/Resources/views/frontend/categories/show.blade.php b/Modules/Category/Resources/views/frontend/categories/show.blade.php index 1bce93da9..d9f972243 100644 --- a/Modules/Category/Resources/views/frontend/categories/show.blade.php +++ b/Modules/Category/Resources/views/frontend/categories/show.blade.php @@ -20,8 +20,6 @@

- -
diff --git a/Modules/Post/Resources/views/backend/posts/form.blade.php b/Modules/Post/Resources/views/backend/posts/form.blade.php index 4171ffa85..0c69624f3 100644 --- a/Modules/Post/Resources/views/backend/posts/form.blade.php +++ b/Modules/Post/Resources/views/backend/posts/form.blade.php @@ -260,7 +260,6 @@
- @push('after-styles') @livewireStyles - + @stack('after-styles') @@ -73,10 +73,10 @@ @livewireScripts - + @stack('after-scripts') - \ No newline at end of file + diff --git a/resources/views/backend/layouts/app.blade.php b/resources/views/backend/layouts/app.blade.php index 2b0794b78..bcf1cf393 100644 --- a/resources/views/backend/layouts/app.blade.php +++ b/resources/views/backend/layouts/app.blade.php @@ -1,82 +1,82 @@ - - - - - - - - + + + + + + + + - - - + + + - - + + - @yield('title') | {{ config('app.name') }} + @yield('title') | {{ config('app.name') }} - + - @vite(['resources/sass/app-backend.scss', 'resources/js/app-backend.js']) + @vite(['resources/sass/app-backend.scss', 'resources/js/app-backend.js']) - - - + + + - @stack('after-styles') + @stack('after-styles') - + - @livewireStyles + @livewireStyles - + - - - - - @include('backend.includes.sidebar') - + + -
- - {{-- header --}} - @include('backend.includes.header') - -
-
+ + @include('backend.includes.sidebar') + - @include('flash::message') +
- - @include('backend.includes.errors') - + {{-- header --}} + @include('backend.includes.header') - - @yield('content') - +
+
-
-
+ @include('flash::message') - {{-- Footer block --}} - + + @include('backend.includes.errors') + + + + @yield('content') + + +
- - @livewireScripts + {{-- Footer block --}} + +
+ + + @livewireScripts - @stack('after-scripts') - + @stack('after-scripts') + - + diff --git a/resources/views/backend/notifications/index.blade.php b/resources/views/backend/notifications/index.blade.php index 1710bb538..524348a81 100644 --- a/resources/views/backend/notifications/index.blade.php +++ b/resources/views/backend/notifications/index.blade.php @@ -1,96 +1,106 @@ @extends('backend.layouts.app') -@section('title') {{ __($module_action) }} {{ __($module_title) }} @endsection +@section('title') + {{ __($module_action) }} {{ __($module_title) }} +@endsection @section('breadcrumbs') - - {{ __($module_title) }} - + + {{ __($module_title) }} + @endsection @section('content') -
-
- - {{ __($module_title) }} - @if ($unread_notifications_count) - (@lang(":count unread", ['count'=>$unread_notifications_count])) - @endif - {{ __($module_action) }} +
+
+ + {{ __($module_title) }} + @if ($unread_notifications_count) + (@lang(':count unread', ['count' => $unread_notifications_count])) + @endif + {{ __($module_action) }} - - @lang('Mark all as read') - - - + + + @lang('Mark all as read') + + + -
-
- - - - - - - - - +
+
+
- @lang('Text') - - @lang('Module') - - @lang('Updated At') - - @lang('Action') -
+ + + + + + + + - - @foreach($$module_name as $module_name_singular) - read_at == '') { - $row_class = 'table-info'; - $span_class = 'font-weight-bold'; - } - ?> - - - - - - - @endforeach - -
+ @lang('Text') + + @lang('Module') + + @lang('Updated At') + + @lang('Action') +
- id) }}"> - - {{ $module_name_singular->data['title'] }} - - - - {{ $module_name_singular->data['module'] }} - - {{ $module_name_singular->updated_at->diffForHumans() }} - - -
+ + @foreach ($$module_name as $module_name_singular) + read_at == '') { + $row_class = 'table-info'; + $span_class = 'font-weight-bold'; + } + ?> + + + id) }}"> + + {{ $module_name_singular->data['title'] }} + + + + + {{ $module_name_singular->data['module'] }} + + + {{ $module_name_singular->updated_at->diffForHumans() }} + + + + + + @endforeach + + +
-
-