diff options
author | Ralph Amissah <ralph@amissah.com> | 2016-11-28 20:03:08 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2019-04-10 15:14:13 -0400 |
commit | 42942142d1379e7e5361a641f837beb54b23a2f1 (patch) | |
tree | 83ddd207debd3f854b6b5d2150807c9abd457c8a /src/sdp/output_html.d | |
parent | housekeeping (diff) |
discrete objects marks, output html work in progress
Diffstat (limited to 'src/sdp/output_html.d')
-rw-r--r-- | src/sdp/output_html.d | 100 |
1 files changed, 90 insertions, 10 deletions
diff --git a/src/sdp/output_html.d b/src/sdp/output_html.d index 5552fe2..c20d6ef 100644 --- a/src/sdp/output_html.d +++ b/src/sdp/output_html.d @@ -7,7 +7,7 @@ template SiSUoutputHTML() { o = format(q"¶<br><hr /><br> <div class="substance"> <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> - <h%s class="norm" id="%s"><a name="%s"></a> + <h%s class="%s" id="%s"><a name="%s"></a> %s </h%s> </div> @@ -15,6 +15,7 @@ template SiSUoutputHTML() { obj.obj_cite_number, obj.obj_cite_number, obj.heading_attrib.lev_markup_number, + obj.is_a, obj.obj_cite_number, obj.obj_cite_number, obj.object, @@ -26,17 +27,91 @@ template SiSUoutputHTML() { auto ref const O obj, ) { string o; + if (obj.obj_cite_number.empty) { + o = format(q"¶<div class="substance"> + <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> + <p class="%s" attrib="h%si%s"> + %s + </p> + </div> + ¶", + obj.obj_cite_number, + obj.obj_cite_number, + obj.is_a, + obj.para_attrib.indent_start, + obj.para_attrib.indent_rest, + obj.object + ); + } else { + o = format(q"¶<div class="substance"> + <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> + <p class="%s" attrib="h%si%s" id="%s"> + %s + </p> + </div> + ¶", + obj.obj_cite_number, + obj.obj_cite_number, + obj.is_a, + obj.para_attrib.indent_start, + obj.para_attrib.indent_rest, + obj.obj_cite_number, + obj.object + ); + } + return o; + } + auto html_endnote(O)( + auto ref const O obj, + ) { + string o; + o = format(q"¶<div class="substance"> + <label class="tag"><a name="%s" a href="%s" class="lnkocn"></a></label> + <p class="%s" attrib="h%si%s"> + %s + </p> + </div> + ¶", + obj.anchor_tags[0], + obj.anchor_tags[0], + obj.is_a, + obj.para_attrib.indent_start, + obj.para_attrib.indent_rest, + obj.object + ); + return o; + } + auto html_toc(O)( + auto ref const O obj, + ) { + string o; + o = format(q"¶<div class="substance"> + <p class="%s" attrib="h%si%s"> + %s + </p> + </div> + ¶", + obj.is_a, + obj.para_attrib.indent_start, + obj.para_attrib.indent_rest, + obj.object + ); + return o; + } + auto html_nugget(O)( + auto ref const O obj, + ) { + string o; o = format(q"¶<div class="substance"> <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> - <p class="h%si%s" id="%s"> + <p class="%s" id="%s"> %s </p> </div> ¶", obj.obj_cite_number, obj.obj_cite_number, - obj.para_attrib.indent_start, - obj.para_attrib.indent_rest, + obj.is_a, obj.obj_cite_number, obj.object ); @@ -104,29 +179,34 @@ template SiSUoutputHTML() { case "heading": body_html ~= html_heading(obj); break; + case "toc": + body_html ~= html_toc(obj); + break; case "para": body_html ~= html_para(obj); break; case "verse": - body_html ~= html_para(obj); + body_html ~= html_nugget(obj); break; case "group": - body_html ~= html_para(obj); + body_html ~= html_nugget(obj); break; case "block": - body_html ~= html_para(obj); + body_html ~= html_nugget(obj); break; case "quote": - body_html ~= html_para(obj); + body_html ~= html_nugget(obj); break; case "table": body_html ~= html_para(obj); break; case "code": - body_html ~= html_para(obj); + body_html ~= html_nugget(obj); + break; + case "endnote": + body_html ~= html_endnote(obj); break; default: - body_html ~= html_para(obj); break; } } |