From ad4960d32b3d5bc6d8ee58dc5cb0f6553a36f21d Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Sat, 26 Apr 2008 12:56:56 +0000 Subject: integrated menuactive patch --- CHANGES | 3 +++ etc/basepage.html.dist | 9 ++++++++- lib/Smokeping.pm | 6 +++++- 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; } + --> 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/ / /g; my $menuadd =""; $menuadd = " " x (20 - length($menu)) if length($menu) < 20; - $print .= qq{ - $menu$menuadd\n}; + my $menuclass = "menulink"; + if ($key eq $current and !@$open) { + $menuclass = "menulinkactive"; + } + $print .= qq{ - $menu$menuadd\n}; if ($key eq $current){ my $prline = target_menu $tree->{$key}, $open, "$path$key.",$filter, $suffix; $print .= qq{  $prline} -- cgit v1.2.3-24-g4f1b