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.
This commit is contained in:
John MacFarlane 2019-01-02 11:24:53 -08:00
parent ea8af33dab
commit 9097ec41a9
2 changed files with 5 additions and 3 deletions

View file

@ -10,9 +10,10 @@ h6 { text-align: left; }
h1.title { }
h2.author { }
h3.date { }
ol.toc { padding: 0; margin-left: 1em; }
ol.toc li { list-style-type: none; margin: 0; padding: 0; }
nav#toc ol,
nav#landmarks ol { padding: 0; margin-left: 1em; }
nav#toc ol li,
nav#landmarks ol li { list-style-type: none; margin: 0; padding: 0; }
a.footnote-ref { vertical-align: super; }
em, em em em, em em em em em { font-style: italic;}
em em, em em em em { font-style: normal; }

View file

@ -814,6 +814,7 @@ pandocToEPUB version opts doc@(Pandoc meta _) = do
let landmarks = if epub3
then [RawBlock (Format "html") $ ppElement $
unode "nav" ! [("epub:type","landmarks")
,("id","landmarks")
,("hidden","hidden")] $
[ unode "ol" $
[ unode "li"