register html

This commit is contained in:
Yann Esposito (Yogsototh) 2019-01-27 19:30:18 +01:00
parent 95db1db9ad
commit 70754f81d7
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
3 changed files with 35 additions and 2 deletions

View file

@ -11,4 +11,10 @@ let PostgresConfig
let DBConf : Type = < SQLite : SQLiteConfig | Postgre : PostgresConfig > let DBConf : Type = < SQLite : SQLiteConfig | Postgre : PostgresConfig >
in { port = 3000, db = DBConf.SQLite { filepath = "aggreact.db" } } in { port =
3000
, jwtKeyFilePath =
"jwt.key"
, db =
DBConf.SQLite { filepath = "aggreact.db" }
}

View file

@ -134,6 +134,19 @@ genCss = do
display inlineBlock display inlineBlock
content (stringContent "[-]") content (stringContent "[-]")
cursor pointer cursor pointer
input # ("type" |= "submit") ? do
fontWeight bold
borderBottom solid (px 0) solblue
borderTop solid (px 0) solblue
borderLeft solid (px 0) solblue
borderRight solid (px 0) solblue
backgroundColor base2
hover & do
backgroundColor base3
cursor pointer
color base01
button ?
border solid (px 1) black
input # ("type" |= "checkbox") ? input # ("type" |= "checkbox") ?
display none display none
input # ("type" |= "checkbox") # checked |+ div |> label |> span ? input # ("type" |= "checkbox") # checked |+ div |> label |> span ?

View file

@ -50,7 +50,8 @@ container :: H.Html -> H.Html
container = H.div ! A.class_ "container" container = H.div ! A.class_ "container"
loginPage :: H.Html loginPage :: H.Html
loginPage = loginPage = do
H.h2 "Login"
H.form ! A.action "/login" ! A.method "post" $ do H.form ! A.action "/login" ! A.method "post" $ do
H.label (H.text "username") H.label (H.text "username")
H.input ! A.name "username" H.input ! A.name "username"
@ -59,6 +60,19 @@ loginPage =
H.input ! A.type_ "password" ! A.name "password" H.input ! A.type_ "password" ! A.name "password"
H.br H.br
H.input ! A.type_ "submit" ! A.value "Login" H.input ! A.type_ "submit" ! A.value "Login"
H.hr
H.h2 "Create Account"
H.form ! A.action "/users" ! A.method "post" $ do
H.label (H.text "username")
H.input ! A.name "username"
H.br
H.label (H.text "password")
H.input ! A.type_ "password" ! A.name "password"
H.br
H.label (H.text "email?")
H.input ! A.type_ "email" ! A.name "email"
H.br
H.input ! A.type_ "submit" ! A.value "Create Account"
data LoginPage = LoginPage data LoginPage = LoginPage
instance H.ToMarkup LoginPage where instance H.ToMarkup LoginPage where