From 062bc6e59862bef0bc61fa256db8ad92bf330ed5 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Thu, 13 Aug 1998 22:03:46 +0000 Subject: [PATCH] Do the magic to use the new buttons (with shorter names!) instead of the old ones. Get the width & height right. New design for the navigation bars, including the document title as well as the navigation links/buttons. --- Doc/perl/l2hinit.perl | 52 ++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/Doc/perl/l2hinit.perl b/Doc/perl/l2hinit.perl index 59e6fb5cbc..20ebbe24fa 100644 --- a/Doc/perl/l2hinit.perl +++ b/Doc/perl/l2hinit.perl @@ -85,25 +85,38 @@ sub custom_driver_hook{ } -$iconsizes{'up'} = 'width="75" height="25"'; -$iconsizes{'next'} = 'width="75" height="25"'; -$iconsizes{'previous'} = 'width="75" height="25"'; -$iconsizes{'contents'} = 'width="75" height="25"'; -$iconsizes{'index'} = 'width="75" height="25"'; +sub set_icon_size{ + my($name, $w, $h) = @_; + $iconsizes{$name} = "width=$w height=$h"; +} + +foreach $name (split(/ /, 'up next previous contents index modules')) { + 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}; + $icon =~ s/_motif//; + $icons{$name} = $icon; +} $CUSTOM_BUTTONS = ''; sub make_nav_panel{ - ($NEXT_TITLE ? $NEXT : '') - . ($UP_TITLE ? $UP : '') - . ($PREVIOUS_TITLE ? $PREVIOUS : '') - . $CONTENTS - . $CUSTOM_BUTTONS - . $INDEX - . "\n
\n" - . ($NEXT_TITLE ? "Next: $NEXT_TITLE\n" : '') - . ($UP_TITLE ? "Up: $UP_TITLE\n" : '') - . ($PREVIOUS_TITLE ? "Previous: $PREVIOUS_TITLE\n" : ''); + ('\n\n
' + . ($NEXT_TITLE ? "$NEXT " : '') + . ($UP_TITLE ? "$UP " : '') + . ($PREVIOUS_TITLE ? "$PREVIOUS " : '') + . "$t_title" + . "" + . $CONTENTS + . ' ' . $CUSTOM_BUTTONS + . ' ' . $INDEX + . "
\n
\n" + . ($NEXT_TITLE ? "Next: $NEXT_TITLE\n" : '') + . ($UP_TITLE ? "Up: $UP_TITLE\n" : '') + . ($PREVIOUS_TITLE ? "Previous: $PREVIOUS_TITLE\n" : '')); } sub top_navigation_panel { @@ -157,10 +170,11 @@ sub img_tag { my $alt; my $align = " align=bottom "; + # having this list hardcoded here is really bogus.... $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'); + , 'change_delete', 'contents', 'index', 'modules'); if ($icon =~ /(gif|png)$/) { $used_icons{$icon} = 1; @@ -359,10 +373,8 @@ sub add_bbl_and_idx_dummy_commands { . "([\\\\]begin\\s*$O\\d+$C\\s*theindex)"; s/$rx/\\textohtmlmoduleindex \1 \\textohtmlindex \2/o; # Add a button to the navigation areas: - $CUSTOM_BUTTONS .= (""); + $CUSTOM_BUTTONS .= ("" + . img_tag('modules.'.$IMAGE_TYPE) . ""); } else { $global{'max_id'} = $id; # not sure why.... -- 2.50.0