aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/doc_reform.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2018-11-11 19:22:30 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2019-04-10 15:14:15 -0400
commit77a3e41fb1fa01fe739c5c450a374498abe7f6d0 (patch)
treebf0eee1251d6d68b7d8176482617dad9be76f4e5 /src/doc_reform/doc_reform.d
parent--workon flag, for some under construction code (diff)
0.3.2 css themes, --dark & --light (default)
Diffstat (limited to 'src/doc_reform/doc_reform.d')
-rwxr-xr-xsrc/doc_reform/doc_reform.d19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/doc_reform/doc_reform.d b/src/doc_reform/doc_reform.d
index 30b79a9..48608f6 100755
--- a/src/doc_reform/doc_reform.d
+++ b/src/doc_reform/doc_reform.d
@@ -62,12 +62,14 @@ void main(string[] args) {
"abstraction" : false,
"assertions" : false,
"concordance" : false,
+ "dark" : false,
"debug" : false,
"digest" : false,
"epub" : false,
"html" : false,
"html-seg" : false,
"html-scroll" : false,
+ "light" : false,
"manifest" : false,
"ocn" : true,
"parallelise" : true,
@@ -95,6 +97,8 @@ void main(string[] args) {
"section_blurb" : true,
"backmatter" : true,
"skip-output" : false,
+ "theme-dark" : false,
+ "theme-light" : false,
"workon" : false,
];
string[string] settings = [
@@ -108,12 +112,14 @@ void main(string[] args) {
"abstraction", "--abstraction document abstraction ", &opts["abstraction"],
"assert", "--assert set optional assertions on", &opts["assertions"],
"concordance", "--concordance file for document", &opts["concordance"],
+ "dark", "--dark alternative dark theme", &opts["dark"],
"debug", "--debug", &opts["debug"],
"digest", "--digest hash digest for each object", &opts["digest"],
"epub", "--epub process epub output", &opts["epub"],
"html", "--html process html output", &opts["html"],
"html-seg", "--html-seg process html output", &opts["html-seg"],
"html-scroll", "--html-seg process html output", &opts["html-scroll"],
+ "light", "--light default light theme", &opts["light"],
"manifest", "--manifest process manifest output", &opts["manifest"],
"ocn", "--ocn object cite numbers (default)", &opts["ocn"],
"parallelise", "--parallelise parallelisation", &opts["parallelise"],
@@ -143,6 +149,8 @@ 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"],
+ "theme-dark", "--theme-dark alternative dark theme", &opts["theme-dark"],
+ "theme-light", "--theme-light default light theme", &opts["theme-light"],
"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"],
@@ -160,6 +168,17 @@ void main(string[] args) {
auto concordance() {
return opts["concordance"];
}
+ auto css_theme_default() {
+ bool _is_light;
+ if (opts["light"] || opts["theme-light"]) {
+ _is_light = true;
+ } else if (opts["dark"] || opts["theme-dark"]) {
+ _is_light = false;
+ } else {
+ _is_light = true;
+ }
+ return _is_light;
+ }
auto debug_do() {
return opts["debug"];
}