aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sisudoc/outputs/io_out/xmls.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2026-09-30 16:55:58 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2026-10-01 10:00:42 -0400
commitb7da3f01212570daf9cc9678d7e46158514eb88b (patch)
treec5cc6e3d565f2d5167a4684769f8a7d87b784a47 /src/sisudoc/outputs/io_out/xmls.d
parenthtml & epub header fixes, miscellany (diff)
title is h1 class "heading title", sized above h1
html & epub (share css): with <h0> gone the title became <h1>. The title now carries class "heading title", and each stylesheet's h0 rules are h1.title rules with the same values; h0 leaves the grouped selectors, being emitted by nothing. In html the title looks as it did. (assisted by Claude-Code)
Diffstat (limited to 'src/sisudoc/outputs/io_out/xmls.d')
-rw-r--r--src/sisudoc/outputs/io_out/xmls.d16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/sisudoc/outputs/io_out/xmls.d b/src/sisudoc/outputs/io_out/xmls.d
index aba0e4f..b6001ea 100644
--- a/src/sisudoc/outputs/io_out/xmls.d
+++ b/src/sisudoc/outputs/io_out/xmls.d
@@ -236,6 +236,18 @@ template outputXHTMLs() {
if (_lev < 1) { return 1; }
return (_lev > 6) ? 6 : _lev;
}
+ /+ ↓ the class a heading carries. The title (level A) shares <h1> with level B,
+ having no element of its own since bespoke <h0> is not recognized and no
+ longer used, so it is told apart by class: "heading title", which the
+ stylesheets size a step above h1, as h0 was. Shifting every level down one
+ instead would give the title alone h1, and would further compress the
+ limited html heading range (h1 - h6).
+ +/
+ string _heading_class(O)(O obj) {
+ return (obj.metainfo.heading_lev_markup == 0)
+ ? obj.metainfo.is_a ~ " title"
+ : obj.metainfo.is_a;
+ }
/+ ↓ the anchors an object carries.
"name" on an <a> is obsolete; "id" is what a link target is. The
two are not interchangeable here, because these tags are not all
@@ -983,7 +995,7 @@ string tail(M)(M doc_matters) {
? "" : ((obj.metainfo.object_number.empty)
? "" : obj.metainfo.identifier),
_heading_element_level(obj, _xml_type),
- obj.metainfo.is_a,
+ _heading_class(obj),
obj.metainfo.identifier,
tags,
heading_lev_anchor_tag,
@@ -999,7 +1011,7 @@ string tail(M)(M doc_matters) {
</div>┃",
_horizontal_rule,
_heading_element_level(obj, _xml_type),
- obj.metainfo.is_a,
+ _heading_class(obj),
tags,
heading_lev_anchor_tag,
_txt,