aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/output/html.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2017-08-07 07:58:02 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commit8de7594804287154385e285147d2bbadcb0d3113 (patch)
treed4108c68ae5c4d57ce5d8e5bf24252460dc247d9 /src/sdp/output/html.d
parenta couple of small fixes (diff)
html css using grid & flex (remove tables)
Diffstat (limited to 'src/sdp/output/html.d')
-rw-r--r--src/sdp/output/html.d17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/sdp/output/html.d b/src/sdp/output/html.d
index b961d4c..8145417 100644
--- a/src/sdp/output/html.d
+++ b/src/sdp/output/html.d
@@ -22,8 +22,11 @@ template outputHTML() {
string[] doc_html;
string[] doc;
string suffix = ".html";
+ string previous_part = "";
+ string delimit = "";
foreach (part; doc_matters.keys_seq.scroll) {
foreach (obj; doc_abstraction[part]) {
+ delimit = xhtml_format.div_delimit(part, previous_part);
string _txt = xhtml_format.special_characters(obj, obj.text);
switch (obj.of_part) {
case "frontmatter": assert(part == "head" || "toc_scroll");
@@ -31,7 +34,7 @@ template outputHTML() {
case "para":
switch (obj.is_a) {
case "heading":
- doc_html ~= xhtml_format.heading_scroll(obj, _txt, suffix);
+ doc_html ~= delimit ~ xhtml_format.heading_scroll(obj, _txt, suffix);
break;
case "toc":
doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix);
@@ -55,7 +58,7 @@ template outputHTML() {
case "para":
switch (obj.is_a) {
case "heading":
- doc_html ~= xhtml_format.heading_scroll(obj, _txt, suffix);
+ doc_html ~= delimit ~ xhtml_format.heading_scroll(obj, _txt, suffix);
break;
case "para":
doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix);
@@ -109,7 +112,7 @@ template outputHTML() {
case "para":
switch (obj.is_a) {
case "heading":
- doc_html ~= xhtml_format.heading_scroll(obj, _txt, suffix);
+ doc_html ~= delimit ~ xhtml_format.heading_scroll(obj, _txt, suffix);
break;
case "endnote": assert(part == "endnotes");
doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix);
@@ -192,11 +195,13 @@ template outputHTML() {
string[] doc;
string segment_filename;
string[] top_level_headings = ["","","",""];
- string _bottom_bar ="";
string previous_seg_filename = "";
string suffix = ".html";
+ string previous_part = "";
+ string delimit = "";
foreach (part; doc_matters.keys_seq.seg) {
foreach (obj; doc_abstraction[part]) {
+ delimit = xhtml_format.div_delimit(part, previous_part);
string _txt = xhtml_format.special_characters(obj, obj.text);
if (obj.is_a == "heading") {
assert(part == "head" || "toc_seg" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex_seg" || "blurb" || "tail");
@@ -231,10 +236,8 @@ template outputHTML() {
case 4:
segment_filename = obj.segment_anchor_tag;
doc_html[segment_filename] ~= xhtml_format.html_head(doc_matters, "seg");
- doc_html_endnotes[previous_seg_filename] ~= _bottom_bar; // places after segment text and endnotes
auto navigation_bar = xhtml_format.nav_pre_next_svg(obj);
- doc_html[segment_filename] ~= navigation_bar.toc_pre_next;
- _bottom_bar = navigation_bar.toc_pre_next;
+ doc_html[segment_filename] ~= navigation_bar.toc_pre_next; // navigation bar
previous_seg_filename = segment_filename;
foreach (top_level_heading; top_level_headings) {
// writeln(top_level_heading);