From 95474f96969381de9d555e9e361da779821e5421 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 9 Feb 1999 18:45:50 +0000 Subject: Change the navigation bar to be a little prettier and more consistent with the python.org style. --- Doc/perl/l2hinit.perl | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/Doc/perl/l2hinit.perl b/Doc/perl/l2hinit.perl index 5fd2f81..1068b25 100644 --- a/Doc/perl/l2hinit.perl +++ b/Doc/perl/l2hinit.perl @@ -92,30 +92,35 @@ sub set_icon_size{ $iconsizes{$name} = "width=$w height=$h"; } -foreach $name (split(/ /, 'up next previous contents index modules')) { +foreach $name (split(/ /, 'up next previous contents index modules blank')) { set_icon_size($name, 32, 32); } # The '_motif' is really annoying, and makes the HTML larger with no value # added, so strip it off: foreach $name (keys %icons) { my $icon = $icons{$name}; + # Strip off the wasteful '_motif': $icon =~ s/_motif//; + # Change the greyed-out icons to be blank: + $icon =~ s/[a-z]*_gr/blank/; $icons{$name} = $icon; } +$icons{'blank'} = 'blank.' . $IMAGE_TYPE; $CUSTOM_BUTTONS = ''; +$BLANK_ICON = "\n" . img_tag('blank.' . $IMAGE_TYPE) . ""; sub make_nav_panel{ - ('\n\n
' - . ($NEXT_TITLE ? "$NEXT " : '') - . ($UP_TITLE ? "$UP " : '') - . ($PREVIOUS_TITLE ? "$PREVIOUS " : '') - . "$t_title" - . "" - . $CONTENTS - . ' ' . $CUSTOM_BUTTONS - . ' ' . $INDEX - . "
\n
\n" + ("\n" + . "\n" + . "\n" + . "\n" + . "\n" + . ($CONTENTS ? "\n" : $BLANK_ICON) + . "\n" # module index + . ($INDEX ? "\n" : $BLANK_ICON) + . "\n
$NEXT$UP$PREVIOUS" + . "\n $t_title$CONTENTS$CUSTOM_BUTTONS$INDEX

\n" . ($NEXT_TITLE ? "Next: $NEXT_TITLE\n" : '') . ($UP_TITLE ? "Up: $UP_TITLE\n" : '') . ($PREVIOUS_TITLE ? "Previous: $PREVIOUS_TITLE\n" : '')); @@ -176,7 +181,7 @@ sub img_tag { $alt = join('|', 'up', 'next_group', 'previous_group' , 'next', 'previous', 'change_begin_right', 'change_begin' , 'change_end_right', 'change_end', 'change_delete_right' - , 'change_delete', 'contents', 'index', 'modules'); + , 'change_delete', 'contents', 'index', 'modules', 'blank'); if ($icon =~ /(gif|png)$/) { $used_icons{$icon} = 1; @@ -380,6 +385,7 @@ sub add_bbl_and_idx_dummy_commands { . img_tag('modules.'.$IMAGE_TYPE) . ""); } else { + $CUSTOM_BUTTONS .= img_tag('blank.' . $IMAGE_TYPE); $global{'max_id'} = $id; # not sure why.... s/([\\]begin\s*$O\d+$C\s*theindex)/\\textohtmlindex $1/o; s/[\\]printindex/\\textohtmlindex /o; @@ -444,7 +450,7 @@ sub protect_useritems { } # This changes the markup used for {verbatim} environments, and is the -# best way I've found that ensures the
goes one the outside of the +# best way I've found that ensures the
goes on the outside of the #
...
. # # Note that this *must* be done in the init file, not the python.perl -- cgit v0.12