module Login exposing (..) import CommonElements exposing (..) import Element exposing (..) import Element.Input as Input import Model exposing (..) getPage : Model -> Element Msg getPage model = column [] [ loginBox model , namedLink "/signup" "Sign Up" ] loginBox : Model -> Element Msg loginBox model = column [] [ text "Log in" , Input.email [ Input.focusedOnLoad ] { onChange = CredentialsChange "loginUsername" , text = Maybe.withDefault "" model.storage.loginUsername , placeholder = Just (Input.placeholder [] (text "")) , label = Input.labelHidden "email" } , Input.currentPassword [] { onChange = CredentialsChange "loginPassword" , text = Maybe.withDefault "" model.storage.loginPassword , placeholder = Just (Input.placeholder [] (text "")) , label = Input.labelHidden "password" , show = False } , Input.button [] { onPress = Just SubmitLogin , label = text "Log In" } ]