aboutsummaryrefslogtreecommitdiff
path: root/app/views/components/navigator.link.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/components/navigator.link.php')
-rw-r--r--app/views/components/navigator.link.php18
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; ?>