summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES3
-rw-r--r--etc/basepage.html.dist9
-rw-r--r--lib/Smokeping.pm6
3 files changed, 16 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index c4e17fd..b8895c9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+* add custom style for active menu link
+ -- tobi, patch by Daniel Rich drich employees.org
+
* honour the 'linkstyle' variable when zooming
-- niko, reported by Wolfgang Tremmel as Debian bug #476404
diff --git a/etc/basepage.html.dist b/etc/basepage.html.dist
index cc5bb67..a4b31d9 100644
--- a/etc/basepage.html.dist
+++ b/etc/basepage.html.dist
@@ -30,16 +30,23 @@
}
.menuactive {
- background: #202040;
+ background: white;
}
a.menulink {
color: white;
}
+
+a.menulinkactive {
+ color: #1280d7;
+ }
+
+a.menulinkactive:hover,
a.menulink:hover {
color: #e0e0ff;
}
+
-->
</STYLE>
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index 50fad0f..db0e1b9 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -660,7 +660,11 @@ sub target_menu($$$$;$){
$menu =~ s/ /&nbsp;/g;
my $menuadd ="";
$menuadd = "&nbsp;" x (20 - length($menu)) if length($menu) < 20;
- $print .= qq{<tr><td class="$class" colspan="2">&nbsp;-&nbsp;<a class="menulink" HREF="$path$key$suffix">$menu</a>$menuadd</td></tr>\n};
+ my $menuclass = "menulink";
+ if ($key eq $current and !@$open) {
+ $menuclass = "menulinkactive";
+ }
+ $print .= qq{<tr><td class="$class" colspan="2">&nbsp;-&nbsp;<a class="$menuclass" HREF="$path$key$suffix">$menu</a>$menuadd</td></tr>\n};
if ($key eq $current){
my $prline = target_menu $tree->{$key}, $open, "$path$key.",$filter, $suffix;
$print .= qq{<tr><td class="$class">&nbsp;&nbsp;</td><td align="left">$prline</td></tr>}