import Rakka.SystemConfig
import Rakka.Wiki
import Rakka.Wiki.Interpreter
-import Text.XML.HXT.Arrow
+import Text.XML.HXT.XPath
interpreters :: [Interpreter]
(langName, name) : mergeTables m xs
mkLangList :: [(LanguageName, PageName)] -> BlockElement
- mkLangList xs = List Bullet (map mkLangLink xs)
+ mkLangList = List Bullet . map mkLangLink
mkLangLink :: (LanguageName, PageName) -> ListItem
mkLangLink (langName, name)
-- <input type="button"
-- value="Create new page"
-- onclick="Rakka.newPage()"
--- class="newButton" />
+-- class="newButton controls" />
newPageInterp :: Interpreter
newPageInterp
= InlineCommandInterpreter {
attrs = [ ("type" , "button")
, ("value" , label)
, ("onclick", "Rakka.newPage()")
- , ("class" , "newButton")
+ , ("class" , "newButton controls")
]
in
return (Input attrs)
-- <input type="button"
-- value="Edit"
-- onclick="Rakka.editPage(\"Foo\")"
--- class="editButton" />
+-- class="editButton controls" />
editPageInterp :: Interpreter
editPageInterp
= InlineCommandInterpreter {
attrs = [ ("type" , "button")
, ("value" , label)
, ("onclick", "Rakka.editPage(\"" ++ name ++ "\")")
- , ("class" , "editButton")
+ , ("class" , "editButton controls")
]
in
return (Input attrs)
-- <input type="button"
-- value="Login"
--- class="loginButton" />
+-- class="loginButton controls" />
loginInterp :: Interpreter
loginInterp
= InlineCommandInterpreter {
= \ _ _ ->
let attrs = [ ("type" , "button")
, ("value", "Login")
- , ("class", "loginButton")
+ , ("class", "loginButton controls")
]
in
return (Input attrs)
-- <input type="button"
-- value="Configuration"
--- class="configButton" />
+-- class="configButton controls" />
configurationInterp :: Interpreter
configurationInterp
= InlineCommandInterpreter {
= \ _ _ ->
let attrs = [ ("type" , "button")
, ("value", "Configuration")
- , ("class", "configButton")
+ , ("class", "configButton controls")
]
in
return (Input attrs)