@@ -793,13 +793,8 @@ pandocToEPUB version opts doc = do
793 [("id","toc")]) $
793 [("id","toc")]) $
794 [ unode "h1" ! [("id","toc-title")] $ tocTitle
794 [ unode "h1" ! [("id","toc-title")] $ tocTitle
795 , unode "ol" ! [("class","toc")] $ tocBlocks ]]
795 , unode "ol" ! [("class","toc")] $ tocBlocks ]]
796− let landmarks = if epub3
796+ let landmarkItems = if epub3
797− then [RawBlock (Format "html") $ ppElement $
798− unode "nav" ! [("epub:type","landmarks")
800− ,("hidden","hidden")] $
802− [ unode "li"
797+ then [ unode "li"
803 [ unode "a" ! [("href", "text/cover.xhtml")
798 [ unode "a" ! [("href", "text/cover.xhtml")
804 ,("epub:type", "cover")] $
799 ,("epub:type", "cover")] $
805 "Cover"] |
800 "Cover"] |
@@ -811,9 +806,15 @@ pandocToEPUB version opts doc = do
811 "Table of contents"
806 "Table of contents"
812 ] | writerTableOfContents opts
807 ] | writerTableOfContents opts
810+ let landmarks = if null landmarkItems
812+ else [RawBlock (Format "html") $ ppElement $
813+ unode "nav" ! [("epub:type","landmarks")
815+ ,("hidden","hidden")] $
816+ [ unode "ol" landmarkItems ]
817 navData <- lift $ writeHtml opts'{ writerVariables = ("navpage","true"):
818 navData <- lift $ writeHtml opts'{ writerVariables = ("navpage","true"):
818 cssvars False ++ vars }
819 cssvars False ++ vars }
819 (Pandoc (setMeta "title"
820 (Pandoc (setMeta "title"