EPUB writer: small fixes to nav.xhtml.
* Add 'landmarks' id attribute to the landmarks nav.
* Replace old default CSS removing numbers from ol.toc li
with new rules that match `nav#toc ol, nav#landmarks ol`.
* We keep the `toc` class on `ol` for backwards compatibility.
commit9097ec41a9c333f24fec63085806da392f8108d4
authorJohn MacFarlane <jgm@berkeley.edu>
dateWed 2 Jan 2019, 11:24 (8 years ago)
parentea8af33
data/epub.css+4−3
@@ -10,9 +10,10 @@ h6 { text-align: left; }
1010h1.title { }
1111h2.author { }
1212h3.date { }
13−ol.toc { padding: 0; margin-left: 1em; }
14−ol.toc li { list-style-type: none; margin: 0; padding: 0; }
13+nav#toc ol,
14+nav#landmarks ol { padding: 0; margin-left: 1em; }
15+nav#toc ol li,
16+nav#landmarks ol li { list-style-type: none; margin: 0; padding: 0; }
1517a.footnote-ref { vertical-align: super; }
1618em, em em em, em em em em em { font-style: italic;}
1719em em, em em em em { font-style: normal; }
18−
src/Text/Pandoc/Writers/EPUB.hs+1
@@ -814,6 +814,7 @@ pandocToEPUB version opts doc@(Pandoc meta _) = do
814814 let landmarks = if epub3
815815 then [RawBlock (Format "html") $ ppElement $
816816 unode "nav" ! [("epub:type","landmarks")
817+ ,("id","landmarks")
817818 ,("hidden","hidden")] $
818819 [ unode "ol" $
819820 [ unode "li"