@@ -171,8 +171,16 @@ class="nav-link text-light">{{ $course->name }}</a></li>
171
171
</ul >
172
172
</li >
173
173
174
- <li class =" nav-item custom-nav-item {{ request ()-> routeIs (' books.view' ) ? ' active-link' : ' ' } }" >
175
- <a class =" nav-link text-light" href =" {{ route (' books.view' ) } }" >Book Store</a >
174
+ <li class =" nav-item custom-nav-item position-relative dropdown-trigger {{ request ()-> routeIs (' books.*' ) ? ' active-link' : ' ' } }" >
175
+ <a class =" nav-link text-light" href =" {{ route (' books.view' ) } }" >Book Store</a >
176
+ <ul class =" position-absolute dropdown " >
177
+ @foreach (app (' bookCategories' ) as $category )
178
+ <li class =" nav-item custom-nav-item dropdown-item {{ route (' books.view.all' , $category -> id ) == url ()-> current () ? ' active-link' : ' ' } }" ><a
179
+ href =" {{ route (' books.view.all' , $category -> id ) } }"
180
+ class =" nav-link text-light" >{{ $category -> name } } </a ></li >
181
+ @endforeach
182
+ </ul >
183
+
176
184
</li >
177
185
</ul >
178
186
</nav >
@@ -199,8 +207,16 @@ class="nav-link text-light">{{ $course->name }}</a></li>
199
207
Lab</a >
200
208
</li >
201
209
202
- <li class =" nav-item custom-nav-item {{ request ()-> routeIs (' books.view' ) ? ' active-link' : ' ' } }" >
203
- <a class =" nav-link text-light" href =" {{ route (' books.view' ) } }" >Book Store</a >
210
+ <li class =" nav-item custom-nav-item position-relative dropdown-trigger {{ request ()-> routeIs (' books.*' ) ? ' active-link' : ' ' } }" >
211
+ <a class =" nav-link text-light" href =" {{ route (' books.view' ) } }" >Book Store</a >
212
+ <ul class =" position-absolute dropdown " >
213
+ @foreach (app (' bookCategories' ) as $category )
214
+ <li class =" nav-item custom-nav-item dropdown-item {{ route (' books.view.all' , $category -> id ) == url ()-> current () ? ' active-link' : ' ' } }" ><a
215
+ href =" {{ route (' books.view.all' , $category -> id ) } }"
216
+ class =" nav-link text-light" >{{ $category -> name } } </a ></li >
217
+ @endforeach
218
+ </ul >
219
+
204
220
</li >
205
221
206
222
</ul >
@@ -372,8 +388,16 @@ class="nav-link text-light">{{ $course->name }}</a></li>
372
388
</ul >
373
389
</li >
374
390
375
- <li class =" nav-item custom-nav-item {{ request ()-> routeIs (' books.view' ) ? ' active-link' : ' ' } }" >
376
- <a class =" nav-link text-light" href =" {{ route (' books.view' ) } }" >Book Store</a >
391
+ <li class =" nav-item custom-nav-item position-relative dropdown-trigger {{ request ()-> routeIs (' books.*' ) ? ' active-link' : ' ' } }" >
392
+ <a class =" nav-link text-light" href =" {{ route (' books.view' ) } }" >Book Store</a >
393
+ <ul class =" position-absolute dropdown " >
394
+ @foreach (app (' bookCategories' ) as $category )
395
+ <li class =" nav-item custom-nav-item dropdown-item {{ route (' books.view.all' , $category -> id ) == url ()-> current () ? ' active-link' : ' ' } }" ><a
396
+ href =" {{ route (' books.view.all' , $category -> id ) } }"
397
+ class =" nav-link text-light" >{{ $category -> name } } </a ></li >
398
+ @endforeach
399
+ </ul >
400
+
377
401
</li >
378
402
</ul >
379
403
</nav >
@@ -400,8 +424,16 @@ class="nav-link text-light">{{ $course->name }}</a></li>
400
424
Lab</a >
401
425
</li >
402
426
403
- <li class =" nav-item custom-nav-item {{ request ()-> routeIs (' books.view' ) ? ' active-link' : ' ' } }" >
404
- <a class =" nav-link text-light" href =" {{ route (' books.view' ) } }" >Book Store</a >
427
+ <li class =" nav-item custom-nav-item position-relative dropdown-trigger {{ request ()-> routeIs (' books.*' ) ? ' active-link' : ' ' } }" >
428
+ <a class =" nav-link text-light" href =" {{ route (' books.view' ) } }" >Book Store</a >
429
+ <ul class =" position-absolute dropdown " >
430
+ @foreach (app (' bookCategories' ) as $category )
431
+ <li class =" nav-item custom-nav-item dropdown-item {{ route (' books.view.all' , $category -> id ) == url ()-> current () ? ' active-link' : ' ' } }" ><a
432
+ href =" {{ route (' books.view.all' , $category -> id ) } }"
433
+ class =" nav-link text-light" >{{ $category -> name } } </a ></li >
434
+ @endforeach
435
+ </ul >
436
+
405
437
</li >
406
438
407
439
</ul >
0 commit comments