1
1
mirror of https://github.com/aelve/guide.git synced 2024-11-23 21:13:07 +03:00

Add another “hide help” link

This commit is contained in:
Artyom 2016-03-20 14:08:26 +03:00
parent aa6efe9d9a
commit 8d68933137

View File

@ -243,6 +243,14 @@ renderHelp = do
-- substantially and you think the users should reread it
help <- liftIO $ T.readFile "static/help.md"
toHtml $ renderMarkdownBlock help
-- Replicating “hide help” so that it would be more noticeable
p_ $ do
let handler =
fromJS (JS.hideHelp (JS.selectId "help", helpVersion)) <>
"return false;"
"If you're finished reading, "
a_ [href_ "#", onclick_ handler] "hide this message"
"."
helpVersion :: Int
helpVersion = 3