From 3fc4e5b88546121b881c98fbc3bed9c0e1c425c2 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 20 Dec 2019 19:47:36 -0500 Subject: xmls, minor, internal links (metadata, images) --- src/doc_reform/io_out/metadata.d | 22 ++++++------- src/doc_reform/io_out/xmls.d | 67 +++++++++++++++------------------------- 2 files changed, 36 insertions(+), 53 deletions(-) (limited to 'src') diff --git a/src/doc_reform/io_out/metadata.d b/src/doc_reform/io_out/metadata.d index f3b6176..b935734 100644 --- a/src/doc_reform/io_out/metadata.d +++ b/src/doc_reform/io_out/metadata.d @@ -272,6 +272,17 @@ string theme_light_1 = format(q"┃ } else if (doc_matters.opt.action.debug_do) { writeln("WARNING no summary of text provided in document header ", doc_matters.src.filename_base); } + metadata_ ~= "

source: " ~ doc_matters.src.filename_base ~ "

"; + metadata_ ~= "

● markup source: [" + ~ " zipped pod ] " + ~ "[" + ~ " pod tree ]

"; + metadata_ ~= "

● outputs: [" + ~ " html scroll ] " + ~ "[" + ~ " html seg ]" + ~ "[" + ~ " epub ]

"; if (doc_matters.conf_make_meta.meta.classify_topic_register_arr.length > 0) { metadata_ ~= "

Topics:

"; string[] _top = ["", "", "", "", ""]; @@ -369,17 +380,6 @@ string theme_light_1 = format(q"┃ } else if (doc_matters.opt.action.debug_do) { writeln("WARNING no topic_register classification of text provided in document header ", doc_matters.src.filename_base); } - metadata_ ~= "

source: " ~ doc_matters.src.filename_base ~ "

"; - metadata_ ~= "

markup source: [" - ~ " zipped pod ] " - ~ "[" - ~ " pod tree ]

"; - metadata_ ~= "

outputs: [" - ~ " html scroll ] " - ~ "[" - ~ " html seg ]" - ~ "[" - ~ " epub ]

"; metadata_write_output(doc_matters, metadata_); } } diff --git a/src/doc_reform/io_out/xmls.d b/src/doc_reform/io_out/xmls.d index f48b6be..b14a7bf 100644 --- a/src/doc_reform/io_out/xmls.d +++ b/src/doc_reform/io_out/xmls.d @@ -159,7 +159,8 @@ template outputXHTMLs() { string o; string _form; if (doc_matters.opt.action.workon) { - _form = format(q"┃ + o = format(q"┃ +
@@ -171,34 +172,20 @@ template outputXHTMLs() {
+
┃", _action, _db, ); } else { - _form = format(q"┃%s┃", ""); + o = ""; } - o = format(q"┃
%s -
┃", - _form, - ); return o; } string html_head(M)( M doc_matters, string type, - ) @safe { - string _manifest = ""; - if (doc_matters.opt.action.workon) { - _manifest = format(q"┃ - - - [ document manifest ] - - - ┃", - ); - } + ) { string o; o = format(q"┃ @@ -211,7 +198,7 @@ template outputXHTMLs() { %s - + @@ -221,21 +208,27 @@ template outputXHTMLs() { %s
%s -
- %s%s┃", + %s%s┃", doc_matters.conf_make_meta.meta.title_full, (doc_matters.conf_make_meta.meta.creator_author.empty) ? "" : ", " ~ doc_matters.conf_make_meta.meta.creator_author, header_metadata(doc_matters), - ((type == "seg") ? "../../../" : "../../") ~ "image/rb7.ico", + ((type == "seg") ? "../" : ""), ((type == "seg") ? "../../../css/html_seg.css" : "../../css/html_scroll.css"), doc_matters.src.language, site_info_button(doc_matters), - _manifest, + ((doc_matters.opt.action.harvest_link) + ? format(q"┃

[ m | A | T ]

┃", + (type == "seg") ? "../" : "", + doc_matters.src.filename_base, + (type == "seg") ? "../" : "", + (type == "seg") ? "../" : "", + ) + : ""), inline_search_form(doc_matters), - ((type == "seg") ? "" : "\n"), + (type == "seg") ? "" : "\n", ); return o; } @@ -281,7 +274,7 @@ template outputXHTMLs() { - + @@ -324,12 +317,11 @@ template outputXHTMLs() { string _xml_type = "seg", ) @safe { string _img_pth; - if (_xml_type == "epub") { - _img_pth = "image/"; - } else if (_xml_type == "scroll") { - _img_pth = "../../image/"; - } else if (_xml_type == "seg") { - _img_pth = "../../../image/"; + switch (_xml_type) { + case "epub": _img_pth = "image/"; break; + case "scroll": _img_pth = format(q"┃%s/image/┃", "../.."); break; + case "seg": _img_pth = format(q"┃%s/image/┃", "../../.."); break; + default: break; } if (_txt.match(rgx.inline_image)) { _txt = _txt @@ -597,9 +589,6 @@ template outputXHTMLs() { M doc_matters, ) @safe { string prev, next, toc; - string harvest_link = (doc_matters.opt.action.harvest_link) - ? format(q"┃

[ m | A | T ]

┃", doc_matters.src.filename_base) - : ""; if (obj.tags.segment_anchor_tag_epub == "toc") { toc = ""; prev = ""; @@ -639,9 +628,7 @@ template outputXHTMLs() { obj.tags.segname_next, ); } - string _toc_pre_next = format(q"┃
- %s -
┃", - harvest_link, toc, prev, next, ); - string _pre_next = format(q"┃
- %s -
┃", - harvest_link, prev, next, ); -- cgit v1.2.3