tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Anna Vyalkova <cyber@sysrq.in>
To: tech@mandoc.bsd.lv
Subject: [PATCH 3/3] Wrap manual footer in the "<footer>" tag
Date: Tue, 28 Jun 2022 23:18:44 +0500	[thread overview]
Message-ID: <20220628181844.15484-4-cyber@sysrq.in> (raw)
In-Reply-To: <20220628181844.15484-1-cyber@sysrq.in>

---
 html.c      | 1 +
 html.h      | 1 +
 man_html.c  | 4 +++-
 mandoc.css  | 3 ++-
 mdoc_html.c | 4 +++-
 5 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/html.c b/html.c
index 62479543..246d771e 100644
--- a/html.c
+++ b/html.c
@@ -72,6 +72,7 @@ static	const struct htmldata htmltags[TAG_MAX] = {
 	{"nav",		HTML_NLALL},
 	{"header",	HTML_NLALL},
 	{"main",	HTML_NLALL},
+	{"footer",	HTML_NLALL},
 	{"table",	HTML_NLALL | HTML_INDENT},
 	{"tr",		HTML_NLALL | HTML_INDENT},
 	{"td",		HTML_NLAROUND},
diff --git a/html.h b/html.h
index 53a865f6..085c11c9 100644
--- a/html.h
+++ b/html.h
@@ -32,6 +32,7 @@ enum	htmltag {
 	TAG_NAV,
 	TAG_HEADER,
 	TAG_MAIN,
+	TAG_FOOTER,
 	TAG_TABLE,
 	TAG_TR,
 	TAG_TD,
diff --git a/man_html.c b/man_html.c
index 817f4898..743f5236 100644
--- a/man_html.c
+++ b/man_html.c
@@ -293,8 +293,9 @@ man_root_pre(const struct roff_meta *man, struct html *h)
 static void
 man_root_post(const struct roff_meta *man, struct html *h)
 {
-	struct tag	*t, *tt;
+	struct tag	*tf, *t, *tt;
 
+	tf = print_otag(h, TAG_FOOTER, "");
 	t = print_otag(h, TAG_TABLE, "c", "foot");
 	tt = print_otag(h, TAG_TR, "");
 
@@ -306,6 +307,7 @@ man_root_post(const struct roff_meta *man, struct html *h)
 	if (man->os != NULL)
 		print_text(h, man->os);
 	print_tagq(h, t);
+	print_tagq(h, tf);
 }
 
 static int
diff --git a/mandoc.css b/mandoc.css
index 4e0afd7c..40cacbc3 100644
--- a/mandoc.css
+++ b/mandoc.css
@@ -62,7 +62,8 @@ td.head-vol {	text-align: center; }
 td.head-rtitle {
 		text-align: right; }
 
-table.foot {	width: 100%;
+footer > table {
+		width: 100%;
 		border-top: 1px dotted #808080;
 		margin-top: 1em;
 		font-size: smaller; }
diff --git a/mdoc_html.c b/mdoc_html.c
index 1fe3a7ed..8b44d188 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -453,8 +453,9 @@ print_mdoc_node(MDOC_ARGS)
 static void
 mdoc_root_post(const struct roff_meta *meta, struct html *h)
 {
-	struct tag	*t, *tt;
+	struct tag	*tf, *t, *tt;
 
+	tf = print_otag(h, TAG_FOOTER, "");
 	t = print_otag(h, TAG_TABLE, "c", "foot");
 	tt = print_otag(h, TAG_TR, "");
 
@@ -465,6 +466,7 @@ mdoc_root_post(const struct roff_meta *meta, struct html *h)
 	print_otag(h, TAG_TD, "c", "foot-os");
 	print_text(h, meta->os);
 	print_tagq(h, t);
+	print_tagq(h, tf);
 }
 
 static int
-- 
2.35.1

--
 To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv


      parent reply	other threads:[~2022-06-28 18:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28 18:18 [PATCH 0/3] Add HTML landmarks Anna Vyalkova
2022-06-28 18:18 ` [PATCH 1/3] Wrap manual header in the "<header>" tag Anna Vyalkova
2022-07-03 17:24   ` Ingo Schwarze
2022-07-03 18:49     ` Anna Vyalkova
2022-07-03 20:12       ` Ingo Schwarze
2022-07-03 20:51         ` Anna “CyberTailor”
2022-07-05 15:16           ` Ingo Schwarze
2022-07-05 16:15             ` Anna
2022-07-05 18:45               ` Ingo Schwarze
2022-07-05 19:03                 ` Anna
2022-07-05 21:39                   ` Ingo Schwarze
2022-06-28 18:18 ` [PATCH 2/3] Wrap manual text in the "<main>" tag Anna Vyalkova
2022-07-03 14:41   ` Ingo Schwarze
2022-06-28 18:18 ` Anna Vyalkova [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220628181844.15484-4-cyber@sysrq.in \
    --to=cyber@sysrq.in \
    --cc=tech@mandoc.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).