From 1666a9c638e0d571112f49e07ee3b5742f29d9bd Mon Sep 17 00:00:00 2001 From: Amir Date: Tue, 8 Nov 2022 16:51:38 +0400 Subject: [PATCH 1/3] Implementation of Preline framework --- app/Http/Controllers/Admin/Temp.php | 85 +++++ app/Http/Livewire/Admin/Dashboard.php | 14 + app/Http/Livewire/Layout/Header.php | 14 + app/Http/Livewire/Layout/Navigation.php | 13 + app/Http/Livewire/Layout/Sidebar.php | 13 + app/Http/Livewire/Layout/Toggle.php | 13 + app/View/Components/Layout/Content.php | 28 ++ app/View/Components/Layout/DarkmodeToggle.php | 28 ++ .../Components/Layout/DropdownIconLink.php | 28 ++ app/View/Components/Layout/LogoOnSidebar.php | 28 ++ .../Layout/NavigationDropdownRight.php | 28 ++ app/View/Components/Svg/Gear.php | 28 ++ app/View/Components/Svg/Profile.php | 28 ++ config/livewire.php | 158 +++++++++ .../views/components/layout/content.blade.php | 3 + .../layout/dropdown-icon-link.blade.php | 3 + .../navigation-darkmode-toggle.blade.php | 26 ++ .../navigation-dropdown-right.blade.php | 62 ++++ .../navigation-logo-on-sidebar.blade.php | 8 + resources/views/components/svg/gear.blade.php | 4 + .../views/components/svg/profile.blade.php | 3 + .../views/livewire/admin/dashboard.blade.php | 14 + .../views/livewire/layout/header.blade.php | 6 + .../layout/navigation-toggle.blade.php | 65 ++++ .../views/livewire/layout/sidebar.blade.php | 299 ++++++++++++++++++ 25 files changed, 999 insertions(+) create mode 100644 app/Http/Controllers/Admin/Temp.php create mode 100644 app/Http/Livewire/Admin/Dashboard.php create mode 100644 app/Http/Livewire/Layout/Header.php create mode 100644 app/Http/Livewire/Layout/Navigation.php create mode 100644 app/Http/Livewire/Layout/Sidebar.php create mode 100644 app/Http/Livewire/Layout/Toggle.php create mode 100644 app/View/Components/Layout/Content.php create mode 100644 app/View/Components/Layout/DarkmodeToggle.php create mode 100644 app/View/Components/Layout/DropdownIconLink.php create mode 100644 app/View/Components/Layout/LogoOnSidebar.php create mode 100644 app/View/Components/Layout/NavigationDropdownRight.php create mode 100644 app/View/Components/Svg/Gear.php create mode 100644 app/View/Components/Svg/Profile.php create mode 100644 config/livewire.php create mode 100644 resources/views/components/layout/content.blade.php create mode 100644 resources/views/components/layout/dropdown-icon-link.blade.php create mode 100644 resources/views/components/layout/navigation-darkmode-toggle.blade.php create mode 100644 resources/views/components/layout/navigation-dropdown-right.blade.php create mode 100644 resources/views/components/layout/navigation-logo-on-sidebar.blade.php create mode 100644 resources/views/components/svg/gear.blade.php create mode 100644 resources/views/components/svg/profile.blade.php create mode 100644 resources/views/livewire/admin/dashboard.blade.php create mode 100644 resources/views/livewire/layout/header.blade.php create mode 100644 resources/views/livewire/layout/navigation-toggle.blade.php create mode 100644 resources/views/livewire/layout/sidebar.blade.php diff --git a/app/Http/Controllers/Admin/Temp.php b/app/Http/Controllers/Admin/Temp.php new file mode 100644 index 0000000..793aae8 --- /dev/null +++ b/app/Http/Controllers/Admin/Temp.php @@ -0,0 +1,85 @@ +$this->pageHeader]); + } +} diff --git a/app/Http/Livewire/Layout/Header.php b/app/Http/Livewire/Layout/Header.php new file mode 100644 index 0000000..afeae94 --- /dev/null +++ b/app/Http/Livewire/Layout/Header.php @@ -0,0 +1,14 @@ + 'App\\Http\\Livewire', + + /* + |-------------------------------------------------------------------------- + | View Path + |-------------------------------------------------------------------------- + | + | This value sets the path for Livewire component views. This affects + | file manipulation helper commands like `artisan make:livewire`. + | + */ + + 'view_path' => resource_path('views/livewire'), + + /* + |-------------------------------------------------------------------------- + | Layout + |-------------------------------------------------------------------------- + | The default layout view that will be used when rendering a component via + | Route::get('/some-endpoint', SomeComponent::class);. In this case the + | the view returned by SomeComponent will be wrapped in "layouts.app" + | + */ + + 'layout' => 'layouts.app', + + /* + |-------------------------------------------------------------------------- + | Livewire Assets URL + |-------------------------------------------------------------------------- + | + | This value sets the path to Livewire JavaScript assets, for cases where + | your app's domain root is not the correct path. By default, Livewire + | will load its JavaScript assets from the app's "relative root". + | + | Examples: "/assets", "myurl.com/app". + | + */ + + 'asset_url' => null, + + /* + |-------------------------------------------------------------------------- + | Livewire App URL + |-------------------------------------------------------------------------- + | + | This value should be used if livewire assets are served from CDN. + | Livewire will communicate with an app through this url. + | + | Examples: "https://my-app.com", "myurl.com/app". + | + */ + + 'app_url' => null, + + /* + |-------------------------------------------------------------------------- + | Livewire Endpoint Middleware Group + |-------------------------------------------------------------------------- + | + | This value sets the middleware group that will be applied to the main + | Livewire "message" endpoint (the endpoint that gets hit everytime + | a Livewire component updates). It is set to "web" by default. + | + */ + + 'middleware_group' => 'web', + + /* + |-------------------------------------------------------------------------- + | Livewire Temporary File Uploads Endpoint Configuration + |-------------------------------------------------------------------------- + | + | Livewire handles file uploads by storing uploads in a temporary directory + | before the file is validated and stored permanently. All file uploads + | are directed to a global endpoint for temporary storage. The config + | items below are used for customizing the way the endpoint works. + | + */ + + 'temporary_file_upload' => [ + 'disk' => null, // Example: 'local', 's3' Default: 'default' + 'rules' => null, // Example: ['file', 'mimes:png,jpg'] Default: ['required', 'file', 'max:12288'] (12MB) + 'directory' => null, // Example: 'tmp' Default 'livewire-tmp' + 'middleware' => null, // Example: 'throttle:5,1' Default: 'throttle:60,1' + 'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs. + 'png', 'gif', 'bmp', 'svg', 'wav', 'mp4', + 'mov', 'avi', 'wmv', 'mp3', 'm4a', + 'jpg', 'jpeg', 'mpga', 'webp', 'wma', + ], + 'max_upload_time' => 5, // Max duration (in minutes) before an upload gets invalidated. + ], + + /* + |-------------------------------------------------------------------------- + | Manifest File Path + |-------------------------------------------------------------------------- + | + | This value sets the path to the Livewire manifest file. + | The default should work for most cases (which is + | "/bootstrap/cache/livewire-components.php"), but for specific + | cases like when hosting on Laravel Vapor, it could be set to a different value. + | + | Example: for Laravel Vapor, it would be "/tmp/storage/bootstrap/cache/livewire-components.php". + | + */ + + 'manifest_path' => null, + + /* + |-------------------------------------------------------------------------- + | Back Button Cache + |-------------------------------------------------------------------------- + | + | This value determines whether the back button cache will be used on pages + | that contain Livewire. By disabling back button cache, it ensures that + | the back button shows the correct state of components, instead of + | potentially stale, cached data. + | + | Setting it to "false" (default) will disable back button cache. + | + */ + + 'back_button_cache' => false, + + /* + |-------------------------------------------------------------------------- + | Render On Redirect + |-------------------------------------------------------------------------- + | + | This value determines whether Livewire will render before it's redirected + | or not. Setting it to "false" (default) will mean the render method is + | skipped when redirecting. And "true" will mean the render method is + | run before redirecting. Browsers bfcache can store a potentially + | stale view if render is skipped on redirect. + | + */ + + 'render_on_redirect' => false, + +]; diff --git a/resources/views/components/layout/content.blade.php b/resources/views/components/layout/content.blade.php new file mode 100644 index 0000000..ad5eb57 --- /dev/null +++ b/resources/views/components/layout/content.blade.php @@ -0,0 +1,3 @@ +
+ {{$slot}} +
diff --git a/resources/views/components/layout/dropdown-icon-link.blade.php b/resources/views/components/layout/dropdown-icon-link.blade.php new file mode 100644 index 0000000..14b95d8 --- /dev/null +++ b/resources/views/components/layout/dropdown-icon-link.blade.php @@ -0,0 +1,3 @@ +merge(['class' => 'flex items-center gap-x-3.5 py-2 px-3 rounded-md text-sm text-slate-800 hover:bg-slate-100 focus:ring-2 focus:ring-blue-500 dark:text-slate-400 dark:hover:bg-oblue-100/[0.3] dark:hover:text-slate-300'])}} href="#"> +{{$slot}} + diff --git a/resources/views/components/layout/navigation-darkmode-toggle.blade.php b/resources/views/components/layout/navigation-darkmode-toggle.blade.php new file mode 100644 index 0000000..9c8fc5e --- /dev/null +++ b/resources/views/components/layout/navigation-darkmode-toggle.blade.php @@ -0,0 +1,26 @@ +
+ +
diff --git a/resources/views/components/layout/navigation-dropdown-right.blade.php b/resources/views/components/layout/navigation-dropdown-right.blade.php new file mode 100644 index 0000000..3dbee1f --- /dev/null +++ b/resources/views/components/layout/navigation-dropdown-right.blade.php @@ -0,0 +1,62 @@ +
+ @if (Laravel\Jetstream\Jetstream::managesProfilePhotos()) + + @else + + + + @endif + + +
diff --git a/resources/views/components/layout/navigation-logo-on-sidebar.blade.php b/resources/views/components/layout/navigation-logo-on-sidebar.blade.php new file mode 100644 index 0000000..ad69b5f --- /dev/null +++ b/resources/views/components/layout/navigation-logo-on-sidebar.blade.php @@ -0,0 +1,8 @@ +
+ +
diff --git a/resources/views/components/svg/gear.blade.php b/resources/views/components/svg/gear.blade.php new file mode 100644 index 0000000..fe8278e --- /dev/null +++ b/resources/views/components/svg/gear.blade.php @@ -0,0 +1,4 @@ +merge(['class' => 'flex-none']) }} xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" > + + + diff --git a/resources/views/components/svg/profile.blade.php b/resources/views/components/svg/profile.blade.php new file mode 100644 index 0000000..a178155 --- /dev/null +++ b/resources/views/components/svg/profile.blade.php @@ -0,0 +1,3 @@ +merge(['class' => 'flex-none']) }} xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" > + + diff --git a/resources/views/livewire/admin/dashboard.blade.php b/resources/views/livewire/admin/dashboard.blade.php new file mode 100644 index 0000000..382abdc --- /dev/null +++ b/resources/views/livewire/admin/dashboard.blade.php @@ -0,0 +1,14 @@ +
+ @livewire('layout.navigation') + @livewire('layout.toggle') + @livewire('layout.sidebar') + @livewire('layout.header',['header'=>$pageHeader]) + + + +
+ Some quick example text to build on the card title and make up the bulk of the card's content. +
+
+ +
diff --git a/resources/views/livewire/layout/header.blade.php b/resources/views/livewire/layout/header.blade.php new file mode 100644 index 0000000..afd997e --- /dev/null +++ b/resources/views/livewire/layout/header.blade.php @@ -0,0 +1,6 @@ + +
+
+ {{ $header }} +
+
diff --git a/resources/views/livewire/layout/navigation-toggle.blade.php b/resources/views/livewire/layout/navigation-toggle.blade.php new file mode 100644 index 0000000..4d20ea5 --- /dev/null +++ b/resources/views/livewire/layout/navigation-toggle.blade.php @@ -0,0 +1,65 @@ +{{--
--}} +{{-- --}} +{{--
--}} +{{--
--}} +{{-- --}} +{{-- --}} +{{-- --}} + +{{-- --}} +{{--
    --}} +{{--
  1. --}} +{{-- OMJ--}} +{{-- --}} +{{-- --}} +{{-- --}} +{{--
  2. --}} +{{--
  3. --}} +{{-- Dashboard--}} +{{--
  4. --}} +{{--
--}} +{{-- --}} +{{--
--}} +{{--
--}} +{{-- --}} +{{--
--}} + + + + +
+
+
+ + + + + +
    +
  1. + Application Layout + + + +
  2. +
  3. + Dashboard +
  4. +
