Browse Source

refactor: update sidebar logo rendering, refine dropdown menus, and adjust UI components for consistency and enhanced maintainability.

master
Syarif Ubaidillah 1 week ago
parent
commit
18ad5801a1
  1. 24
      resources/views/components/layouts/nav/sidebar.blade.php
  2. 2
      resources/views/components/layouts/⚡language-switcher/language-switcher.blade.php
  3. 12
      resources/views/components/layouts/⚡notification/notification.blade.php
  4. 29
      resources/views/components/layouts/⚡profile-dropdown/profile-dropdown.blade.php
  5. 2
      resources/views/pages/identity/users/index.blade.php

24
resources/views/components/layouts/nav/sidebar.blade.php

@ -1,22 +1,12 @@
<div class="sidebar sidebar-dark sidebar-fixed border-end" id="sidebar"> <div class="sidebar sidebar-dark sidebar-fixed border-end" id="sidebar">
<div class="sidebar-header border-bottom"> <div class="sidebar-header border-bottom">
<div class="sidebar-brand me-auto"> <div>
<svg role="img" aria-label="CoreUI Logo Full" class="sidebar-brand-full" width="88" height="32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 312 115"> @isset($logo)
<g style="fill: currentColor"> <img src="{{ asset_static($logo) }}" alt="Web Logo" class="h-100" />
<path d="M96 24.124 57 1.608a12 12 0 0 0-12 0L6 24.124a12.034 12.034 0 0 0-6 10.393V79.55a12.033 12.033 0 0 0 6 10.392l39 22.517a12 12 0 0 0 12 0l39-22.517a12.033 12.033 0 0 0 6-10.392V34.517a12.034 12.034 0 0 0-6-10.393ZM94 79.55a4 4 0 0 1-2 3.464l-39 22.517a4 4 0 0 1-4 0L10 83.014a4 4 0 0 1-2-3.464V34.517a4 4 0 0 1 2-3.464L49 8.536a4 4 0 0 1 4 0l39 22.517a4 4 0 0 1 2 3.464V79.55Z" /> @else
<path d="M74.022 70.071h-2.866a4 4 0 0 0-1.925.494L51.95 80.05 32 68.531V45.554l19.95-11.519 17.29 9.455a4 4 0 0 0 1.919.49h2.863a2 2 0 0 0 2-2v-2.71a2 2 0 0 0-1.04-1.756L55.793 27.02a8.04 8.04 0 0 0-7.843.09L28 38.626a8.025 8.025 0 0 0-4 6.929V68.53a8 8 0 0 0 4 6.928l19.95 11.519a8.043 8.043 0 0 0 7.843.088l19.19-10.532a2 2 0 0 0 1.038-1.753v-2.71a2 2 0 0 0-2-2Z" /> @svg('tabler-brand-laravel', ['class' => 'h-100'])
<g transform="translate(118 33)"> @endisset
<path d="M50.745.428c-8.28.01-14.99 6.72-15 15v17.277c0 8.285 6.715 15 15 15 8.284 0 15-6.715 15-15V15.428c-.01-8.28-6.72-14.99-15-15Zm7 32.277a7 7 0 0 1-14 0V15.428a7 7 0 0 1 14 0v17.277ZM14.079 8.488a7.01 7.01 0 0 1 7.868 6.075.99.99 0 0 0 .984.865h6.03a1.01 1.01 0 0 0 1-1.097C29.354 6.206 22.38.046 14.243.447 6.161 1-.086 7.762 0 15.864V32.27c-.087 8.101 6.161 14.864 14.244 15.416 8.137.401 15.11-5.759 15.716-13.883a1.01 1.01 0 0 0-.999-1.098h-6.03a.99.99 0 0 0-.985.865 7.01 7.01 0 0 1-7.868 6.076A7.164 7.164 0 0 1 8 32.461V15.672a7.164 7.164 0 0 1 6.079-7.184ZM96.922 27.994a12.158 12.158 0 0 0 7.184-11.077v-3.7c0-6.71-5.44-12.15-12.149-12.15H75a1 1 0 0 0-1 1v44a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-17h6.621l7.916 17.413a1 1 0 0 0 .91.587h6.591a1 1 0 0 0 .91-1.414l-8.026-17.659Zm-.816-11.077a4.154 4.154 0 0 1-4.148 4.15h-9.852v-12h9.852a4.154 4.154 0 0 1 4.148 4.15v3.7ZM139 1.067h-26a1 1 0 0 0-1 1v44a1 1 0 0 0 1 1h26a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1h-19v-12h13a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1h-13v-10h19a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1ZM177 1.067h-6a1 1 0 0 0-1 1v22.647a7.007 7.007 0 1 1-14 0V2.067a1 1 0 0 0-1-1h-6a1 1 0 0 0-1 1v22.647a15.003 15.003 0 1 0 30 0V2.067a1 1 0 0 0-1-1Z" /> <span class="fs-5 fw-bold ms-2">{{ config('seotools.meta.defaults.title') }}</span>
<rect width="8" height="38" x="186" y="1.067" rx="1" />
</g>
</g>
</svg>
<svg role="img" aria-label="CoreUI Logo Signet" class="sidebar-brand-narrow" width="88" height="32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 102 115">
<g style="fill: currentColor">
<path d="M96 24.124 57 1.608a12 12 0 0 0-12 0L6 24.124a12.034 12.034 0 0 0-6 10.393V79.55a12.033 12.033 0 0 0 6 10.392l39 22.517a12 12 0 0 0 12 0l39-22.517a12.033 12.033 0 0 0 6-10.392V34.517a12.034 12.034 0 0 0-6-10.393ZM94 79.55a4 4 0 0 1-2 3.464l-39 22.517a4 4 0 0 1-4 0L10 83.014a4 4 0 0 1-2-3.464V34.517a4 4 0 0 1 2-3.464L49 8.536a4 4 0 0 1 4 0l39 22.517a4 4 0 0 1 2 3.464V79.55Z" />
<path d="M74.022 70.071h-2.866a4 4 0 0 0-1.925.494L51.95 80.05 32 68.531V45.554l19.95-11.519 17.29 9.455a4 4 0 0 0 1.919.49h2.863a2 2 0 0 0 2-2v-2.71a2 2 0 0 0-1.04-1.756L55.793 27.02a8.04 8.04 0 0 0-7.843.09L28 38.626a8.025 8.025 0 0 0-4 6.929V68.53a8 8 0 0 0 4 6.928l19.95 11.519a8.043 8.043 0 0 0 7.843.088l19.19-10.532a2 2 0 0 0 1.038-1.753v-2.71a2 2 0 0 0-2-2Z" />
</g>
</svg>
</div> </div>
<button class="btn-close d-lg-none" type="button" data-coreui-theme="dark" aria-label="Close" onclick="coreui.Sidebar.getInstance(document.querySelector('#sidebar')).toggle()"></button> <button class="btn-close d-lg-none" type="button" data-coreui-theme="dark" aria-label="Close" onclick="coreui.Sidebar.getInstance(document.querySelector('#sidebar')).toggle()"></button>
</div> </div>

