From 77a3e41fb1fa01fe739c5c450a374498abe7f6d0 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 11 Nov 2018 19:22:30 -0500 Subject: 0.3.2 css themes, --dark & --light (default) --- org/doc_reform.org | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'org/doc_reform.org') diff --git a/org/doc_reform.org b/org/doc_reform.org index ab437f9..be82dc2 100644 --- a/org/doc_reform.org +++ b/org/doc_reform.org @@ -24,7 +24,7 @@ struct Version { int minor; int patch; } -enum ver = Version(0, 3, 1); +enum ver = Version(0, 3, 2); #+END_SRC ** compilation restrictions (supported compilers) @@ -245,12 +245,14 @@ bool[string] opts = [ "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, @@ -278,6 +280,8 @@ bool[string] opts = [ "section_blurb" : true, "backmatter" : true, "skip-output" : false, + "theme-dark" : false, + "theme-light" : false, "workon" : false, ]; string[string] settings = [ @@ -291,12 +295,14 @@ auto helpInfo = getopt(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"], @@ -326,6 +332,8 @@ 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"], + "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"], @@ -349,6 +357,17 @@ struct OptActions { 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"]; } -- cgit v1.2.3