aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/output_xmls.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/output_xmls.org')
-rw-r--r--org/output_xmls.org24
1 files changed, 16 insertions, 8 deletions
diff --git a/org/output_xmls.org b/org/output_xmls.org
index ab0536d..5a39bfd 100644
--- a/org/output_xmls.org
+++ b/org/output_xmls.org
@@ -675,13 +675,13 @@ string lev4_heading_subtoc(M,O)(
lev4_subtoc ~= " <div class=\"nav\">\n";
foreach (subtoc; obj.tags.lev4_subtoc) {
if (auto m = subtoc.match(rgx.inline_link_subtoc)) {
- auto indent = m.captures[1].to!string;
+ auto indent = (m.captures[1].to!int - 3).to!string; // css assumptions based on use of em for left margin & indent
auto text = m.captures[2].to!string;
text = font_face(text);
auto link = m.captures[3].to!string;
lev4_subtoc ~= subtoc.replaceFirst(rgx.inline_link_subtoc,
format(q"¶ <p class="minitoc" indent="h%si%s">
- <a href="%s">%s</a>
+ ۰ <a href="%s">%s</a>
</p>
¶",
indent,
@@ -1296,7 +1296,7 @@ auto code(M,O)(
if (!(obj.metainfo.identifier.empty)) {
o = format(q"¶ <div class="substance">
<label class="ocn"><a href="#%s" class="lnkocn">%s</a></label>
- <p class="%s" id="%s">%s</p>
+ <pre><p class="%s" id="%s">%s</p></pre>
</div>¶",
obj.metainfo.identifier,
(obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier,
@@ -1306,7 +1306,7 @@ auto code(M,O)(
);
} else {
o = format(q"¶ <div class="substance">
- <p class="%s">%s</p>
+ <pre><p class="%s">%s</p></pre>
</div>¶",
obj.metainfo.is_a,
_txt
@@ -1958,9 +1958,13 @@ void css(M)(
(pth_html.css).mkdirRecurse;
}
auto f = File(pth_html.fn_seg_css, "w");
- f.writeln(css.html_seg_css);
+ (doc_matters.opt.action.css_theme_default)
+ ? f.writeln(css.light.html_seg)
+ : f.writeln(css.dark.html_seg);
f = File(pth_html.fn_scroll_css, "w");
- f.writeln(css.html_scroll_css);
+ (doc_matters.opt.action.css_theme_default)
+ ? f.writeln(css.light.html_scroll)
+ : f.writeln(css.dark.html_scroll);
} catch (ErrnoException ex) {
// Handle error
}
@@ -2867,14 +2871,18 @@ void epub3_write_output_files(M,D,E,Mt,Mic,Otnx,Otn,Oc)(
{ /+ debug +/
if (doc_matters.opt.action.debug_do) {
fn_dbg = pth_epub3.dbg_fn_oebps_css(doc_matters.src.filename);
- File(fn_dbg, "w").writeln(css.epub_css);
+ (doc_matters.opt.action.css_theme_default)
+ ? File(fn_dbg, "w").writeln(css.light.epub)
+ : File(fn_dbg, "w").writeln(css.dark.epub);
}
}
fn = pth_epub3.fn_oebps_css(doc_matters.src.filename);
auto zip_arc_member_file = new ArchiveMember();
zip_arc_member_file.name = fn;
auto zip_data = new OutBuffer();
- zip_data.write(css.epub_css.dup);
+ (doc_matters.opt.action.css_theme_default)
+ ? zip_data.write(css.light.epub.dup)
+ : zip_data.write(css.dark.epub.dup);
zip_arc_member_file.expandedData = zip_data.toBytes();
zip.addMember(zip_arc_member_file);
createZipFile!()(fn_epub, zip.build());