diff options
author | Cameron Katri <me@cameronkatri.com> | 2022-07-23 17:08:47 -0400 |
---|---|---|
committer | Cameron Katri <me@cameronkatri.com> | 2022-07-23 17:08:54 -0400 |
commit | f1ace7192668cc37bb831946c098748693a6bd53 (patch) | |
tree | 99f625b3afe02c2db4d4f09102e5647fab7c80dd | |
parent | 04dce665d85adc2740ef42df06c0a2aa16c8c578 (diff) | |
download | mandoc-cameronkatri.tar.gz mandoc-cameronkatri.tar.zst mandoc-cameronkatri.zip |
Patches for man.cameronkatri.comcameronkatri
-rw-r--r-- | cgi.c | 51 | ||||
-rw-r--r-- | mandoc.css | 22 |
2 files changed, 43 insertions, 30 deletions
@@ -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("<form role=\"search\" action=\"/%s\" method=\"get\" " "autocomplete=\"off\" autocapitalize=\"none\">\n" " <fieldset>\n" - " <legend>Manual Page Search Parameters</legend>\n", + " <legend>Manual Page Search Parameters</legend>\n" + " <div style=\"display: flex; flex-direction: row;\">\n", scriptname); /* Write query input box. */ - printf(" <label>Search query:\n" - " <input type=\"search\" name=\"query\" value=\""); + printf(" <input aria-label=\"Search query\" type=\"search\" name=\"query\" value=\""); if (req->q.query != NULL) html_print(req->q.query); - printf("\" size=\"40\""); + printf("\" style=\"flex-grow: 1;\""); if (focus == FOCUS_QUERY) printf(" autofocus"); - puts(">\n </label>"); + puts(">\n"); /* Write submission buttons. */ @@ -459,7 +461,7 @@ resp_searchform(const struct req *req, enum focus focus) "man</button>\n" " <button type=\"submit\" name=\"apropos\" value=\"1\">" "apropos</button>\n" - " <br/>\n"); + " </div>\n"); /* Write section selector. */ @@ -568,10 +570,10 @@ pg_index(const struct req *req) "<main>\n" "<p role=\"doc-notice\" aria-label=\"Usage\">\n" "This web interface is documented in the\n" - "<a class=\"Xr\" href=\"/%s%sman.cgi.8\"" + "<a class=\"Xr\" href=\"/%s%smandoc/man.cgi.8\"" " aria-label=\"man dot CGI, section 8\">man.cgi(8)</a>\n" "manual, and the\n" - "<a class=\"Xr\" href=\"/%s%sapropos.1\"" + "<a class=\"Xr\" href=\"/%s%smandoc/apropos.1\"" " aria-label=\"apropos, section 1\">apropos(1)</a>\n" "manual explains the query syntax.\n" "</p>\n" @@ -999,6 +1001,7 @@ pg_show(struct req *req, const char *fullpath) puts("<header>"); resp_searchform(req, FOCUS_NONE); puts("</header>"); + puts("<hr>"); resp_show(req, file); resp_end_html(); } @@ -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; } } |