aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-12-17 08:26:42 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-12-17 08:26:42 +0000
commit2811cf9116a5ab48ae7516219eae6beb84211707 (patch)
tree88b430ffc34506abb5f65eee34e4afedfabca158 /man_html.c
parentcc7f2a2dc0a3200e8f8dd766ff0eddd6a3532388 (diff)
downloadmandoc-2811cf9116a5ab48ae7516219eae6beb84211707.tar.gz
mandoc-2811cf9116a5ab48ae7516219eae6beb84211707.tar.zst
mandoc-2811cf9116a5ab48ae7516219eae6beb84211707.zip
Banished -man -Thtml header and footer to example.style.css as well.
Diffstat (limited to 'man_html.c')
-rw-r--r--man_html.c51
1 files changed, 19 insertions, 32 deletions
diff --git a/man_html.c b/man_html.c
index bd2aa00d..1e869f55 100644
--- a/man_html.c
+++ b/man_html.c
@@ -1,4 +1,4 @@
-/* $Id: man_html.c,v 1.54 2010/12/17 00:18:29 kristaps Exp $ */
+/* $Id: man_html.c,v 1.55 2010/12/17 08:26:42 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -260,7 +260,7 @@ a2width(const struct man_node *n, struct roffsu *su)
static int
man_root_pre(MAN_ARGS)
{
- struct htmlpair tag[3];
+ struct htmlpair tag[2];
struct tag *t, *tt;
char b[BUFSIZ], title[BUFSIZ];
@@ -270,35 +270,27 @@ man_root_pre(MAN_ARGS)
snprintf(title, BUFSIZ - 1, "%s(%s)", m->title, m->msec);
- PAIR_CLASS_INIT(&tag[0], "header");
- bufcat_style(h, "width", "100%");
- PAIR_STYLE_INIT(&tag[1], h);
- PAIR_SUMMARY_INIT(&tag[2], "header");
+ PAIR_CLASS_INIT(&tag[0], "head");
+ PAIR_SUMMARY_INIT(&tag[1], "Document Header");
+ t = print_otag(h, TAG_TABLE, 2, tag);
- t = print_otag(h, TAG_TABLE, 3, tag);
tt = print_otag(h, TAG_TR, 0, NULL);
- bufinit(h);
- bufcat_style(h, "width", "10%");
- PAIR_STYLE_INIT(&tag[0], h);
+ PAIR_CLASS_INIT(&tag[0], "head-ltitle");
print_otag(h, TAG_TD, 1, tag);
+
print_text(h, title);
print_stagq(h, tt);
- bufinit(h);
- bufcat_style(h, "width", "80%");
- bufcat_style(h, "white-space", "nowrap");
- bufcat_style(h, "text-align", "center");
- PAIR_STYLE_INIT(&tag[0], h);
+ PAIR_CLASS_INIT(&tag[0], "head-vol");
print_otag(h, TAG_TD, 1, tag);
+
print_text(h, b);
print_stagq(h, tt);
- bufinit(h);
- bufcat_style(h, "width", "10%");
- bufcat_style(h, "text-align", "right");
- PAIR_STYLE_INIT(&tag[0], h);
+ PAIR_CLASS_INIT(&tag[0], "head-rtitle");
print_otag(h, TAG_TD, 1, tag);
+
print_text(h, title);
print_tagq(h, t);
return(1);
@@ -309,7 +301,7 @@ man_root_pre(MAN_ARGS)
static void
man_root_post(MAN_ARGS)
{
- struct htmlpair tag[3];
+ struct htmlpair tag[2];
struct tag *t, *tt;
char b[DATESIZ];
@@ -318,26 +310,21 @@ man_root_post(MAN_ARGS)
else
time2a(m->date, b, DATESIZ);
- PAIR_CLASS_INIT(&tag[0], "footer");
- bufcat_style(h, "width", "100%");
- PAIR_STYLE_INIT(&tag[1], h);
- PAIR_SUMMARY_INIT(&tag[2], "footer");
+ PAIR_CLASS_INIT(&tag[0], "foot");
+ PAIR_SUMMARY_INIT(&tag[1], "Document Footer");
+ t = print_otag(h, TAG_TABLE, 2, tag);
- t = print_otag(h, TAG_TABLE, 3, tag);
tt = print_otag(h, TAG_TR, 0, NULL);
- bufinit(h);
- bufcat_style(h, "width", "50%");
- PAIR_STYLE_INIT(&tag[0], h);
+ PAIR_CLASS_INIT(&tag[0], "foot-date");
print_otag(h, TAG_TD, 1, tag);
+
print_text(h, b);
print_stagq(h, tt);
- bufinit(h);
- bufcat_style(h, "width", "50%");
- bufcat_style(h, "text-align", "right");
- PAIR_STYLE_INIT(&tag[0], h);
+ PAIR_CLASS_INIT(&tag[0], "foot-os");
print_otag(h, TAG_TD, 1, tag);
+
if (m->source)
print_text(h, m->source);
print_tagq(h, t);