summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2016-11-09 18:58:31 +0100
committerYorhel <git@yorhel.nl>2016-11-09 18:58:34 +0100
commitaa01365e6067c2c8cba5a15ebff00b404dc76ce3 (patch)
treecc79b7ee9c01b42ab0e83d737efd40b4db6066b9 /www
parent09af8817676d799ef1c64178bb50a75754295b05 (diff)
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.
Diffstat (limited to 'www')
-rwxr-xr-xwww/index.pl20
-rw-r--r--www/man.css2
2 files changed, 10 insertions, 12 deletions
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>(.+?)<\/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;
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 }