Commit awal: prototipe UI SIAKAD Untan
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
{{-- Kelompok butir menu (<details>): terbuka dari server bila `open`, jadi berfungsi tanpa JS. Isi: <x-nav.item>. --}}
|
||||
@props(['label', 'icon' => null, 'open' => false])
|
||||
|
||||
<details {{ $attributes->class('nav-group') }} @if ($open) open data-has-active @endif>
|
||||
<summary>
|
||||
@if ($icon)
|
||||
<x-dynamic-component :component="'heroicon-o-'.$icon" class="nav-item__icon" />
|
||||
@endif
|
||||
<span class="nav-group__label" x-data="nameMarquee"><span class="nav-group__label-text" x-ref="inner">{{ $label }}</span></span>
|
||||
<x-heroicon-m-chevron-down class="nav-group__chevron" />
|
||||
</summary>
|
||||
<div class="nav-group__items">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
</details>
|
||||
@@ -0,0 +1,16 @@
|
||||
@props(['href', 'active' => false, 'icon' => null, 'count' => null])
|
||||
|
||||
<a
|
||||
href="{{ $href }}"
|
||||
@if ($active) aria-current="page" @endif
|
||||
{{ $attributes->class('nav-item') }}
|
||||
>
|
||||
@if ($icon)
|
||||
<x-dynamic-component :component="'heroicon-'.($active ? 's' : 'o').'-'.$icon" class="nav-item__icon" />
|
||||
@endif
|
||||
<span class="nav-item__label" x-data="nameMarquee"><span class="nav-item__label-text" x-ref="inner">{{ $slot }}</span></span>
|
||||
{{-- Penghitung hanya diisi dengan angka nyata dari DB; nol tidak ditampilkan --}}
|
||||
@if (is_numeric($count) && $count > 0)
|
||||
<span class="nav-item__count">{{ $count > 99 ? '99+' : (int) $count }}</span>
|
||||
@endif
|
||||
</a>
|
||||
Reference in New Issue
Block a user