1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-23 12:52:31 +03:00

[GD-2] Style the login form

This commit is contained in:
Artyom 2017-04-30 01:00:54 +03:00
parent b1e9f16081
commit d2c816f798
No known key found for this signature in database
GPG Key ID: B8E35A33FF522710
3 changed files with 33 additions and 4 deletions

View File

@ -393,7 +393,7 @@ protectForm :: MonadIO m
-> GuideAction ctx (HtmlT m ()) -> GuideAction ctx (HtmlT m ())
protectForm render formView = do protectForm render formView = do
(name, value) <- getCsrfTokenPair (name, value) <- getCsrfTokenPair
return $ form formView "" $ do return $ form formView "" [id_ "login-form"] $ do
input_ [ type_ "hidden", name_ name, value_ value ] input_ [ type_ "hidden", name_ name, value_ value ]
render formView render formView

View File

@ -152,12 +152,15 @@ label ref view = label_
ref' = absoluteRef ref view ref' = absoluteRef ref view
form :: Monad m => View (HtmlT m ()) -> Text -> HtmlT m () -> HtmlT m () form
form view action = form_ :: Monad m
=> View (HtmlT m ()) -> Text -> [Attribute] -> HtmlT m () -> HtmlT m ()
form view action attributes = form_ $
[ method_ "POST" [ method_ "POST"
, enctype_ (pack $ show $ viewEncType view) , enctype_ (pack $ show $ viewEncType view)
, action_ action , action_ action
] ]
++ attributes
errorList :: Monad m => Text -> View (HtmlT m ()) -> HtmlT m () errorList :: Monad m => Text -> View (HtmlT m ()) -> HtmlT m ()

View File

@ -342,4 +342,30 @@ textarea.fullwidth {
.markdown-supported { .markdown-supported {
height: 1em; height: 1em;
} }
#login-form {
margin: 0px auto;
width: 430px;
border: 1px solid gray;
border-radius: 4px;
padding: 40px 50px;
padding-bottom: 35px;
margin-top: 60px;
font-size: 120%;
}
#login-form > div {
margin-bottom: 25px;
}
#login-form [type='text'], #login-form [type='password'] {
float: right;
margin-top: -5px;
padding: 2px 3px;
}
#login-form [type='submit'] {
width: 100px;
margin-top: 10px;
}