diff --git a/www/index.pl b/www/index.pl index ef0f041..89f292f 100755 --- a/www/index.pl +++ b/www/index.pl @@ -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>\n}{ + push @toc, $1; + my $c = @toc; + qq{\n$1\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>\n}{ - push @toc, $1; - my $c = @toc; - qq{\n$1\n} - }eg; - - _man_nav($self, $man, \@toc); - div id => 'contents'; pre; lit $fmt; end; end; diff --git a/www/man.css b/www/man.css index 1ed29e9..8753e60 100644 --- a/www/man.css +++ b/www/man.css @@ -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 }