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:
parent
0d3000ebde
commit
c515bd6a53
@ -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)
|
||||
|
@ -11,6 +11,10 @@
|
||||
.pros, .cons {
|
||||
margin: 0px 5px; }
|
||||
|
||||
.anchor {
|
||||
margin-right: 0.5em;
|
||||
color: gray; }
|
||||
|
||||
.textButton {
|
||||
margin-left: 1em; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user