aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-21 01:20:31 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-21 01:20:31 +0000
commit46475ae69cd0362524d880fbc82985ec1661d3f4 (patch)
tree3759c0c6674c5e9965f0ca2f2f7dca93b485ce09
parent1ff4a5800512d80bdb3345375ad249c237f230e5 (diff)
downloadmandoc-46475ae69cd0362524d880fbc82985ec1661d3f4.tar.gz
mandoc-46475ae69cd0362524d880fbc82985ec1661d3f4.tar.zst
mandoc-46475ae69cd0362524d880fbc82985ec1661d3f4.zip
clean up the remaining class attributes
-rw-r--r--cgi.c23
-rw-r--r--man_html.c8
-rw-r--r--mandoc.css41
-rw-r--r--mdoc_html.c16
4 files changed, 35 insertions, 53 deletions
diff --git a/cgi.c b/cgi.c
index 0ab736b8..06beca3f 100644
--- a/cgi.c
+++ b/cgi.c
@@ -1,4 +1,4 @@
-/* $Id: cgi.c,v 1.143 2017/01/19 13:55:56 schwarze Exp $ */
+/* $Id: cgi.c,v 1.144 2017/01/21 01:20:31 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@usta.de>
@@ -494,9 +494,9 @@ pg_index(const struct req *req)
resp_searchform(req, FOCUS_QUERY);
printf("<p>\n"
"This web interface is documented in the\n"
- "<a href=\"/%s%sman.cgi.8\">man.cgi(8)</a>\n"
+ "<a class=\"Xr\" href=\"/%s%sman.cgi.8\">man.cgi(8)</a>\n"
"manual, and the\n"
- "<a href=\"/%s%sapropos.1\">apropos(1)</a>\n"
+ "<a class=\"Xr\" href=\"/%s%sapropos.1\">apropos(1)</a>\n"
"manual explains the query syntax.\n"
"</p>\n",
scriptname, *scriptname == '\0' ? "" : "/",
@@ -576,26 +576,21 @@ pg_searchres(const struct req *req, struct manpage *r, size_t sz)
req->q.equal || sz == 1 ? FOCUS_NONE : FOCUS_QUERY);
if (sz > 1) {
- puts("<div class=\"results\">");
- puts("<table>");
-
+ puts("<table class=\"results\">");
for (i = 0; i < sz; i++) {
printf(" <tr>\n"
- " <td class=\"title\">"
- "<a href=\"/%s%s%s/%s",
+ " <td>"
+ "<a class=\"Xr\" href=\"/%s%s%s/%s\">",
scriptname, *scriptname == '\0' ? "" : "/",
req->q.manpath, r[i].file);
- printf("\">");
html_print(r[i].names);
printf("</a></td>\n"
- " <td class=\"desc\">");
+ " <td><span class=\"Nd\">");
html_print(r[i].output);
- puts("</td>\n"
+ puts("</span></td>\n"
" </tr>");
}
-
- puts("</table>\n"
- "</div>");
+ puts("</table>");
}
/*
diff --git a/man_html.c b/man_html.c
index 028dc735..641e0e33 100644
--- a/man_html.c
+++ b/man_html.c
@@ -1,4 +1,4 @@
-/* $Id: man_html.c,v 1.128 2017/01/20 23:51:00 schwarze Exp $ */
+/* $Id: man_html.c,v 1.129 2017/01/21 01:20:32 schwarze Exp $ */
/*
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -455,16 +455,16 @@ man_IP_pre(MAN_ARGS)
const struct roff_node *nn;
if (n->type == ROFFT_BODY) {
- print_otag(h, TAG_DD, "");
+ print_otag(h, TAG_DD, "c", "It-tag");
return 1;
} else if (n->type != ROFFT_HEAD) {
- print_otag(h, TAG_DL, "");
+ print_otag(h, TAG_DL, "c", "Bl-tag");
return 1;
}
/* FIXME: width specification. */
- print_otag(h, TAG_DT, "");
+ print_otag(h, TAG_DT, "c", "It-tag");
/* For IP, only print the first header element. */
diff --git a/mandoc.css b/mandoc.css
index ae4771fe..7e55118b 100644
--- a/mandoc.css
+++ b/mandoc.css
@@ -1,4 +1,4 @@
-/* $Id: mandoc.css,v 1.10 2017/01/20 23:51:00 schwarze Exp $ */
+/* $Id: mandoc.css,v 1.11 2017/01/21 01:20:32 schwarze Exp $ */
/*
* Standard style sheet for mandoc(1) -Thtml and man.cgi(8).
*/
@@ -20,7 +20,7 @@ fieldset { border: thin solid silver;
input[name=expr] {
width: 25%; }
-div.results { margin-top: 1em;
+table.results { margin-top: 1em;
margin-left: 2em;
font-size: smaller; }
@@ -32,6 +32,7 @@ table.head { border-bottom: 1px dotted #808080;
td.head-vol { text-align: center; }
td.head-rtitle {
text-align: right; }
+span.Nd { }
table.foot { border-top: 1px dotted #808080;
margin-top: 1em;
@@ -112,6 +113,9 @@ span.RsT { text-decoration: underline; }
a.RsU { }
span.RsV { }
+span.eqn { }
+table.tbl { }
+
/* Semantic markup for command line utilities. */
table.Nm { }
@@ -152,33 +156,16 @@ a.Mt { }
b.Cd { font-style: normal; }
i.Ad { font-weight: normal; }
b.Ms { font-style: normal; }
+a.Ux { }
-/* Fonts. */
+/* Physical markup. */
+.No { font-style: normal;
+ font-weight: normal; }
+.Em { font-style: italic;
+ font-weight: normal; }
+.Sy { font-style: normal;
+ font-weight: bold; }
.Li { font-style: normal;
font-weight: normal;
font-family: monospace; }
-
-
-/* General font modes. */
-
-i { } /* Italic: BI, IB, I, (implicit). */
-.emph { font-style: italic; font-weight: normal; } /* Emphasis: Em, Bl -emphasis. */
-b { } /* Bold: SB, BI, IB, BR, RB, B, (implicit). */
-.symb { font-style: normal; font-weight: bold; } /* Symbolic: Sy, Ms, Bf -symbolic. */
-small { } /* Small: SB, SM. */
-
-/* Context-specific modes. */
-
-span.desc { } /* Nd. After em-dash. */
-span.unix { } /* Unices (Ux, Ox, Nx, Fx, Bx, Bsx, Dx). */
-b.utility { font-style: normal; } /* Name of utility (Ex). */
-b.var { font-style: normal; } /* Variables (Rv). */
-
-/* Equation modes. See eqn(7). */
-
-span.eqn { }
-
-/* Table modes. See tbl(7). */
-
-table.tbl { }
diff --git a/mdoc_html.c b/mdoc_html.c
index 80b32e3a..9e037c94 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.258 2017/01/20 23:51:00 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.259 2017/01/21 01:20:32 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -574,7 +574,7 @@ mdoc_nd_pre(MDOC_ARGS)
/* XXX: this tag in theory can contain block elements. */
print_text(h, "\\(em");
- print_otag(h, TAG_SPAN, "c", "desc");
+ print_otag(h, TAG_SPAN, "c", "Nd");
return 1;
}
@@ -663,7 +663,7 @@ mdoc_ar_pre(MDOC_ARGS)
static int
mdoc_xx_pre(MDOC_ARGS)
{
- print_otag(h, TAG_SPAN, "c", "unix");
+ print_otag(h, TAG_SPAN, "c", "Ux");
return 1;
}
@@ -870,7 +870,7 @@ mdoc_ex_pre(MDOC_ARGS)
static int
mdoc_em_pre(MDOC_ARGS)
{
- print_otag(h, TAG_SPAN, "c", "emph");
+ print_otag(h, TAG_I, "c", "Em");
return 1;
}
@@ -1439,9 +1439,9 @@ mdoc_bf_pre(MDOC_ARGS)
return 1;
if (FONT_Em == n->norm->Bf.font)
- cattr = "emph";
+ cattr = "Em";
else if (FONT_Sy == n->norm->Bf.font)
- cattr = "symb";
+ cattr = "Sy";
else if (FONT_Li == n->norm->Bf.font)
cattr = "Li";
else
@@ -1495,7 +1495,7 @@ mdoc_rs_pre(MDOC_ARGS)
static int
mdoc_no_pre(MDOC_ARGS)
{
- print_otag(h, TAG_SPAN, "c", "none");
+ print_otag(h, TAG_SPAN, "c", "No");
return 1;
}
@@ -1509,7 +1509,7 @@ mdoc_li_pre(MDOC_ARGS)
static int
mdoc_sy_pre(MDOC_ARGS)
{
- print_otag(h, TAG_SPAN, "c", "symb");
+ print_otag(h, TAG_B, "c", "Sy");
return 1;
}