summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cgi.c13
-rw-r--r--man_html.c16
-rw-r--r--mandoc.css41
-rw-r--r--mdoc_html.c16
4 files changed, 37 insertions, 49 deletions
diff --git a/cgi.c b/cgi.c
index 214f7152..5f8683b8 100644
--- a/cgi.c
+++ b/cgi.c
@@ -1,7 +1,7 @@
/* $Id$ */
/*
* 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 bf552e88..77650d89 100644
--- a/man_html.c
+++ b/man_html.c
@@ -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 d5ba3c48..44d956bb 100644
--- a/mandoc.css
+++ b/mandoc.css
@@ -1,29 +1,26 @@
/* $Id$ */
-
/*
- * 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 a3916945..d90e6447 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -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