1
1
mirror of https://github.com/aelve/guide.git synced 2024-11-23 12:15:06 +03:00

Add anchor links

This commit is contained in:
Artyom 2016-02-20 15:47:24 +03:00
parent 0d3000ebde
commit c515bd6a53
2 changed files with 6 additions and 2 deletions

View File

@ -254,11 +254,11 @@ renderRoot globalState = do
renderCategoryTitle :: Editable -> Category -> HtmlT IO ()
renderCategoryTitle editable category =
h2_ $ do
h2_ [id_ (tshow (category^.uid))] $ do
a_ [class_ "anchor", href_ ("#" <> tshow (category^.uid))] "#"
titleNode <- thisNode
case editable of
Editable -> do
-- TODO: make category headings anchor links
toHtml (category^.title)
textButton "edit" $
js_setCategoryTitleMode (titleNode, category^.uid, InEdit)

View File

@ -11,6 +11,10 @@
.pros, .cons {
margin: 0px 5px; }
.anchor {
margin-right: 0.5em;
color: gray; }
.textButton {
margin-left: 1em; }