mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-21 15:42:31 -05:00
Fix active nav link logic
This commit is contained in:
parent
0fe1549dac
commit
7f9b0ef09a
2 changed files with 3 additions and 3 deletions
2
resources/assets/sass/dashboard.scss
vendored
2
resources/assets/sass/dashboard.scss
vendored
|
@ -137,7 +137,7 @@ body {
|
|||
padding-left: 8px;
|
||||
}
|
||||
|
||||
&:hover, &:focus, &:active {
|
||||
&.active, &:hover, &:focus, &:active {
|
||||
background-color: fade-out(#000, 0.95);
|
||||
color: $c-text;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<nav class="navbar navbar-expand-lg">
|
||||
@set('current_page', preg_replace([ '/^.*\/dashboard\/?/', '/\/.*/' ], [ '', '' ], Request::url()))
|
||||
@set('current_page', preg_replace([ '/^.*\//', '/\/.*/' ], [ '', '' ], Request::url()))
|
||||
|
||||
<a class="navbar-brand" href="{{ url('/dashboard') }}">
|
||||
{{ env('APP_NAME') }} Dashboard
|
||||
|
@ -33,7 +33,7 @@
|
|||
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="menu-dropdown-{{ $dropdown_id }}">
|
||||
@foreach($menu_item['submenu'] as $submenu_item)
|
||||
<a class="dropdown-item" href="{{ url('/dashboard/' . $submenu_item['type'] . '/' . $submenu_item['model']) }}">{{ $submenu_item['title'] }}</a>
|
||||
<a class="dropdown-item {{ $current_page == $submenu_item['model'] ? 'active' : '' }}" href="{{ url('/dashboard/' . $submenu_item['type'] . '/' . $submenu_item['model']) }}">{{ $submenu_item['title'] }}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</li>
|
||||
|
|
Loading…
Reference in a new issue