diff options
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | etc/basepage.html.dist | 9 | ||||
-rw-r--r-- | lib/Smokeping.pm | 6 |
3 files changed, 16 insertions, 2 deletions
@@ -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/ / /g; my $menuadd =""; $menuadd = " " x (20 - length($menu)) if length($menu) < 20; - $print .= qq{<tr><td class="$class" colspan="2"> - <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"> - <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"> </td><td align="left">$prline</td></tr>} |