2
resources/views/components/layouts/⚡language-switcher/language-switcher.blade.php

@ -1,7 +1,7 @@
<div> <div>
<a class="btn btn-link nav-link py-2 px-2 d-flex align-items-center" data-bs-toggle="dropdown" <a class="btn btn-link nav-link py-2 px-2 d-flex align-items-center" data-bs-toggle="dropdown"
aria-expanded="false" href="#" role="button"> aria-expanded="false" href="#" role="button">
<x-tabler-language width="20" /> <x-tabler-language class="w-full" />
</a> </a>
<div class="dropdown-menu dropdown-menu-end dropdown-menu-md p-0"> <div class="dropdown-menu dropdown-menu-end dropdown-menu-md p-0">
<div class="list-group list-group-flush m-0"> <div class="list-group list-group-flush m-0">

12
resources/views/components/layouts/⚡notification/notification.blade.php

@ -1,11 +1,11 @@
<div> <div>
<a class="btn btn-link nav-link py-2 px-2 d-flex align-items-center" data-bs-toggle="dropdown" <a class="btn btn-link nav-link d-flex align-items-center" data-bs-toggle="dropdown"
aria-expanded="false" href="#" role="button"> aria-expanded="false" href="#" role="button">
<x-tabler-bell width="20" /> @if($this->notifications->filter(fn($value, $key) => !$value->read_at)->count() > 0)
<span class="position-absolute start-100 translate-middle badge rounded-pill bg-danger ms-n2 top-0 mt-2"> <x-tabler-bell-exclamation class="w-full" />
{{ $this->notifications->filter(fn($value, $key) => !$value->read_at)->count() }} @else
<span class="visually-hidden">{{ __('ui.notification.unread') }}</span> <x-tabler-bell class="w-full" />
</span> @endif
</a> </a>
<div class="dropdown-menu dropdown-menu-end dropdown-menu-md p-0"> <div class="dropdown-menu dropdown-menu-end dropdown-menu-md p-0">
<ul class="list-unstyled m-0 p-0 list-group"> <ul class="list-unstyled m-0 p-0 list-group">

