1
1
mirror of https://github.com/aelve/guide.git synced 2024-11-23 12:15:06 +03:00
This commit is contained in:
Artyom 2016-03-16 00:14:22 +03:00
parent 2504b6c969
commit 61be3b5a2e
2 changed files with 4 additions and 1 deletions

View File

@ -688,6 +688,9 @@ clearInput = JS "this.value = '';"
onFormSubmit :: (JS -> JS) -> Attribute
onFormSubmit f = onsubmit_ $ format "{} return false;" [f (JS "this")]
-- TODO: make links to categories look like id/category-name (where
-- category-name doesn't matter)
button :: Text -> [Attribute] -> JS -> HtmlT IO ()
button value attrs handler =
input_ (type_ "button" : value_ value : onclick_ handler' : attrs)

View File

@ -8,7 +8,7 @@ The most important rule is: **it's collaborative notes, not Wikipedia**. In othe
Markdown is supported in most places. 2 noteworthy features: tou can write `[pkg](@hackage)` to get a link to package `pkg` on Hackage, and you can mark snippets of code with `repl` to show that they come from GHCi:
~~~~
~~~ haskell repl
~~~ hs repl
> 2+2
4
~~~