summaryrefslogtreecommitdiff
path: root/Biz/Devalloc/Page/Signup.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-12-04 11:16:25 -0500
committerBen Sima <ben@bsima.me>2020-12-05 07:55:13 -0500
commit330e4363d8abb509031d2c8c1a89dcc6f955e2c1 (patch)
tree915c8c50a7125bf6eb9e560f8d00a80592f41c77 /Biz/Devalloc/Page/Signup.hs
parent32f53350a3a3d701e9a1474e670a8454342adc40 (diff)
Renamespace Devalloc and Que
Move them under the Biz root so that we know they are specific to Biz stuff. Biz is for proprietary stuff that we own. I also had to refactor the bild namespace parsing code because it couldn't handle a namespace with 3 parts. I really need to get that namespace library written and tested.
Diffstat (limited to 'Biz/Devalloc/Page/Signup.hs')
-rw-r--r--Biz/Devalloc/Page/Signup.hs46
1 files changed, 46 insertions, 0 deletions
diff --git a/Biz/Devalloc/Page/Signup.hs b/Biz/Devalloc/Page/Signup.hs
new file mode 100644
index 0000000..8debf53
--- /dev/null
+++ b/Biz/Devalloc/Page/Signup.hs
@@ -0,0 +1,46 @@
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE NoImplicitPrelude #-}
+
+module Biz.Devalloc.Page.Signup
+ ( Move (..),
+ Path,
+ Form (..),
+ path,
+ view,
+ host,
+ )
+where
+
+import Alpha
+import Biz.App (HtmlApp (..))
+import Miso
+import Miso.String
+import Servant.API
+import Servant.Links
+import Servant.Server (Handler)
+
+data Move = NoMove
+
+type Path = View Move
+
+newtype Form = Form
+ { uri :: URI
+ }
+
+path :: URI
+path = linkURI <| safeLink (Proxy :: Proxy Path) (Proxy :: Proxy Path)
+
+host :: Handler (HtmlApp (View Move))
+host =
+ Form {uri = path}
+ |> view
+ |> HtmlApp
+ |> pure
+
+view :: Form -> View Move
+view _ =
+ div_
+ []
+ [ h1_ [] [text "Signup coming soon"],
+ p_ [] [a_ [href_ "/"] [text "Go back home"]]
+ ]