aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/output/html.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc_reform/output/html.d')
-rw-r--r--src/doc_reform/output/html.d34
1 files changed, 14 insertions, 20 deletions
diff --git a/src/doc_reform/output/html.d b/src/doc_reform/output/html.d
index 820b9a7..85ec9ba 100644
--- a/src/doc_reform/output/html.d
+++ b/src/doc_reform/output/html.d
@@ -97,10 +97,10 @@ template outputHTML() {
doc_html ~= xhtml_format.verse_scroll(_txt, obj, doc_matters, suffix);
break;
case "code":
- doc_html ~= xhtml_format.code(_txt, obj);
+ doc_html ~= xhtml_format.code(_txt, obj, doc_matters);
break;
case "table":
- doc_html ~= xhtml_format.table(_txt, obj);
+ doc_html ~= xhtml_format.table(_txt, obj, doc_matters);
break;
default:
{ /+ debug +/
@@ -181,11 +181,11 @@ template outputHTML() {
}
}
doc = xhtml_format.html_head(doc_matters, "scroll") ~ doc_html ~ xhtml_format.tail;
- scroll_write_output(doc_matters, doc);
+ scroll_write_output(doc, doc_matters);
}
- void scroll_write_output(M,C)(
+ void scroll_write_output(D,M)(
+ D doc,
M doc_matters,
- C doc,
) {
debug(asserts) {
static assert(is(typeof(doc) == string[]));
@@ -368,10 +368,10 @@ template outputHTML() {
doc_html_endnotes[segment_filename] ~= t[1];
break;
case "code":
- doc_html[segment_filename] ~= xhtml_format.code(_txt, obj);
+ doc_html[segment_filename] ~= xhtml_format.code(_txt, obj, doc_matters);
break;
case "table":
- doc_html[segment_filename] ~= xhtml_format.table(_txt, obj);
+ doc_html[segment_filename] ~= xhtml_format.table(_txt, obj, doc_matters);
doc_html_endnotes[segment_filename] ~= "";
break;
default:
@@ -457,12 +457,12 @@ template outputHTML() {
}
}
}
- seg_write_output(doc_matters, doc_html, doc_html_endnotes);
+ seg_write_output(doc_html, doc_html_endnotes, doc_matters);
}
- void seg_write_output(M,D,E)(
- M doc_matters,
+ void seg_write_output(D,E,M)(
D doc_html,
E doc_html_endnotes,
+ M doc_matters,
) {
debug(asserts) {
static assert(is(typeof(doc_html) == string[][string]));
@@ -493,23 +493,17 @@ template outputHTML() {
writeln(" ", pth_html.fn_seg(doc_matters.src.filename, "toc"));
}
}
- void css(M)(
- M doc_matters,
- ) {
- auto css = DocReformCss();
+ void css(M)(M doc_matters) {
+ auto css = DocReformCss(doc_matters);
auto pth_html = DocReformPathsHTML!()(doc_matters.output_path, doc_matters.src.language);
try {
if (!exists(pth_html.css)) {
(pth_html.css).mkdirRecurse;
}
auto f = File(pth_html.fn_seg_css, "w");
- (doc_matters.opt.action.css_theme_default)
- ? f.writeln(css.light.html_seg)
- : f.writeln(css.dark.html_seg);
+ f.writeln(css.html_seg);
f = File(pth_html.fn_scroll_css, "w");
- (doc_matters.opt.action.css_theme_default)
- ? f.writeln(css.light.html_scroll)
- : f.writeln(css.dark.html_scroll);
+ f.writeln(css.html_scroll);
} catch (ErrnoException ex) {
// Handle error
}