From f1ace7192668cc37bb831946c098748693a6bd53 Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Sat, 23 Jul 2022 17:08:47 -0400 Subject: Patches for man.cameronkatri.com --- cgi.c | 51 +++++++++++++++++++++++++++------------------------ mandoc.css | 22 ++++++++++++++++------ 2 files changed, 43 insertions(+), 30 deletions(-) diff --git a/cgi.c b/cgi.c index 68460c55..7627f490 100644 --- a/cgi.c +++ b/cgi.c @@ -105,37 +105,39 @@ static const char *scriptname = SCRIPT_NAME; static const int sec_prios[] = {1, 4, 5, 8, 6, 3, 7, 2, 9}; static const char *const sec_numbers[] = { - "0", "1", "2", "3", "3p", "4", "5", "6", "7", "8", "9" + "0", "0p", "1", "1p", "2", "3", "3p", "3lua", "4", "5", "6", "7", "8", "9", "9lua" }; static const char *const sec_names[] = { "All Sections", + "0p - POSIX Headers", "1 - General Commands", + "1p - POSIX Utilities", "2 - System Calls", "3 - Library Functions", - "3p - Perl Library", + "3p - POSIX Functions | Perl Library", + "3lua - Lua Modules", "4 - Device Drivers", "5 - File Formats", "6 - Games", "7 - Miscellaneous Information", "8 - System Manager\'s Manual", - "9 - Kernel Developer\'s Manual" + "9 - Kernel Developer\'s Manual", + "9lua - Lua Kernel Bindings" }; static const int sec_MAX = sizeof(sec_names) / sizeof(char *); static const char *const arch_names[] = { - "amd64", "alpha", "armv7", "arm64", - "hppa", "i386", "landisk", "loongson", - "luna88k", "macppc", "mips64", "octeon", - "powerpc64", "riscv64", "sparc64", - - "amiga", "arc", "armish", "arm32", - "atari", "aviion", "beagle", "cats", - "hppa64", "hp300", - "ia64", "mac68k", "mvme68k", "mvme88k", - "mvmeppc", "palm", "pc532", "pegasos", - "pmax", "powerpc", "sgi", "socppc", - "solbourne", "sparc", - "sun3", "vax", "wgrisc", "x68k", + "amd64", "arm64", "i386", "vax", + "tahoe", "hp300", "alpha", "armv7", + "hppa", "landisk", "loongson", "luna88k", + "macppc", "mips64", "octeon", "powerpc64", + "riscv64", "sparc64", "amiga", "arc", + "armish", "arm32", "atari", "aviion", + "beagle", "cats", "hppa64", "ia64", + "mac68k", "mvme68k", "mvme88k", "mvmeppc", + "palm", "pc532", "pegasos", "pmax", + "powerpc", "sgi", "socppc", "solbourne", + "sparc", "sun3", "wgrisc", "x68k", "zaurus" }; static const int arch_MAX = sizeof(arch_names) / sizeof(char *); @@ -439,19 +441,19 @@ resp_searchform(const struct req *req, enum focus focus) printf("
\n" "
\n" - " Manual Page Search Parameters\n", + " Manual Page Search Parameters\n" + "
\n", scriptname); /* Write query input box. */ - printf(" "); + puts(">\n"); /* Write submission buttons. */ @@ -459,7 +461,7 @@ resp_searchform(const struct req *req, enum focus focus) "man\n" " \n" - "
\n"); + "
\n"); /* Write section selector. */ @@ -568,10 +570,10 @@ pg_index(const struct req *req) "
\n" "

\n" "This web interface is documented in the\n" - "man.cgi(8)\n" "manual, and the\n" - "apropos(1)\n" "manual explains the query syntax.\n" "

\n" @@ -999,6 +1001,7 @@ pg_show(struct req *req, const char *fullpath) puts("
"); resp_searchform(req, FOCUS_NONE); puts("
"); + puts("
"); resp_show(req, file); resp_end_html(); } diff --git a/mandoc.css b/mandoc.css index 1dae1270..630f01b6 100644 --- a/mandoc.css +++ b/mandoc.css @@ -10,12 +10,15 @@ /* Global defaults. */ -html { max-width: 65em; - --bg: #FFFFFF; +html { --bg: #FFFFFF; --fg: #000000; } body { background: var(--bg); color: var(--fg); - font-family: Helvetica,Arial,sans-serif; } + font-family: monospace,Helvetica,Arial,sans-serif; + max-width: 80ch; + margin: 1em auto; + padding: 0 1ch; + font-family: monospace,Helvetica,Arial,sans-serif; } h1, h2 { font-size: 110%; } table { margin-top: 0em; margin-bottom: 0em; @@ -41,8 +44,13 @@ pre { font-family: inherit; } /* Search form and search results. */ +form { position: sticky; + top: 0px; + background-color: var(--bg); + z-index: 1; } + fieldset { border: thin solid silver; - border-radius: 1em; + border-radius: 0.3em; text-align: center; } input[name=expr] { width: 25%; } @@ -57,6 +65,7 @@ div[role=doc-pageheader] { display: flex; border-bottom: 1px dotted #808080; margin-bottom: 1em; + overflow-wrap: anywhere; font-size: smaller; } .head-ltitle { flex: 1; } .head-vol { flex: 0 1 auto; @@ -69,6 +78,7 @@ div[role=doc-pagefooter] { justify-content: space-between; border-top: 1px dotted #808080; margin-top: 1em; + overflow-wrap: anywhere; font-size: smaller; } .foot-left { flex: 1; } .foot-date { flex: 0 1 auto; @@ -361,8 +371,8 @@ h2.Sh, h3.Ss { margin-left: 0em; } /* Overrides for a dark color scheme for accessibility. */ @media (prefers-color-scheme: dark) { -html { --bg: #1E1F21; - --fg: #EEEFF1; } +html { --bg: #000000; + --fg: #FFFFFF; } :link { color: #BAD7FF; } :visited { color: #F6BAFF; } } -- cgit v1.2.3-56-ge451