From 2f5a95b312498453753348c4404df2f8e25cb134 Mon Sep 17 00:00:00 2001 From: Xubai Wang Date: Fri, 18 Feb 2022 14:03:54 +0800 Subject: [PATCH] fix: add nav link to non leaf node modules --- DocGen4/Output/Navbar.lean | 2 +- DocGen4/ToHtmlFormat.lean | 6 +++--- static/style.css | 7 ++----- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/DocGen4/Output/Navbar.lean b/DocGen4/Output/Navbar.lean index d2d4792..008ebdf 100644 --- a/DocGen4/Output/Navbar.lean +++ b/DocGen4/Output/Navbar.lean @@ -28,7 +28,7 @@ partial def moduleListDir (h : Hierarchy) : HtmlM Html := do pure
- {h.getName.toString} + {h.getName.toString} [dirNodes] [fileNodes]
diff --git a/DocGen4/ToHtmlFormat.lean b/DocGen4/ToHtmlFormat.lean index beddf74..d96f2a9 100644 --- a/DocGen4/ToHtmlFormat.lean +++ b/DocGen4/ToHtmlFormat.lean @@ -33,9 +33,9 @@ def attributesToString (attrs : Array (String × String)) :String := -- TODO: Termination proof partial def toStringAux : Html → String -| element tag false attrs #[text s] => s!"<{tag}{attributesToString attrs}>{s}\n" -| element tag false attrs #[child] => s!"<{tag}{attributesToString attrs}>\n{child.toStringAux}\n" -| element tag false attrs children => s!"<{tag}{attributesToString attrs}>\n{children.foldl (· ++ toStringAux ·) ""}\n" +| element tag false attrs #[text s] => s!"<{tag}{attributesToString attrs}>{s}" +| element tag false attrs #[child] => s!"<{tag}{attributesToString attrs}>{child.toStringAux}" +| element tag false attrs children => s!"<{tag}{attributesToString attrs}>{children.foldl (· ++ toStringAux ·) ""}" | element tag true attrs children => s!"<{tag}{attributesToString attrs}>{children.foldl (· ++ toStringAux ·) ""}" | text s => s 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%; }