diff options
author | Thedro Neely <thedroneely@gmail.com> | 2021-04-30 03:51:13 -0400 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2021-04-30 15:31:01 -0400 |
commit | 9d39a7ba3de79e27029bb5c9c2d72e114d8fa795 (patch) | |
tree | 226696a3c635e5f91b1ca97edff49b7f34663f58 /app/views/components/navigator.link.php | |
parent | fbd112c924190b1f622c59ff480f0cd2a2433249 (diff) | |
download | thedroneely.com-9d39a7ba3de79e27029bb5c9c2d72e114d8fa795.tar.gz thedroneely.com-9d39a7ba3de79e27029bb5c9c2d72e114d8fa795.tar.bz2 thedroneely.com-9d39a7ba3de79e27029bb5c9c2d72e114d8fa795.zip |
app/views/partials/navigator: Unify
Diffstat (limited to 'app/views/components/navigator.link.php')
-rw-r--r-- | app/views/components/navigator.link.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/views/components/navigator.link.php b/app/views/components/navigator.link.php new file mode 100644 index 0000000..a129acf --- /dev/null +++ b/app/views/components/navigator.link.php @@ -0,0 +1,18 @@ +<a href="<?php echo $route ?? null; ?>" class="navbar-item navbar__icon has-text-centered + <?php + + $hiddenLabels = [ 'Profile' ]; + if (in_array($label, $hiddenLabels)) { echo ' navbar__icon__hidden'; } + + echo $check = ($label === 'Home') + ? ($navigation->isActiveHome() ? ' navbar__active' : '') + : ($navigation->isActive($route ?? null) ? ' navbar__active' : ''); + ?> +"> + <div class="has-text-centered"> + <?php echo icon($icon ?? null); ?> + <p title="<?php echo $label ?? null; ?>" class="navbar__icon__label"><?php echo $label ?? null; ?></p> + </div> +</a> + +<?php $route = $label = $icon = null; ?> |