File: webdoc.init

package info (click to toggle)
pound 4.17-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,008 kB
  • sloc: ansic: 26,296; perl: 2,311; makefile: 242; sh: 42; sed: 18
file content (61 lines) | stat: -rw-r--r-- 2,101 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
use strict;
use warnings;
set_from_init_file('EXTRA_HEAD', qq{
<link rel="stylesheet" type="text/css" href="css/manual.css"/>
});
set_from_init_file('CSS_LINES', '');
set_from_init_file('SHOW_TITLE',undef);
# set_from_init_file('TOP_FILE','Pound.html');
# set_from_init_file('TOP_BUTTONS', undef);

sub gray_node_direction($$)
{
    my $self = shift;
    my $direction = shift;

    my $href = $self->_element_direction($self->{'current_element'},
					 $direction, 'href');
    my $node = $self->_element_direction($self->{'current_element'},
                                         $direction, 'node');

    my $result;
    if (defined($href) and defined($node) and $node =~ /\S/) {
	my $anchor_attributes = $self->_direction_href_attributes($direction);
	if ($direction eq 'Contents' || $direction eq 'Index') {
	    $result = '<span class="button-right">' .
	              "[<a href=\"$href\"${anchor_attributes}>$direction</a>]" .
	              '</span>';
        } else {
            $result = '<span class="button">' .
	              $self->get_conf('BUTTONS_TEXT')->{$direction} .
	              ": <a href=\"$href\"${anchor_attributes}>$node</a>" .
 	              '</span>';
        }
    }
    if ($Texinfo::Convert::HTML::VERSION < 6.8) {
	return $result;
    } else {
	return ($result,0);
    }
}

my @gray_buttons = ( [ 'Back', \&gray_node_direction ],
		     [ 'Forward', \&gray_node_direction ],
                     [ 'NodeUp', \&gray_node_direction ],
		     [ 'Contents', \&gray_node_direction ],
                     [ 'Index', \&gray_node_direction ] );
my %gray_buttons_text = (
    Back => 'Prev',
    Forward => 'Next',
    NodeUp => 'Up',
    Contents => 'Contents',
    Index => 'Index'
);

set_from_init_file('BUTTONS_TEXT', \%gray_buttons_text);
set_from_init_file('TOP_BUTTONS', undef);
set_from_init_file('SECTION_BUTTONS', \@gray_buttons);
set_from_init_file('CHAPTER_BUTTONS', \@gray_buttons);
set_from_init_file('NODE_FOOTER_BUTTONS', \@gray_buttons);
set_from_init_file('SECTION_FOOTER_BUTTONS', \@gray_buttons);
set_from_init_file('MISC_BUTTONS', \@gray_buttons);