aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/output_html.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2016-11-09 17:52:33 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:13 -0400
commit2301a8251d111ca2e020f524ce036c11e4306a14 (patch)
treeaed462b441e64efe989dca5c5d5eee306d9d53be /src/sdp/output_html.d
parenta bit of naming and tidying (diff)
0.9.0 document sections
Diffstat (limited to 'src/sdp/output_html.d')
-rw-r--r--src/sdp/output_html.d33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/sdp/output_html.d b/src/sdp/output_html.d
index d6a3b8c..ce5684f 100644
--- a/src/sdp/output_html.d
+++ b/src/sdp/output_html.d
@@ -42,7 +42,7 @@ template SiSUoutputHTML() {
);
return o;
}
- auto scroll_head() {
+ auto scroll_head_html() {
string o;
o = format(q"◎
<!DOCTYPE html>
@@ -75,7 +75,7 @@ template SiSUoutputHTML() {
◎");
return o;
}
- auto scroll_tail() {
+ auto scroll_tail_html() {
string o;
o = format(q"◎
<a name="bottom" id="bottom"></a>
@@ -88,54 +88,51 @@ template SiSUoutputHTML() {
}
void scroll(C)(
auto ref const C contents,
- string[] document_parts,
- string[][string][string] bookindex_unordered_hashes,
- JSONValue[] biblio,
+ string[][string] document_section_keys_sequenced,
string[string][string] dochead_make,
string[string][string] dochead_meta,
string fn_src,
bool[string] opt_action_bool
) {
auto rgx = Rgx();
- string[] toc;
- string[] body_;
+ string[] body_html;
string[] doc;
- foreach (part; document_parts) {
+ foreach (part; document_section_keys_sequenced["scroll"]) {
foreach (obj; contents[part]) {
if (obj.use == "content") {
switch (obj.is_a) {
case "heading":
- body_ ~= html_heading(obj);
+ body_html ~= html_heading(obj);
break;
case "para":
- body_ ~= html_para(obj);
+ body_html ~= html_para(obj);
break;
case "verse":
- body_ ~= html_para(obj);
+ body_html ~= html_para(obj);
break;
case "group":
- body_ ~= html_para(obj);
+ body_html ~= html_para(obj);
break;
case "block":
- body_ ~= html_para(obj);
+ body_html ~= html_para(obj);
break;
case "quote":
- body_ ~= html_para(obj);
+ body_html ~= html_para(obj);
break;
case "table":
- body_ ~= html_para(obj);
+ body_html ~= html_para(obj);
break;
case "code":
- body_ ~= html_para(obj);
+ body_html ~= html_para(obj);
break;
default:
- body_ ~= html_para(obj);
+ body_html ~= html_para(obj);
break;
}
}
}
}
- doc = scroll_head ~ body_ ~ scroll_tail;
+ doc = scroll_head_html ~ body_html ~ scroll_tail_html;
auto m = matchFirst(fn_src, rgx.src_fn);
auto fn = m["fn_base"] ~ ".html";
auto pth_html = "en/html";