Move nav menu a bit up to create space

This is where the old nav menu used to be. This involved shrinking the
width of the locations/versions selector, but that never needed the full
page width anyway. Unfortunately I suck at CSS so the nav menu and
selector thing won't look too great on smaller screen sizes; but that's
just a minor visual uglyness.
This commit is contained in:
Yorhel 2016-11-09 18:58:31 +01:00
parent 09af881767
commit aa01365e60
2 changed files with 10 additions and 12 deletions

View file

@ -641,8 +641,17 @@ sub man {
}
return $self->resNotFound() if !$man;
my $fmt = ManUtils::html(ManUtils::fmt_block $self->dbManContent($man->{hash}));
my @toc;
$fmt =~ s{\n<b>(.+?)<\/b>\n}{
push @toc, $1;
my $c = @toc;
qq{\n<a href="#head$c" id="head$c">$1</a>\n}
}eg;
$self->setLastMod($man->{released});
$self->htmlHeader(title => $name);
_man_nav($self, $man, \@toc);
div id => 'manbuttons';
h1 $man->{name};
ul 'data-hash' => $man->{hash}, 'data-name' => $man->{name}, 'data-section' => $man->{section}, 'data-locale' => $man->{locale}||'',
@ -654,17 +663,6 @@ sub man {
div id => 'manres', class => 'hidden';
end;
my $c = $self->dbManContent($man->{hash});
my $fmt = ManUtils::html(ManUtils::fmt_block $c);
my @toc;
$fmt =~ s{\n<b>(.+?)<\/b>\n}{
push @toc, $1;
my $c = @toc;
qq{\n<a href="#head$c" id="head$c">$1</a>\n}
}eg;
_man_nav($self, $man, \@toc);
div id => 'contents';
pre; lit $fmt; end;
end;

View file

@ -87,7 +87,7 @@ i.grayedout { color: #aaa; font-size: 13px; }
#closebtn { float: right; margin: -5px 0 -20px 0; text-decoration: none; outline: none; color: #036; font-weight: bold }
#manres { margin: 0 0 10px 0; width: 100%; padding: 10px; box-sizing: border-box; background: #f0f8ff; border-radius: 10px; border-left: 1px dashed #333; border-right: 1px dashed #333 }
#manres { margin: 0 0 10px 0; width: 70%; padding: 10px; box-sizing: border-box; background: #f0f8ff; border-radius: 10px; border-left: 1px dashed #333; border-right: 1px dashed #333 }
#manres i { color: #aaa; font-size: 13px; margin-left: 7px }
#manres ul { list-style-type: none }
#manres ul a { outline: none; text-decoration: none }