diff options
author | Thedro Neely <thedroneely@gmail.com> | 2021-12-18 00:12:19 -0500 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2021-12-18 00:12:19 -0500 |
commit | 13b69343b9f8cf4be673256010e784ebd846aa95 (patch) | |
tree | 6d67f82bdf6572614d9fd6669f770d05cff25377 /app/views/components/navigator.link.dropdown.php | |
parent | 7a61c746f0ee5d999c88414bf206a30781b87e31 (diff) | |
download | thedroneely.com-13b69343b9f8cf4be673256010e784ebd846aa95.tar.gz thedroneely.com-13b69343b9f8cf4be673256010e784ebd846aa95.tar.bz2 thedroneely.com-13b69343b9f8cf4be673256010e784ebd846aa95.zip |
app/model/Navigation: Simplify active route logic
Diffstat (limited to 'app/views/components/navigator.link.dropdown.php')
-rw-r--r-- | app/views/components/navigator.link.dropdown.php | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/app/views/components/navigator.link.dropdown.php b/app/views/components/navigator.link.dropdown.php index be937f8..0657bc6 100644 --- a/app/views/components/navigator.link.dropdown.php +++ b/app/views/components/navigator.link.dropdown.php @@ -1,10 +1,5 @@ <a href="<?php echo $route ?? null; ?>" - class=" - <?php - echo $check = ($label === 'Home') - ? ($navigation->isActiveHome() ? ' navbar__active' : '') - : ($navigation->isActive($route ?? null) ? ' navbar__active' : ''); - ?> navbar-item" + class="<?php if ($navigation->isActive($route ?? null)) { echo ' navbar__active'; } ?> navbar-item" title="<?php echo $label ?? null; ?>" > <?php echo $label ?? null; ?> |