on master help sign in
Improved HTML
commit5fb0c76e077e363d926277a1a0c83c2db4bf8e3f authoriko <ilyakooo0@gmail.com> dateSat 11 May 2019, 22:26 (7 years ago) parentf9c223e
2 files changed+8−3
denis/src/Server/Auth/HTML.hs+6−3 denis/src/Server/Auth/Mail.hs+2
denis/src/Server/Auth/HTML.hs+6−3
@@ -35,9 +35,12 @@ genActivationPage verb ua = genPage $ do
3535
3636
3737genPage :: Markup -> Markup
38−genPage pageContent = html $ body ! A.style "font-family: sans-serif; background-color: #eee" $ do
39− H.div ! A.style "text-align: center; margin-top: 20vh; margin-left: 10%; margin-right: 10%" $ do
40− H.div ! A.style "font-size: 40px; font-weight: bold;" $ pageContent
38+genPage pageContent = html $ do
39+ H.head $ do
40+ meta ! name "viewport" ! content "width=device-width, initial-scale=1"
41+ body ! A.style "font-family: sans-serif; background-color: #eee" $ do
42+ H.div ! A.style "text-align: center; margin-top: 20vh; margin-left: 10%; margin-right: 10%" $ do
43+ H.div ! A.style "font-size: 40px; font-weight: bold;" $ pageContent
4144
4245errorPage :: Markup
4346errorPage = genPage $ "Sorry, something went wrong."
denis/src/Server/Auth/Mail.hs+2
@@ -48,6 +48,8 @@ sendMailWithConfig (MailConfig host port user pass) =
4848
4949genMail :: String -> TokenVerificationCode -> UserId -> String -> String -> TL.Text -> Part
5050genMail rootUrl userCode uId activation deactivation ua = htmlPart . renderHtml $ html $ body ! A.style "font-family: sans-serif;" $ do
51+ H.div ! A.style "display: none; max-height: 0px; overflow: hidden;" $ toHtml ua <> ": " <> toHtml [a', b', c', d', e', f']
52+ H.div ! A.style "display: none; max-height: 0px; overflow: hidden;" $ "            "
5153 H.div ! A.style "text-align: center; margin-top: 55px;" $ do
5254 H.a ! href (stringValue $ rootUrl <> "/authentication/activateUser?id=" <> show uId <> "&data=" <> activation) ! A.style "font-size: 34px; font-weight: bold; display: inline-block; padding: 7px 13px 7px 13px; margin-bottom: 89px; text-decoration: underline; font-family: sans-serif; color: #555;" $ "Log in"
5355 br