diff --git a/DocGen4/Output/Navbar.lean b/DocGen4/Output/Navbar.lean index d2d4792..efc9735 100644 --- a/DocGen4/Output/Navbar.lean +++ b/DocGen4/Output/Navbar.lean @@ -21,14 +21,15 @@ def moduleListFile (file : Name) : HtmlM Html := do partial def moduleListDir (h : Hierarchy) : HtmlM Html := do let children := Array.mk (h.getChildren.toList.map Prod.snd) let dirs := children.filter (λ c => c.getChildren.toList.length != 0) - let files := children.filter Hierarchy.isFile |>.map Hierarchy.getName + let files := children.filter (λ c => Hierarchy.isFile c ∧ c.getChildren.toList.length = 0) + |>.map Hierarchy.getName let dirNodes ← (dirs.mapM moduleListDir) let fileNodes ← (files.mapM moduleListFile) let moduleLink ← moduleNameToLink h.getName pure
- {h.getName.toString} + {Html.element "summary" true #[] #[{h.getName.toString}]} [dirNodes] [fileNodes]
diff --git a/static/style.css b/static/style.css index 7e28a65..a4e0c9a 100644 --- a/static/style.css +++ b/static/style.css @@ -273,13 +273,10 @@ nav { margin-top: 1ex; } -.nav details > * { +.nav details, .nav_link { padding-left: 2ex; } -.nav summary { - cursor: pointer; - padding-left: 0; -} + .nav summary::marker { font-size: 85%; }