+ +
+
+ + +
diff --git a/resources/views/livewire/layout/sidebar.blade.php b/resources/views/livewire/layout/sidebar.blade.php new file mode 100644 index 0000000..ba41319 --- /dev/null +++ b/resources/views/livewire/layout/sidebar.blade.php @@ -0,0 +1,299 @@ +
+ + + + + +
From baccbc088fd1728976bc07a2acfd46cc509fcd31 Mon Sep 17 00:00:00 2001 From: Amir Date: Wed, 9 Nov 2022 15:51:10 +0400 Subject: [PATCH 2/3] Adding Preline Button, Modal Components with Menu table database --- app/Http/Livewire/Admin/Menu.php | 14 + app/Http/Livewire/Admin/Profile.php | 22 + app/Http/Livewire/Layout/Sidebar.php | 40 +- app/Models/Menu.php | 11 + app/View/Components/Item/Button.php | 28 + app/View/Components/Item/Modal.php | 28 + .../Layout/Sidebar/ArrowDirection.php | 28 + .../Components/Layout/Sidebar/ChildOne.php | 29 ++ .../Components/Layout/Sidebar/ChildTwo.php | 28 + app/View/Components/Layout/Sidebar/SubOne.php | 28 + app/View/Components/Svg/Add.php | 28 + app/View/Components/Svg/Home.php | 28 + app/View/Components/Svg/Menu.php | 28 + app/View/Components/Svg/Users.php | 28 + .../2022_11_09_085026_create_menus_table.php | 33 ++ resources/js/components/main.js | 5 +- .../views/components/item/button.blade.php | 26 + .../views/components/item/modal.blade.php | 115 +++++ .../layout/sidebar/arrow-direction.blade.php | 17 + .../layout/sidebar/child-one.blade.php | 54 ++ .../layout/sidebar/child-two.blade.php | 13 + .../layout/sidebar/parent.blade.php | 5 + resources/views/components/svg/add.blade.php | 3 + resources/views/components/svg/gear.blade.php | 5 +- resources/views/components/svg/home.blade.php | 7 + resources/views/components/svg/menu.blade.php | 4 + resources/views/components/svg/nav.blade.php | 0 .../views/components/svg/users.blade.php | 5 + resources/views/layouts/app.blade.php | 3 + resources/views/livewire/admin/menu.blade.php | 13 + .../views/livewire/admin/profile.blade.php | 63 +++ .../livewire/layout/navigation.blade.php | 2 +- .../views/livewire/layout/sidebar.blade.php | 480 ++++++++---------- routes/admin.php | 4 +- 34 files changed, 958 insertions(+), 267 deletions(-) create mode 100644 app/Http/Livewire/Admin/Menu.php create mode 100644 app/Http/Livewire/Admin/Profile.php create mode 100644 app/Models/Menu.php create mode 100644 app/View/Components/Item/Button.php create mode 100644 app/View/Components/Item/Modal.php create mode 100644 app/View/Components/Layout/Sidebar/ArrowDirection.php create mode 100644 app/View/Components/Layout/Sidebar/ChildOne.php create mode 100644 app/View/Components/Layout/Sidebar/ChildTwo.php create mode 100644 app/View/Components/Layout/Sidebar/SubOne.php create mode 100644 app/View/Components/Svg/Add.php create mode 100644 app/View/Components/Svg/Home.php create mode 100644 app/View/Components/Svg/Menu.php create mode 100644 app/View/Components/Svg/Users.php create mode 100644 database/migrations/2022_11_09_085026_create_menus_table.php create mode 100644 resources/views/components/item/button.blade.php create mode 100644 resources/views/components/item/modal.blade.php create mode 100644 resources/views/components/layout/sidebar/arrow-direction.blade.php create mode 100644 resources/views/components/layout/sidebar/child-one.blade.php create mode 100644 resources/views/components/layout/sidebar/child-two.blade.php create mode 100644 resources/views/components/layout/sidebar/parent.blade.php create mode 100644 resources/views/components/svg/add.blade.php create mode 100644 resources/views/components/svg/home.blade.php create mode 100644 resources/views/components/svg/menu.blade.php create mode 100644 resources/views/components/svg/nav.blade.php create mode 100644 resources/views/components/svg/users.blade.php create mode 100644 resources/views/livewire/admin/menu.blade.php create mode 100644 resources/views/livewire/admin/profile.blade.php diff --git a/app/Http/Livewire/Admin/Menu.php b/app/Http/Livewire/Admin/Menu.php new file mode 100644 index 0000000..18c9b94 --- /dev/null +++ b/app/Http/Livewire/Admin/Menu.php @@ -0,0 +1,14 @@ +$this->pageHeader]); + } +} diff --git a/app/Http/Livewire/Admin/Profile.php b/app/Http/Livewire/Admin/Profile.php new file mode 100644 index 0000000..0c914b4 --- /dev/null +++ b/app/Http/Livewire/Admin/Profile.php @@ -0,0 +1,22 @@ +$this->pageHeader, + 'request' => $request, + 'user' => $request->user() + ]); + } +} diff --git a/app/Http/Livewire/Layout/Sidebar.php b/app/Http/Livewire/Layout/Sidebar.php index 6deb20a..1c7fabd 100644 --- a/app/Http/Livewire/Layout/Sidebar.php +++ b/app/Http/Livewire/Layout/Sidebar.php @@ -2,12 +2,50 @@ namespace App\Http\Livewire\Layout; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Route; use Livewire\Component; class Sidebar extends Component { + public string $dashboardRoute = ''; + public array $sideBar = [ + 'dashboard' => ['name' => 'Dashboard', 'href' => ''], + 'users' => ['name' => 'Users', 'href' => ''], + + ]; + + public array $sideBarChildOne = [ + 'dashboard' => [ + ['name' => 'Dash-1', 'href' => 'admin.dashboard'], + ['name' => 'Dash-2', 'href' => 'admin.dashboard'] + ], + 'users' => [ + ['name' => 'Data', 'href' => 'admin.dashboard'] + ], + ]; + + public array $sideBarChildTwo = [ + 'users' => [ + ['name' => 'Data 1', 'href' => 'admin.dashboard'], + ['name' => 'Data 2', 'href' => 'admin.dashboard'], + ['name' => 'Data 3', 'href' => 'admin.dashboard'], + ] + ]; + + public function mount() + { + if (Auth::guard('admin')->check() && explode('.', Route::currentRouteName())[0] === 'admin') { + $this->sideBar['dashboard']['href'] = route('admin.dashboard'); + } else { + $this->sideBar['dashboard']['href'] = route('dashboard'); + } +// (array_key_exists(lcfirst($parent['name']),$sideBarChildTwo[lcfirst($parent['name'])]) ? count($sideBarChildTwo[lcfirst($parent['name'])]) : 0) + + } + public function render() { - return view('livewire.layout.sidebar'); + return view('livewire.layout.sidebar', ['sideBar' => $this->sideBar]); } } diff --git a/app/Models/Menu.php b/app/Models/Menu.php new file mode 100644 index 0000000..17f7ad2 --- /dev/null +++ b/app/Models/Menu.php @@ -0,0 +1,11 @@ +links=$links; + } + + /** + * Get the view / contents that represent the component. + * + * @return \Illuminate\Contracts\View\View|\Closure|string + */ + public function render() + { + return view('components.layout.sidebar.child-one',['links'=>$this->links]); + } +} diff --git a/app/View/Components/Layout/Sidebar/ChildTwo.php b/app/View/Components/Layout/Sidebar/ChildTwo.php new file mode 100644 index 0000000..c021a85 --- /dev/null +++ b/app/View/Components/Layout/Sidebar/ChildTwo.php @@ -0,0 +1,28 @@ +id(); + $table->string('name')->unique(); + $table->string('svg')->unique()->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('menus'); + } +}; diff --git a/resources/js/components/main.js b/resources/js/components/main.js index 867d245..e976e43 100644 --- a/resources/js/components/main.js +++ b/resources/js/components/main.js @@ -9,10 +9,11 @@ export function Main(data){ return{ darkMode:data.darkMode, isSidebarOpen:false, + isFirstModelButtonClicked:false, init() { + this.darkMode=true; Alpine.effect(() => { - // this.darkMode=true; - console.log(this.isSidebarOpen); + console.log( this.isModelButtonClicked); }); } } diff --git a/resources/views/components/item/button.blade.php b/resources/views/components/item/button.blade.php new file mode 100644 index 0000000..ac254e5 --- /dev/null +++ b/resources/views/components/item/button.blade.php @@ -0,0 +1,26 @@ +@props(['size'=>'default']) +@switch($size) + @case('small') + + @break + + @case('default') + + @break + + @case('large') + + @break +@endswitch + + + diff --git a/resources/views/components/item/modal.blade.php b/resources/views/components/item/modal.blade.php new file mode 100644 index 0000000..31e5d74 --- /dev/null +++ b/resources/views/components/item/modal.blade.php @@ -0,0 +1,115 @@ +@props(['type','buttonName'=>'Give some name', 'modalHeader'=>'Give a header']) + + @switch($type) + @case('add') + + @break + + @case('update') + + @break + + @case('delete') + + @break + @endswitch + + {{__($buttonName)}} + + + +
+
+
+
+

+ @switch($type) + @case('add') + + @break + + @case('update') + + @break + + @case('delete') + + @break + @endswitch + + {{$modalHeader}} + +

+ +
+
+
+
+

Be bold

+

+ Motivate teams to do their best work. Offer best practices to get users going in the right + direction. Be bold and offer just enough help to get the work started, and then get out of + the way. Give accurate information so users can make educated decisions. Know your user's + struggles and desired outcomes and give just enough information to let them get where they + need to go. +

+
+ +
+

Be optimistic

+

+ Focusing on the details gives people confidence in our products. Weave a consistent story + across our fabric and be diligent about vocabulary across all messaging by being brand + conscious across products to create a seamless flow across all the things. Let people know + that they can jump in and start working expecting to find a dependable experience across all + the things. Keep teams in the loop about what is happening by informing them of relevant + features, products and opportunities for success. Be on the journey with them and highlight + the key points that will help them the most - right now. Be in the moment by focusing + attention on the important bits first. +

+
+ +
+

Be practical, with a wink

+

+ Keep our own story short and give teams just enough to get moving. Get to the point and be + direct. Be concise - we tell the story of how we can help, but we do it directly and with + purpose. Be on the lookout for opportunities and be quick to offer a helping hand. At the + same time realize that novbody likes a nosy neighbor. Give the user just enough to know that + something awesome is around the corner and then get out of the way. Write clear, accurate, + and concise text that makes interfaces more usable and consistent - and builds trust. We + strive to write text that is understandable by anyone, anywhere, regardless of their culture + or language so that everyone feels they are part of the team. +

+
+
+
+
+ + + Save changes + +
+
+
+
diff --git a/resources/views/components/layout/sidebar/arrow-direction.blade.php b/resources/views/components/layout/sidebar/arrow-direction.blade.php new file mode 100644 index 0000000..bcfeb73 --- /dev/null +++ b/resources/views/components/layout/sidebar/arrow-direction.blade.php @@ -0,0 +1,17 @@ + + + + + diff --git a/resources/views/components/layout/sidebar/child-one.blade.php b/resources/views/components/layout/sidebar/child-one.blade.php new file mode 100644 index 0000000..95b577c --- /dev/null +++ b/resources/views/components/layout/sidebar/child-one.blade.php @@ -0,0 +1,54 @@ +@props(['id'=>null, 'name'=>null , 'childCount'=>0]) +@if($id != null) +
  • + merge(['class' => 'hs-accordion-toggle cursor-pointer flex items-center gap-x-3.5 py-2 px-2.5 hs-accordion-active:text-blue-600 hs-accordion-active:hover:bg-transparent text-sm text-slate-700 +rounded-md hover:bg-slate-100 dark:hover:bg-oblue-500 dark:text-slate-400 dark:hover:bg-oblue-500 dark:hs-accordion-active:text-white']) }} > + @switch($name) + @case('Users') + + {{ __($name) }} + @break + +{{-- @case('Menu')--}} +{{-- --}} +{{-- {{ __($name) }}--}} +{{-- @break--}} + + @default + {{ __($name) }} + @break + @endswitch + @if($childCount > 0) @endif + + +
  • +@else +
  • + merge(['class' => 'flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-slate-700 rounded-md hover:bg-slate-100 dark:hover:bg-oblue-500 dark:text-slate-400 dark:hover:bg-oblue-500']) }} href="route($href)"> + @switch($name) + @case('Dashboard') + + {{ __($name) }} + @break + + @case('Users') + + {{ __($name) }} + @break + + @case('Menu') + + {{ __($name) }} + @break + + @default + {{ __($name) }} + @break + @endswitch + +
  • +@endif + diff --git a/resources/views/components/layout/sidebar/child-two.blade.php b/resources/views/components/layout/sidebar/child-two.blade.php new file mode 100644 index 0000000..094f4a0 --- /dev/null +++ b/resources/views/components/layout/sidebar/child-two.blade.php @@ -0,0 +1,13 @@ +@props(['links'=>[]]) +@if(count($links) > 0) + + @endif diff --git a/resources/views/components/layout/sidebar/parent.blade.php b/resources/views/components/layout/sidebar/parent.blade.php new file mode 100644 index 0000000..3425cfe --- /dev/null +++ b/resources/views/components/layout/sidebar/parent.blade.php @@ -0,0 +1,5 @@ + diff --git a/resources/views/components/svg/add.blade.php b/resources/views/components/svg/add.blade.php new file mode 100644 index 0000000..960bac6 --- /dev/null +++ b/resources/views/components/svg/add.blade.php @@ -0,0 +1,3 @@ +merge(['class' => 'flex-none']) }} xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" > + + diff --git a/resources/views/components/svg/gear.blade.php b/resources/views/components/svg/gear.blade.php index fe8278e..b347f64 100644 --- a/resources/views/components/svg/gear.blade.php +++ b/resources/views/components/svg/gear.blade.php @@ -1,4 +1,3 @@ -merge(['class' => 'flex-none']) }} xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" > - - +merge(['class' => 'flex-none']) }} xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> + diff --git a/resources/views/components/svg/home.blade.php b/resources/views/components/svg/home.blade.php new file mode 100644 index 0000000..7a53887 --- /dev/null +++ b/resources/views/components/svg/home.blade.php @@ -0,0 +1,7 @@ +merge(['class' => 'flex-none']) }} xmlns="http://www.w3.org/2000/svg" width="16" height="16" + fill="currentColor" viewBox="0 0 16 16"> + + + diff --git a/resources/views/components/svg/menu.blade.php b/resources/views/components/svg/menu.blade.php new file mode 100644 index 0000000..05382ca --- /dev/null +++ b/resources/views/components/svg/menu.blade.php @@ -0,0 +1,4 @@ +merge(['class' => 'flex-none']) }} xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="16" height="16"> + + + diff --git a/resources/views/components/svg/nav.blade.php b/resources/views/components/svg/nav.blade.php new file mode 100644 index 0000000..e69de29 diff --git a/resources/views/components/svg/users.blade.php b/resources/views/components/svg/users.blade.php new file mode 100644 index 0000000..f5e2b00 --- /dev/null +++ b/resources/views/components/svg/users.blade.php @@ -0,0 +1,5 @@ +merge(['class' => 'flex-none']) }} xmlns="http://www.w3.org/2000/svg" width="16" height="16" + fill="currentColor" viewBox="0 0 16 16"> + + diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 3ed3a18..304d5ef 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -30,5 +30,8 @@ @stack('modals') @livewireScripts +
    diff --git a/resources/views/livewire/admin/menu.blade.php b/resources/views/livewire/admin/menu.blade.php new file mode 100644 index 0000000..a68ae4d --- /dev/null +++ b/resources/views/livewire/admin/menu.blade.php @@ -0,0 +1,13 @@ +
    + @livewire('layout.navigation') + @livewire('layout.toggle') + @livewire('layout.sidebar') + @livewire('layout.header',['header'=>$pageHeader]) + + + + + + + +
    diff --git a/resources/views/livewire/admin/profile.blade.php b/resources/views/livewire/admin/profile.blade.php new file mode 100644 index 0000000..165ecc3 --- /dev/null +++ b/resources/views/livewire/admin/profile.blade.php @@ -0,0 +1,63 @@ +
    + @livewire('layout.navigation') + @livewire('layout.toggle') + @livewire('layout.sidebar') + @livewire('layout.header',['header'=>$pageHeader]) + + + + + +
    +
    + @if (Laravel\Fortify\Features::canUpdateProfileInformation()) + @if(Auth::guard('admin')->check()) + @livewire('admin-update-profile-information-form') + @else + @livewire('profile.update-profile-information-form') + @endif + + @endif + + @if (Laravel\Fortify\Features::enabled(Laravel\Fortify\Features::updatePasswords())) +
    + @livewire('profile.update-password-form') +
    + + + @endif + + @if (Laravel\Fortify\Features::canManageTwoFactorAuthentication()) +
    + + @if(Auth::guard('admin')->check()) + @livewire('admin-two-factor-authentication-form') + @else + @livewire('profile.two-factor-authentication-form') + @endif + +
    + + + @endif + +
    + @livewire('profile.logout-other-browser-sessions-form') +
    + + @if (Laravel\Jetstream\Jetstream::hasAccountDeletionFeatures()) + + +
    + @livewire('profile.delete-user-form') +
    + @endif +
    +
    + + + + +
    + +
    diff --git a/resources/views/livewire/layout/navigation.blade.php b/resources/views/livewire/layout/navigation.blade.php index 646e31b..0f234a7 100644 --- a/resources/views/livewire/layout/navigation.blade.php +++ b/resources/views/livewire/layout/navigation.blade.php @@ -266,7 +266,7 @@
    + class=" !h-[70px] top-0 inset-x-0 flex flex-wrap sm:justify-start xs:flex-nowrap z-[48] w-full text-sm py-2.5 sm:py-4 lg:pl-64 dark:border-oblue-100">