mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
STABLE14-html-man-index-links-20060802
Add links back to the index at the top and bottom of each generated page.
(cherry picked from commit b57f675bc3
)
This commit is contained in:
parent
6a3ab81cf0
commit
1112a44af3
@ -7,6 +7,28 @@ use vars qw(@ISA);
|
|||||||
use Pod::Simple::Search;
|
use Pod::Simple::Search;
|
||||||
@ISA = qw(Pod::Simple::HTML);
|
@ISA = qw(Pod::Simple::HTML);
|
||||||
|
|
||||||
|
# Add a link back to the index page to the top and bottom of each generated
|
||||||
|
# page.
|
||||||
|
#
|
||||||
|
# The hideous approach we have to use is because, unless we create a
|
||||||
|
# Pod::Simple::HTML object and then rebless it, the html_header_after_title
|
||||||
|
# and html_footer subs are placed in the OpenAFS::HTML package. That means we
|
||||||
|
# can't override them in a subclass and still call the SUPER version since
|
||||||
|
# we'll be overwriting the SUPER version, and there aren't other good
|
||||||
|
# opportunities to change the default values that I can see.
|
||||||
|
sub new {
|
||||||
|
my $class = shift;
|
||||||
|
my $self = Pod::Simple::HTML->new (@_);
|
||||||
|
bless ($self, 'OpenAFS::HTML');
|
||||||
|
my $link = '<p class="indexlink"><a href="../index.html">'
|
||||||
|
. 'Back to Index</a></p>' . "\n";
|
||||||
|
my $after = $self->html_header_after_title;
|
||||||
|
$self->html_header_after_title ($after . $link);
|
||||||
|
my $end = $self->html_footer;
|
||||||
|
$self->html_footer ($link . $end);
|
||||||
|
return $self;
|
||||||
|
}
|
||||||
|
|
||||||
sub do_man_link {
|
sub do_man_link {
|
||||||
my ($self, $token) = @_;
|
my ($self, $token) = @_;
|
||||||
my $page = $token->attr ('to');
|
my $page = $token->attr ('to');
|
||||||
|
@ -30,6 +30,8 @@
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p.indexlink { text-align: right }
|
||||||
|
|
||||||
body.pod h1 { font-size: large }
|
body.pod h1 { font-size: large }
|
||||||
body.pod h2 { font-size: large }
|
body.pod h2 { font-size: large }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user