aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--cgi.c15
-rw-r--r--man_html.c18
-rw-r--r--mandoc.css43
-rw-r--r--mdoc_html.c18
4 files changed, 41 insertions, 53 deletions
diff --git a/cgi.c b/cgi.c
index 30a0ea43..5a21856a 100644
--- a/cgi.c
+++ b/cgi.c
@@ -1,7 +1,7 @@
-/* $Id: cgi.c,v 1.141 2016/09/12 00:06:20 schwarze Exp $ */
+/* $Id: cgi.c,v 1.142 2017/01/19 13:35:02 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2014, 2015, 2016 Ingo Schwarze <schwarze@usta.de>
+ * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@usta.de>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -356,8 +356,7 @@ resp_begin_html(int code, const char *msg)
" type=\"text/css\" media=\"all\">\n"
"<title>%s</title>\n"
"</head>\n"
- "<body>\n"
- "<!-- Begin page content. //-->\n",
+ "<body>\n",
CSS_DIR, CUSTOMIZE_TITLE);
resp_copy(MAN_DIR "/header.html");
@@ -378,9 +377,7 @@ resp_searchform(const struct req *req, enum focus focus)
{
int i;
- puts("<!-- Begin search form. //-->");
- printf("<div id=\"mancgi\">\n"
- "<form action=\"/%s\" method=\"get\">\n"
+ printf("<form action=\"/%s\" method=\"get\">\n"
"<fieldset>\n"
"<legend>Manual Page Search Parameters</legend>\n",
scriptname);
@@ -448,9 +445,7 @@ resp_searchform(const struct req *req, enum focus focus)
}
puts("</fieldset>\n"
- "</form>\n"
- "</div>");
- puts("<!-- End search form. //-->");
+ "</form>");
}
static int
diff --git a/man_html.c b/man_html.c
index cf973ce0..1ee661aa 100644
--- a/man_html.c
+++ b/man_html.c
@@ -1,4 +1,4 @@
-/* $Id: man_html.c,v 1.125 2017/01/19 01:00:14 schwarze Exp $ */
+/* $Id: man_html.c,v 1.126 2017/01/19 13:35:02 schwarze Exp $ */
/*
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -148,24 +148,22 @@ html_man(void *arg, const struct roff_man *man)
{
struct mhtml mh;
struct html *h;
- struct tag *t, *tt;
+ struct tag *t;
memset(&mh, 0, sizeof(mh));
h = (struct html *)arg;
- if ( ! (HTML_FRAGMENT & h->oflags)) {
+ if ((h->oflags & HTML_FRAGMENT) == 0) {
print_gen_decls(h);
- t = print_otag(h, TAG_HTML, "");
- tt = print_otag(h, TAG_HEAD, "");
+ print_otag(h, TAG_HTML, "");
+ t = print_otag(h, TAG_HEAD, "");
print_man_head(&man->meta, man->first, &mh, h);
- print_tagq(h, tt);
+ print_tagq(h, t);
print_otag(h, TAG_BODY, "");
- print_otag(h, TAG_DIV, "c", "mandoc");
- } else
- t = print_otag(h, TAG_DIV, "c", "mandoc");
+ }
print_man_nodelist(&man->meta, man->first, &mh, h);
- print_tagq(h, t);
+ print_tagq(h, NULL);
}
static void
diff --git a/mandoc.css b/mandoc.css
index 90085061..5c4e930a 100644
--- a/mandoc.css
+++ b/mandoc.css
@@ -1,29 +1,26 @@
-/* $Id: mandoc.css,v 1.2 2016/04/13 10:19:23 schwarze Exp $ */
-
+/* $Id: mandoc.css,v 1.3 2017/01/19 13:35:02 schwarze Exp $ */
/*
- * This is an example style-sheet provided for mandoc(1) and the -Thtml
- * or -Txhtml output mode.
- *
- * It mimics the appearance of the traditional cvsweb output.
- *
- * See mdoc(7) and man(7) for macro explanations.
+ * Standard style sheet for mandoc(1) -Thtml and man.cgi(8).
*/
-html { max-width: 880px; margin-left: 1em; }
-body { font-size: smaller; font-family: Helvetica,Arial,sans-serif; }
-body > div { padding-left: 2em;
- padding-top: 1em; }
-body > div.mandoc,
-body > div#mancgi { padding-left: 0em;
- padding-top: 0em; }
-body > div.results { font-size: smaller; }
-#mancgi fieldset { text-align: center;
- border: thin solid silver;
- border-radius: 1em;
- font-size: small; }
-#mancgi input[name=expr] { width: 25%; }
-.results td.title { vertical-align: top;
- padding-right: 1em; }
+/* Global defaults. */
+
+html { max-width: 100ex; }
+body { font-family: Helvetica,Arial,sans-serif; }
+
+/* Search form and search results. */
+
+fieldset { border: thin solid silver;
+ border-radius: 1em;
+ text-align: center; }
+input[name=expr] {
+ width: 25%; }
+
+div.results { margin-top: 1em;
+ margin-left: 2em;
+ font-size: smaller; }
+
+
h1 { margin-bottom: 1ex; font-size: 110% }
div.section > h1 { margin-left: -4ex; } /* Section header (Sh, SH). */
h2 { margin-bottom: 1ex; font-size: 105%; margin-left: -2ex; } /* Sub-section header (Ss, SS). */
diff --git a/mdoc_html.c b/mdoc_html.c
index c62c8e9e..62a319ac 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.251 2017/01/19 01:00:14 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.252 2017/01/19 13:35:02 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -299,25 +299,23 @@ void
html_mdoc(void *arg, const struct roff_man *mdoc)
{
struct html *h;
- struct tag *t, *tt;
+ struct tag *t;
h = (struct html *)arg;
- if ( ! (HTML_FRAGMENT & h->oflags)) {
+ if ((h->oflags & HTML_FRAGMENT) == 0) {
print_gen_decls(h);
- t = print_otag(h, TAG_HTML, "");
- tt = print_otag(h, TAG_HEAD, "");
+ print_otag(h, TAG_HTML, "");
+ t = print_otag(h, TAG_HEAD, "");
print_mdoc_head(&mdoc->meta, mdoc->first->child, h);
- print_tagq(h, tt);
+ print_tagq(h, t);
print_otag(h, TAG_BODY, "");
- print_otag(h, TAG_DIV, "c", "mandoc");
- } else
- t = print_otag(h, TAG_DIV, "c", "mandoc");
+ }
mdoc_root_pre(&mdoc->meta, mdoc->first->child, h);
print_mdoc_nodelist(&mdoc->meta, mdoc->first->child, h);
mdoc_root_post(&mdoc->meta, mdoc->first->child, h);
- print_tagq(h, t);
+ print_tagq(h, NULL);
}
static void