Verified Commit 9047951b authored by Camil Staps's avatar Camil Staps 🚀

Minimal styles for sidebar ToC (#4)

parent 2aac5f28
Pipeline #14661 failed with stage
in 55 seconds
......@@ -51,7 +51,20 @@ a.hidden {
}
#toc ul {
padding-left: 1.5em;
list-style-type: none;
padding-left: 0;
}
#toc a {
color: inherit;
text-decoration: none;
}
#toc a:hover {
text-decoration: underline;
}
#toc a.active {
font-weight: bold;
text-decoration: none;
}
#search {
......
......@@ -73,7 +73,13 @@ where
sidebarLink :: !DescribedModule -> HtmlTag
sidebarLink dm = LiTag []
[ATag [HrefAttr (relativePath ("mod" </> dm.name +++ ".html"))] [Text dm.name]]
[ ATag (catMaybes
[ Just $ HrefAttr (relativePath thispath)
, if (fp == thispath) (Just $ ClassAttr "active") Nothing
])
[Text dm.name]
]
where thispath = "mod" </> dm.name +++ ".html"
moduleFile :: !DescribedModule -> (FilePath, HtmlTag)
moduleFile m = ("mod" </> m.name +++ ".html", html)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment