diff options
author | Mateja <mail@matejamaric.com> | 2020-10-17 01:16:57 +0200 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2020-10-17 01:16:57 +0200 |
commit | 871c7ff1dfe41025430ab3c4b0cd41d46bd8f8dd (patch) | |
tree | 62daf3bb08ee71075835b3e046d3ad68403bb0d0 /resources/views/inc/navbar.blade.php | |
parent | 9ea3e7e0e1de349fb0a322d0176e16f4d31d609f (diff) | |
download | yota-laravel-871c7ff1dfe41025430ab3c4b0cd41d46bd8f8dd.tar.gz yota-laravel-871c7ff1dfe41025430ab3c4b0cd41d46bd8f8dd.zip |
Active navbar links with named routes.
Diffstat (limited to 'resources/views/inc/navbar.blade.php')
-rw-r--r-- | resources/views/inc/navbar.blade.php | 49 |
1 files changed, 3 insertions, 46 deletions
diff --git a/resources/views/inc/navbar.blade.php b/resources/views/inc/navbar.blade.php index ce88a2f..89492db 100644 --- a/resources/views/inc/navbar.blade.php +++ b/resources/views/inc/navbar.blade.php @@ -1,45 +1,3 @@ -<!-- -<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top"> - <a class="navbar-brand" href="#">Navbar</a> - - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - - <div class="collapse navbar-collapse" id="navbarsExampleDefault"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="/">Home<span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="/services">Services</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="/about">About</a> - </li> - {{--<li class="nav-item">--}} - {{--<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>--}} - {{--</li>--}} - - {{--<li class="nav-item dropdown">--}} - {{--<a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a>--}} - {{--<div class="dropdown-menu" aria-labelledby="dropdown01">--}} - {{--<a class="dropdown-item" href="#">Action</a>--}} - {{--<a class="dropdown-item" href="#">Another action</a>--}} - {{--<a class="dropdown-item" href="#">Something else here</a>--}} - {{--</div>--}} - {{--</li>--}} - - </ul> - - {{--<form class="form-inline my-2 my-lg-0">--}} - {{--<input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">--}} - {{--<button class="btn btn-secondary my-2 my-sm-0" type="submit">Search</button>--}} - {{--</form>--}} - - </div> -</nav> ---> <nav class="navbar navbar-expand-md navbar-light bg-light"> <a href="http://yota.yu1srs.org.rs" class="navbar-brand">YOTA</a> <button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbarCollapse"> @@ -48,10 +6,9 @@ <div class="collapse navbar-collapse" id="navbarCollapse"> <div class="navbar-nav"> - {{--<a href="/" class="nav-item nav-link active">Home</a>--}} - <a href="/" class="nav-item nav-link">Home</a> - <a href="/services" class="nav-item nav-link">Services</a> - <a href="/about" class="nav-item nav-link">About</a> + <a href="/" class="nav-item nav-link {{ request()->routeIs('home') ? 'active' : '' }}">Home</a> + <a href="/services" class="nav-item nav-link {{ request()->routeIs('services') ? 'active' : '' }}">Services</a> + <a href="/about" class="nav-item nav-link {{ request()->routeIs('about') ? 'active' : '' }}">About</a> </div> <div class="navbar-nav ml-auto"> <a href="#" class="nav-item nav-link">Login</a> |