aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2019-12-20 19:47:36 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2020-02-11 13:07:30 -0500
commit3fc4e5b88546121b881c98fbc3bed9c0e1c425c2 (patch)
treeffab74fac4ab687c41b85cca7159bd3c1481e60d
parentbugfix toc endnotes links in xmls, other minor (diff)
xmls, minor, internal links (metadata, images)
-rw-r--r--org/out_metadata.org22
-rw-r--r--org/out_xmls.org67
-rw-r--r--src/doc_reform/io_out/metadata.d22
-rw-r--r--src/doc_reform/io_out/xmls.d67
4 files changed, 72 insertions, 106 deletions
diff --git a/org/out_metadata.org b/org/out_metadata.org
index f48d6ac..f3c069c 100644
--- a/org/out_metadata.org
+++ b/org/out_metadata.org
@@ -120,6 +120,17 @@ if (!(doc_matters.conf_make_meta.meta.notes_summary.empty)) {
} else if (doc_matters.opt.action.debug_do) {
writeln("WARNING no summary of text provided in document header ", doc_matters.src.filename_base);
}
+metadata_ ~= "<hr /><p class=\"lev1\">source: " ~ doc_matters.src.filename_base ~ "</p>";
+metadata_ ~= "<p class=\"lev1\">● markup source: [<a href=\"../../" ~ pth_pod.internal_base ~ "/" ~ doc_matters.src.filename_base ~ ".zip\">"
+ ~ "&nbsp;zipped&nbsp;pod&nbsp;</a>] "
+ ~ "[<a href=\"../../" ~ pth_pod.internal_base ~ "/" ~ doc_matters.src.filename_base ~ "/\">"
+ ~ "&nbsp;pod&nbsp;tree&nbsp;</a>]</p>";
+metadata_ ~= "<p class=\"lev1\">● outputs: [<a href=\"" ~ doc_matters.src.filename_base ~ ".html\">"
+ ~ "&nbsp;html&nbsp;scroll&nbsp;</a>] "
+ ~ "[<a href=\"" ~ doc_matters.src.filename_base ~ "/toc.html\">"
+ ~ "&nbsp;html&nbsp;seg&nbsp;</a>]"
+ ~ "[<a href=\"../../" ~ pth_epub.internal_base ~ "/" ~ doc_matters.src.filename_base ~ "." ~ doc_matters.src.language ~ ".epub\">"
+ ~ "&nbsp;epub&nbsp;</a>]</p>";
if (doc_matters.conf_make_meta.meta.classify_topic_register_arr.length > 0) {
metadata_ ~= "<hr /><p class=\"lev0\">Topics:</p>";
string[] _top = ["", "", "", "", ""];
@@ -217,17 +228,6 @@ if (doc_matters.conf_make_meta.meta.classify_topic_register_arr.length > 0) {
} 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_ ~= "<hr /><p class=\"lev1\">source: " ~ doc_matters.src.filename_base ~ "</p>";
-metadata_ ~= "<p class=\"lev1\">markup source: [<a href=\"../../" ~ pth_pod.internal_base ~ "/" ~ doc_matters.src.filename_base ~ ".zip\">"
- ~ "&nbsp;zipped&nbsp;pod&nbsp;</a>] "
- ~ "[<a href=\"../../" ~ pth_pod.internal_base ~ "/" ~ doc_matters.src.filename_base ~ "/\">"
- ~ "&nbsp;pod&nbsp;tree&nbsp;</a>]</p>";
-metadata_ ~= "<p class=\"lev1\">outputs: [<a href=\"" ~ doc_matters.src.filename_base ~ ".html\">"
- ~ "&nbsp;html&nbsp;scroll&nbsp;</a>] "
- ~ "[<a href=\"" ~ doc_matters.src.filename_base ~ "/toc.html\">"
- ~ "&nbsp;html&nbsp;seg&nbsp;</a>]"
- ~ "[<a href=\"../../" ~ pth_epub.internal_base ~ "/" ~ doc_matters.src.filename_base ~ "." ~ doc_matters.src.language ~ ".epub\">"
- ~ "&nbsp;epub&nbsp;</a>]</p>";
metadata_write_output(doc_matters, metadata_);
#+END_SRC
diff --git a/org/out_xmls.org b/org/out_xmls.org
index 112f294..df095ec 100644
--- a/org/out_xmls.org
+++ b/org/out_xmls.org
@@ -245,7 +245,8 @@ string inline_search_form(M)(
string o;
string _form;
if (doc_matters.opt.action.workon) {
- _form = format(q"┃
+ o = format(q"┃
+<div class="flex-menu-option">
<a name="search"></a>
<form method="get" action="%s" target="_top">
<font size="2">
@@ -257,17 +258,14 @@ string inline_search_form(M)(
<input type="submit" name="search" value="search doc" />
<input type="submit" name="search" value="search db" />
</font></form>
+</div>
┃",
_action,
_db,
);
} else {
- _form = format(q"┃%s┃", "");
+ o = "";
}
- o = format(q"┃<div class="flex-menu-option">%s
- </div>┃",
- _form,
- );
return o;
}
#+END_SRC
@@ -279,18 +277,7 @@ string inline_search_form(M)(
string html_head(M)(
M doc_matters,
string type,
-) @safe {
-string _manifest = "";
-if (doc_matters.opt.action.workon) {
- _manifest = format(q"┃
- <a href="../../manifest/sisu.en.html" target="_top">
- <font face="verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman" size="2">
- [&nbsp;document&nbsp;manifest&nbsp;]
- </font>
- </a>
- ┃",
- );
-}
+) {
string o;
o = format(q"┃<!DOCTYPE html>
<html>
@@ -303,7 +290,7 @@ if (doc_matters.opt.action.workon) {
%s
<!-- metadata -->
<link rel="generator" href="http://www.sisudoc.org/" />
- <link rel="shortcut icon" href="%s" />
+ <link rel="shortcut icon" href="%s../../image/dr.ico" />
<link href="%s" rel="stylesheet" />
</head>
<body lang="%s">
@@ -313,21 +300,27 @@ if (doc_matters.opt.action.workon) {
%s
<div class="flex-menu-option">
%s
- </div>
- %s%s┃",
+ </div>%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"┃<p class="tiny">[<a href="%smetadata.%s.html">&nbsp;m&nbsp;</a>|<a href="%s../../authors.html">&nbsp;A&nbsp;</a>|<a href="%s../../topics.html">&nbsp;T&nbsp;</a>]</p>┃",
+ (type == "seg") ? "../" : "",
+ doc_matters.src.filename_base,
+ (type == "seg") ? "../" : "",
+ (type == "seg") ? "../" : "",
+ )
+ : ""),
inline_search_form(doc_matters),
- ((type == "seg") ? "" : "\n</div>"),
+ (type == "seg") ? "" : "\n</div>",
);
return o;
}
@@ -379,7 +372,7 @@ string epub3_seg_head(M)(
<meta name="dc.rights" content="%s" />
<meta name="generator" content="%s" />
<link rel="generator" href="%s" />
- <link rel="shortcut icon" href="../_dr/image/d.ico" />
+ <link rel="shortcut icon" href="../_dr/image/dr.ico" />
<link rel="stylesheet" href="css/epub.css" type="text/css" id="main-css" />
</head>
<body lang="%s">
@@ -435,12 +428,11 @@ string inline_images(O,M)(
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
@@ -754,9 +746,6 @@ auto nav_pre_next_svg(O,M)(
M doc_matters,
) @safe {
string prev, next, toc;
- string harvest_link = (doc_matters.opt.action.harvest_link)
- ? format(q"┃<p class="tiny">[<a href="../metadata.%s.html">&nbsp;m&nbsp;</a>|<a href="../../../authors.html">&nbsp;A&nbsp;</a>|<a href="../../../topics.html">&nbsp;T&nbsp;</a>]</p>┃", doc_matters.src.filename_base)
- : "";
if (obj.tags.segment_anchor_tag_epub == "toc") {
toc = "";
prev = "";
@@ -796,9 +785,7 @@ auto nav_pre_next_svg(O,M)(
obj.tags.segname_next,
);
}
- string _toc_pre_next = format(q"┃ <div class="flex-menu-option">
- %s
- <div class="nav-bar">
+ string _toc_pre_next = format(q"┃ <div class="nav-bar">
%s
%s
%s
@@ -806,21 +793,17 @@ auto nav_pre_next_svg(O,M)(
</div>
</div>
</div>┃",
- harvest_link,
toc,
prev,
next,
);
- string _pre_next = format(q"┃ <div class="flex-menu-option">
- %s
- <div class="nav-bar">
+ string _pre_next = format(q"┃ <div class="nav-bar">
%s
%s
</div>
</div>
</div>
</div>┃",
- harvest_link,
prev,
next,
);
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_ ~= "<hr /><p class=\"lev1\">source: " ~ doc_matters.src.filename_base ~ "</p>";
+ metadata_ ~= "<p class=\"lev1\">● markup source: [<a href=\"../../" ~ pth_pod.internal_base ~ "/" ~ doc_matters.src.filename_base ~ ".zip\">"
+ ~ "&nbsp;zipped&nbsp;pod&nbsp;</a>] "
+ ~ "[<a href=\"../../" ~ pth_pod.internal_base ~ "/" ~ doc_matters.src.filename_base ~ "/\">"
+ ~ "&nbsp;pod&nbsp;tree&nbsp;</a>]</p>";
+ metadata_ ~= "<p class=\"lev1\">● outputs: [<a href=\"" ~ doc_matters.src.filename_base ~ ".html\">"
+ ~ "&nbsp;html&nbsp;scroll&nbsp;</a>] "
+ ~ "[<a href=\"" ~ doc_matters.src.filename_base ~ "/toc.html\">"
+ ~ "&nbsp;html&nbsp;seg&nbsp;</a>]"
+ ~ "[<a href=\"../../" ~ pth_epub.internal_base ~ "/" ~ doc_matters.src.filename_base ~ "." ~ doc_matters.src.language ~ ".epub\">"
+ ~ "&nbsp;epub&nbsp;</a>]</p>";
if (doc_matters.conf_make_meta.meta.classify_topic_register_arr.length > 0) {
metadata_ ~= "<hr /><p class=\"lev0\">Topics:</p>";
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_ ~= "<hr /><p class=\"lev1\">source: " ~ doc_matters.src.filename_base ~ "</p>";
- metadata_ ~= "<p class=\"lev1\">markup source: [<a href=\"../../" ~ pth_pod.internal_base ~ "/" ~ doc_matters.src.filename_base ~ ".zip\">"
- ~ "&nbsp;zipped&nbsp;pod&nbsp;</a>] "
- ~ "[<a href=\"../../" ~ pth_pod.internal_base ~ "/" ~ doc_matters.src.filename_base ~ "/\">"
- ~ "&nbsp;pod&nbsp;tree&nbsp;</a>]</p>";
- metadata_ ~= "<p class=\"lev1\">outputs: [<a href=\"" ~ doc_matters.src.filename_base ~ ".html\">"
- ~ "&nbsp;html&nbsp;scroll&nbsp;</a>] "
- ~ "[<a href=\"" ~ doc_matters.src.filename_base ~ "/toc.html\">"
- ~ "&nbsp;html&nbsp;seg&nbsp;</a>]"
- ~ "[<a href=\"../../" ~ pth_epub.internal_base ~ "/" ~ doc_matters.src.filename_base ~ "." ~ doc_matters.src.language ~ ".epub\">"
- ~ "&nbsp;epub&nbsp;</a>]</p>";
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"┃
+ <div class="flex-menu-option">
<a name="search"></a>
<form method="get" action="%s" target="_top">
<font size="2">
@@ -171,34 +172,20 @@ template outputXHTMLs() {
<input type="submit" name="search" value="search doc" />
<input type="submit" name="search" value="search db" />
</font></form>
+ </div>
┃",
_action,
_db,
);
} else {
- _form = format(q"┃%s┃", "");
+ o = "";
}
- o = format(q"┃<div class="flex-menu-option">%s
- </div>┃",
- _form,
- );
return o;
}
string html_head(M)(
M doc_matters,
string type,
- ) @safe {
- string _manifest = "";
- if (doc_matters.opt.action.workon) {
- _manifest = format(q"┃
- <a href="../../manifest/sisu.en.html" target="_top">
- <font face="verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman" size="2">
- [&nbsp;document&nbsp;manifest&nbsp;]
- </font>
- </a>
- ┃",
- );
- }
+ ) {
string o;
o = format(q"┃<!DOCTYPE html>
<html>
@@ -211,7 +198,7 @@ template outputXHTMLs() {
%s
<!-- metadata -->
<link rel="generator" href="http://www.sisudoc.org/" />
- <link rel="shortcut icon" href="%s" />
+ <link rel="shortcut icon" href="%s../../image/dr.ico" />
<link href="%s" rel="stylesheet" />
</head>
<body lang="%s">
@@ -221,21 +208,27 @@ template outputXHTMLs() {
%s
<div class="flex-menu-option">
%s
- </div>
- %s%s┃",
+ </div>%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"┃<p class="tiny">[<a href="%smetadata.%s.html">&nbsp;m&nbsp;</a>|<a href="%s../../authors.html">&nbsp;A&nbsp;</a>|<a href="%s../../topics.html">&nbsp;T&nbsp;</a>]</p>┃",
+ (type == "seg") ? "../" : "",
+ doc_matters.src.filename_base,
+ (type == "seg") ? "../" : "",
+ (type == "seg") ? "../" : "",
+ )
+ : ""),
inline_search_form(doc_matters),
- ((type == "seg") ? "" : "\n</div>"),
+ (type == "seg") ? "" : "\n</div>",
);
return o;
}
@@ -281,7 +274,7 @@ template outputXHTMLs() {
<meta name="dc.rights" content="%s" />
<meta name="generator" content="%s" />
<link rel="generator" href="%s" />
- <link rel="shortcut icon" href="../_dr/image/d.ico" />
+ <link rel="shortcut icon" href="../_dr/image/dr.ico" />
<link rel="stylesheet" href="css/epub.css" type="text/css" id="main-css" />
</head>
<body lang="%s">
@@ -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"┃<p class="tiny">[<a href="../metadata.%s.html">&nbsp;m&nbsp;</a>|<a href="../../../authors.html">&nbsp;A&nbsp;</a>|<a href="../../../topics.html">&nbsp;T&nbsp;</a>]</p>┃", 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"┃ <div class="flex-menu-option">
- %s
- <div class="nav-bar">
+ string _toc_pre_next = format(q"┃ <div class="nav-bar">
%s
%s
%s
@@ -649,21 +636,17 @@ template outputXHTMLs() {
</div>
</div>
</div>┃",
- harvest_link,
toc,
prev,
next,
);
- string _pre_next = format(q"┃ <div class="flex-menu-option">
- %s
- <div class="nav-bar">
+ string _pre_next = format(q"┃ <div class="nav-bar">
%s
%s
</div>
</div>
</div>
</div>┃",
- harvest_link,
prev,
next,
);