!106 Fix the h5 navigation without links and click to jump to the home page

* Fix the h5 navigation without links and click to jump to the home page
This commit is contained in:
pushuo 2023-05-23 03:10:13 +00:00 committed by Edward Yang
parent 619523c472
commit 5b83f02098
3 changed files with 11 additions and 4 deletions

Binary file not shown.

View File

@ -384,12 +384,17 @@ header {
.children-group {
.children-title {
height: 44px;
span {
width: 26px;
height: 26px;
margin-right: -10px;
width: 44px;
height: 42px;
display: flex;
align-items: center;
justify-content: center;
&:active {
background-color: #eee;
}
&[aria-expanded="true"] {
i::before {

View File

@ -3,7 +3,7 @@
@if ($menu['name'])
<div class="accordion-item">
<div class="nav-item-text">
<a class="nav-link" target="{{ isset($menu['new_window']) && $menu['new_window'] ? '_blank' : '_self' }}" href="{{ $menu['link'] ?? '' }}">
<a class="nav-link" target="{{ isset($menu['new_window']) && $menu['new_window'] ? '_blank' : '_self' }}" href="{{ $menu['link'] ?: '#flush-menu-' . $key }}" data-bs-toggle="{{ !$menu['link'] ? 'collapse' : ''}}">
{{ $menu['name'] }}
@if (isset($menu['badge']) && $menu['badge']['name'])
<span class="badge" style="background-color: {{ $menu['badge']['bg_color'] }}; color: {{ $menu['badge']['text_color'] }}; border-color: {{ $menu['badge']['bg_color'] }}">
@ -20,9 +20,11 @@
@forelse ($menu['children_group'] as $c_key => $group)
<div class="children-group">
@if ($group['name'])
<div class="d-flex justify-content-between align-items-center py-2 children-title">
<div class="d-flex justify-content-between align-items-center children-title" data-bs-toggle="collapse" data-bs-target="#children-menu-{{ $key }}-{{ $c_key }}">
<div>{{ $group['name'] }}</div>
@if ($group['children'])
<span class="collapsed" data-bs-toggle="collapse" data-bs-target="#children-menu-{{ $key }}-{{ $c_key }}"><i class="bi bi-plus-lg"></i></span>
@endif
</div>
@endif
<div class="accordion-collapse collapse {{ !$group['name'] ? 'd-block' : '' }}" id="children-menu-{{ $key }}-{{ $c_key }}" data-bs-parent="#flush-menu-{{ $key }}">