git: 1ab6e30ab5 - main - limit with of section links to main content area
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 09 Jun 2025 10:46:54 UTC
The branch main has been updated by wosch:
URL: https://cgit.FreeBSD.org/doc/commit/?id=1ab6e30ab5a7690758e1c8224a0f9128c3c8275a
commit 1ab6e30ab5a7690758e1c8224a0f9128c3c8275a
Author: Wolfram Schneider <wosch@FreeBSD.org>
AuthorDate: 2025-06-09 10:45:22 +0000
Commit: Wolfram Schneider <wosch@FreeBSD.org>
CommitDate: 2025-06-09 10:45:22 +0000
limit with of section links to main content area
Some manual pages such as release(7) have a long list of sections. On a
large screen, the list should not be wider than the manual page itself.
---
website/content/en/cgi/man.cgi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/website/content/en/cgi/man.cgi b/website/content/en/cgi/man.cgi
index 1d88e5b514..d3ae02fb5c 100755
--- a/website/content/en/cgi/man.cgi
+++ b/website/content/en/cgi/man.cgi
@@ -1406,6 +1406,7 @@ span.footer_links { font-size: small; }
span.space { font-size: xx-small; }
form#man > input, form#man > button { font-size: large; }
form#man > input[name='query'] { text-align: center; }
+p#section_links { max-width: 50em; }
@media only screen and (max-height: 640px), (max-width: 760px) {
/* hide logo color top */
@@ -1993,6 +1994,7 @@ qq{Please try a <a href="$BASE?apropos=1&manpath=freebsd-release-ports&q
close(MAN);
print qq{</pre>\n<a name="end" />\n<hr />\n};
+ print qq{\n<p id="section_links">\n};
for ( $i = 0 ; $i <= $#sect ; $i++ ) {
$j = &encode_url( $sect[$i] );
$j =~ s/\+/_/g;
@@ -2001,6 +2003,7 @@ qq{Please try a <a href="$BASE?apropos=1&manpath=freebsd-release-ports&q
. qq{">$sect[$i]</a>}
. ( $i < $#sect ? " |\n" : "\n" );
}
+ print qq{</p>\n\n};
if ($want_to_link_to_this_page) {
my $url = qq{$full_url?query=$html_name};