diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2008-04-26 14:56:56 +0200 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2008-04-26 14:56:56 +0200 |
commit | ad4960d32b3d5bc6d8ee58dc5cb0f6553a36f21d (patch) | |
tree | 9f91d61b357ae0b453d505ac3ce7c82f42712199 | |
parent | e1aa9c368e3ad73b576d4410ffc937d1d03c50f1 (diff) | |
download | smokeping-ad4960d32b3d5bc6d8ee58dc5cb0f6553a36f21d.tar.gz smokeping-ad4960d32b3d5bc6d8ee58dc5cb0f6553a36f21d.tar.xz |
integrated menuactive patch
-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>} |