aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2018-11-08 22:39:07 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2019-04-10 15:14:15 -0400
commit18b44eb25e8a8521eadd5e73a4e82bbee954e744 (patch)
tree5a53c7f9df7bba8d477572ea382c91e195e9015c
parentxmls more on anchor tags, scroll fix where no ocn (diff)
--workon flag, for some under construction codedoc-reform_v0.3.1
-rw-r--r--org/doc_reform.org5
-rw-r--r--org/output_xmls.org59
-rwxr-xr-xsrc/doc_reform/doc_reform.d5
-rw-r--r--src/doc_reform/output/xmls.d59
4 files changed, 88 insertions, 40 deletions
diff --git a/org/doc_reform.org b/org/doc_reform.org
index bbe6a65..ab437f9 100644
--- a/org/doc_reform.org
+++ b/org/doc_reform.org
@@ -278,6 +278,7 @@ bool[string] opts = [
"section_blurb" : true,
"backmatter" : true,
"skip-output" : false,
+ "workon" : false,
];
string[string] settings = [
"output-dir" : "",
@@ -325,6 +326,7 @@ auto helpInfo = getopt(args,
"section-blurb", "--section-blurb process document blurb (default)", &opts["section_blurb"],
"backmatter", "--section-backmatter process document backmatter (default)", &opts["backmatter"],
"skip-output", "--skip-output", &opts["skip-output"],
+ "workon", "--workon (reserved for some matters under development & testing)", &opts["workon"],
"output-dir", "--output-dir=[dir path]", &settings["output-dir"],
"site-config-dir", "--site-config-dir=[dir path]", &settings["site-config-dir"],
"sqlite-filename", "--sqlite-filename=[filename].sqlite", &settings["sqlite-filename"],
@@ -499,6 +501,9 @@ struct OptActions {
auto skip_output() {
return opts["skip-output"];
}
+ auto workon() {
+ return opts["workon"];
+ }
auto languages_set() {
return settings["lang"].split(",");
}
diff --git a/org/output_xmls.org b/org/output_xmls.org
index 672a589..ab0536d 100644
--- a/org/output_xmls.org
+++ b/org/output_xmls.org
@@ -235,7 +235,7 @@ auto site_info_button(M)(
.replaceAll(
rgx.br_nl, "");
} else {
- _locations = "<p class=\"tiny_left\"><a href=\"http://www.sisudoc.org\">DocReform</a></p>\n<p class=\"tiny_left\"><a href=\"http://www.sisudoc.org\">www.sisudoc.org</a></p>\n<p class=\"tiny_left\"><a href=\"http://git.sisudoc.org/gitweb/\">sources / git</a></p>";
+ _locations = "<p class=\"tiny_left\"><a href=\"http://www.doc-reform.org\">doc-reform</a></p>\n<p class=\"tiny_left\"><a href=\"http://git.sisudoc.org/software/doc-reform/\">sources / git</a></p>\n<p class=\"tiny_left\"><a href=\"http://www.sisudoc.org\">www.sisudoc.org</a></p>";
}
string o;
o = format(q"¶<div class="flex-menu-option">
@@ -257,21 +257,32 @@ auto inline_search_form(M)(
string _action="http://www.sisudoc.org/cgi-bin/search.cgi";
string _db="DocReform.7a.manual";
string o;
- o = format(q"¶<div class="flex-menu-option">
- <a name="search"></a>
- <form method="get" action="%s" target="_top">
- <font size="2">
- <input type="text" name="s1" size="24" maxlength="255" />
- <input type="hidden" name="db" value="%s" />
- <input type="hidden" name="ltd" value="1000" />
- <input type="hidden" name="off" value="0" />
- <input type="hidden" name="doc" value="live-manual" /><br />
- <input type="submit" name="search" value="search doc" />
- <input type="submit" name="search" value="search db" />
- </font></form>
+ string _form;
+ if (doc_matters.opt.action.workon) {
+ _form = format(q"¶
+<a name="search"></a>
+<form method="get" action="%s" target="_top">
+<font size="2">
+<input type="text" name="s1" size="24" maxlength="255" />
+<input type="hidden" name="db" value="%s" />
+<input type="hidden" name="ltd" value="1000" />
+<input type="hidden" name="off" value="0" />
+<input type="hidden" name="doc" value="live-manual" /><br />
+<input type="submit" name="search" value="search doc" />
+<input type="submit" name="search" value="search db" />
+</font></form>
+ ¶",
+ _action,
+ _db,
+ );
+ } else {
+ _form = format(q"¶%s¶",
+ "",
+ );
+ }
+ o = format(q"¶<div class="flex-menu-option">%s
</div>¶",
- _action,
- _db,
+ _form,
);
return o;
}
@@ -285,6 +296,17 @@ auto html_head(M)(
M doc_matters,
string type,
) {
+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>
@@ -306,11 +328,7 @@ auto html_head(M)(
<div class="flex-menu-bar">
%s
<div class="flex-menu-option">
- <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>
+ %s
</div>
%s%s¶",
doc_matters.conf_make_meta.meta.title_full,
@@ -323,6 +341,7 @@ auto html_head(M)(
: "../../css/html_scroll.css"),
doc_matters.src.language,
site_info_button(doc_matters),
+ _manifest,
inline_search_form(doc_matters),
((type == "seg") ? "" : "\n</div>"),
);
diff --git a/src/doc_reform/doc_reform.d b/src/doc_reform/doc_reform.d
index 1d39909..30b79a9 100755
--- a/src/doc_reform/doc_reform.d
+++ b/src/doc_reform/doc_reform.d
@@ -95,6 +95,7 @@ void main(string[] args) {
"section_blurb" : true,
"backmatter" : true,
"skip-output" : false,
+ "workon" : false,
];
string[string] settings = [
"output-dir" : "",
@@ -142,6 +143,7 @@ void main(string[] args) {
"section-blurb", "--section-blurb process document blurb (default)", &opts["section_blurb"],
"backmatter", "--section-backmatter process document backmatter (default)", &opts["backmatter"],
"skip-output", "--skip-output", &opts["skip-output"],
+ "workon", "--workon (reserved for some matters under development & testing)", &opts["workon"],
"output-dir", "--output-dir=[dir path]", &settings["output-dir"],
"site-config-dir", "--site-config-dir=[dir path]", &settings["site-config-dir"],
"sqlite-filename", "--sqlite-filename=[filename].sqlite", &settings["sqlite-filename"],
@@ -310,6 +312,9 @@ void main(string[] args) {
auto skip_output() {
return opts["skip-output"];
}
+ auto workon() {
+ return opts["workon"];
+ }
auto languages_set() {
return settings["lang"].split(",");
}
diff --git a/src/doc_reform/output/xmls.d b/src/doc_reform/output/xmls.d
index 6f1f925..fad0bdf 100644
--- a/src/doc_reform/output/xmls.d
+++ b/src/doc_reform/output/xmls.d
@@ -158,7 +158,7 @@ template outputXHTMLs() {
.replaceAll(
rgx.br_nl, "");
} else {
- _locations = "<p class=\"tiny_left\"><a href=\"http://www.sisudoc.org\">DocReform</a></p>\n<p class=\"tiny_left\"><a href=\"http://www.sisudoc.org\">www.sisudoc.org</a></p>\n<p class=\"tiny_left\"><a href=\"http://git.sisudoc.org/gitweb/\">sources / git</a></p>";
+ _locations = "<p class=\"tiny_left\"><a href=\"http://www.doc-reform.org\">doc-reform</a></p>\n<p class=\"tiny_left\"><a href=\"http://git.sisudoc.org/software/doc-reform/\">sources / git</a></p>\n<p class=\"tiny_left\"><a href=\"http://www.sisudoc.org\">www.sisudoc.org</a></p>";
}
string o;
o = format(q"¶<div class="flex-menu-option">
@@ -174,21 +174,32 @@ template outputXHTMLs() {
string _action="http://www.sisudoc.org/cgi-bin/search.cgi";
string _db="DocReform.7a.manual";
string o;
- o = format(q"¶<div class="flex-menu-option">
- <a name="search"></a>
- <form method="get" action="%s" target="_top">
- <font size="2">
- <input type="text" name="s1" size="24" maxlength="255" />
- <input type="hidden" name="db" value="%s" />
- <input type="hidden" name="ltd" value="1000" />
- <input type="hidden" name="off" value="0" />
- <input type="hidden" name="doc" value="live-manual" /><br />
- <input type="submit" name="search" value="search doc" />
- <input type="submit" name="search" value="search db" />
- </font></form>
+ string _form;
+ if (doc_matters.opt.action.workon) {
+ _form = format(q"¶
+ <a name="search"></a>
+ <form method="get" action="%s" target="_top">
+ <font size="2">
+ <input type="text" name="s1" size="24" maxlength="255" />
+ <input type="hidden" name="db" value="%s" />
+ <input type="hidden" name="ltd" value="1000" />
+ <input type="hidden" name="off" value="0" />
+ <input type="hidden" name="doc" value="live-manual" /><br />
+ <input type="submit" name="search" value="search doc" />
+ <input type="submit" name="search" value="search db" />
+ </font></form>
+ ¶",
+ _action,
+ _db,
+ );
+ } else {
+ _form = format(q"¶%s¶",
+ "",
+ );
+ }
+ o = format(q"¶<div class="flex-menu-option">%s
</div>¶",
- _action,
- _db,
+ _form,
);
return o;
}
@@ -196,6 +207,17 @@ template outputXHTMLs() {
M doc_matters,
string type,
) {
+ 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>
@@ -217,11 +239,7 @@ template outputXHTMLs() {
<div class="flex-menu-bar">
%s
<div class="flex-menu-option">
- <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>
+ %s
</div>
%s%s¶",
doc_matters.conf_make_meta.meta.title_full,
@@ -234,6 +252,7 @@ template outputXHTMLs() {
: "../../css/html_scroll.css"),
doc_matters.src.language,
site_info_button(doc_matters),
+ _manifest,
inline_search_form(doc_matters),
((type == "seg") ? "" : "\n</div>"),
);