diff --git a/bl-kernel/class/link.class.php b/bl-kernel/class/link.class.php
index f2c6ba68..a4be04ee 100644
--- a/bl-kernel/class/link.class.php
+++ b/bl-kernel/class/link.class.php
@@ -20,7 +20,9 @@ class Link {
function isActive()
{
- return false;
+ global $url;
+ global $site;
+ return str_ends_with($this->href, $url->uri()) || ($this->href == $site->url() && $url->uri() == "/");
}
function haveClass()
@@ -35,6 +37,6 @@ class Link {
function toHTML()
{
- return "haveClass() ? "class='" . $this->getClasses() . "'" : "" ) . " >".$this->label."";
+ return "haveClass() ? "class='" . $this->getClasses() . "'" : "" ) . ($this->isActive() ? "aria-current='page'" : "") . " >".$this->label."";
}
}
\ No newline at end of file
diff --git a/bl-themes/defaultTheme/css/style.css b/bl-themes/defaultTheme/css/style.css
index ec3dd69a..deafdfa7 100755
--- a/bl-themes/defaultTheme/css/style.css
+++ b/bl-themes/defaultTheme/css/style.css
@@ -51,7 +51,8 @@ header#main-header {
border-radius: var(--border-radius);
padding:8px;
}
- a:hover {
+ a:hover,
+ a.active {
background-color: rgba(255,255,255,0.2);
}
}
@@ -129,6 +130,10 @@ aside {
.plugin {
margin-bottom: 1rem;
}
+
+ a.active {
+ font-weight: bold;
+ }
}
nav ul {