29
resources/views/components/layouts/⚡profile-dropdown/profile-dropdown.blade.php

@ -1,30 +1,14 @@
<div> <div>
<a class="position-relative btn-icon btn-sm btn-link btn rounded-circle" data-bs-toggle="dropdown" <a class="nav-link" data-coreui-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
aria-expanded="false" href="#" role="button">
@isset($this->user->avatar) @isset($this->user->avatar)
<img src="{{ $this->user->avatar->url }}" alt="User Avatar" width="26" class="avatar avatar-sm rounded-circle" /> <img src="{{ $this->user->avatar->url }}" alt="User Avatar" width="26" class="avatar avatar-sm rounded-circle" />
@else @else
<x-tabler-user-circle width="26" class="avatar avatar-sm rounded-circle" /> <x-tabler-user-circle width="26" class="avatar avatar-sm rounded-circle w-full" />
@endisset @endisset
</a> </a>
<div class="dropdown-menu dropdown-menu-end dropdown-menu-md p-0"> <div class="dropdown-menu dropdown-menu-end pt-0" style="position: absolute; inset: 0px 0px auto auto; margin: 0px; transform: translate(0px, 42px);" data-popper-placement="bottom-end">
<div> <x-link class="dropdown-item" :href="route('profile.index')" :label="__('ui.menu.profile')" icon="tabler-user" />
<x-link class="dropdown-item" :href="route('profile.index')"> <div class="dropdown-divider"></div>
<x-slot:label>
<div class="d-flex align-items-center gap-3 px-3 py-3">
@isset($this->user->avatar)
<img src="{{ $this->user->avatar->url }}" alt="User Avatar" width="26" class="avatar avatar-sm rounded-circle" />
@else
<x-tabler-user-circle width="26" class="avatar avatar-sm rounded-circle" />
@endisset
<div>
<h4 class="small mb-0">{{ auth('web')->user()->name }}</h4>
<p class="small mb-0">{{ auth('web')->user()->email }}</p>
</div>
</div>
</x-slot:label>
</x-link>
<hr class="my-0 border-dashed" />
@can('system-setting.manage') @can('system-setting.manage')
<x-link class="dropdown-item" :href="route('system-setting.index')"> <x-link class="dropdown-item" :href="route('system-setting.index')">
<x-slot:label> <x-slot:label>
@ -41,7 +25,7 @@
</x-slot:label> </x-slot:label>
</x-link> </x-link>
@endcan @endcan
<hr class="my-0 border-dashed" /> <div class="dropdown-divider"></div>
<a class="dropdown-item text-danger" href="javascript:void(0)" <a class="dropdown-item text-danger" href="javascript:void(0)"
x-on:click="$ask.ajax({ x-on:click="$ask.ajax({
textMessage: '{{ __('ui.confirmation.logout') }}', textMessage: '{{ __('ui.confirmation.logout') }}',
@ -56,4 +40,3 @@
</a> </a>
</div> </div>
</div> </div>
</div>

2
resources/views/pages/identity/users/index.blade.php

@ -17,7 +17,7 @@
</template> </template>
<livewire:pages::identity.users.form-modal /> <livewire:pages::identity.users.form-modal />
<livewire:pages::system.audit.audit-view-modal key-name="ulid" model="\App\Domains\Identity\Models\User::class" <livewire:pages::system.audit.audit-view-modal key-name="ulid" :model="\App\Domains\Identity\Models\User::class"
translation="domains/identity/field.user." /> translation="domains/identity/field.user." />
<livewire:datatables.delete-action key-name="ulid" :model="\App\Domains\Identity\Models\User::class" <livewire:datatables.delete-action key-name="ulid" :model="\App\Domains\Identity\Models\User::class"
:action="\App\Domains\Identity\Actions\Governance\RemoveUser::class" /> :action="\App\Domains\Identity\Actions\Governance\RemoveUser::class" />

Loading…
Cancel
Save