diff options
author | Ben Sima <ben@bsima.me> | 2023-01-09 13:06:53 -0500 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2023-01-09 13:06:53 -0500 |
commit | 906db8d4ac24f65f38e1d31bfdaa47602a54d759 (patch) | |
tree | 6f17a84703fb12599d393dc58a90ba9e62f5ca97 /Biz/App.hs | |
parent | 3e89ecfeb236065d845a632324324d57c49b829e (diff) |
Reorganize some Auth/App stuff
Diffstat (limited to 'Biz/App.hs')
-rw-r--r-- | Biz/App.hs | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -5,7 +5,8 @@ -- | General utils for apps module Biz.App - ( CSS (..), + ( Area (..), + CSS (..), HasCss (..), Manifest (..), Html (..), @@ -22,6 +23,16 @@ import Network.HTTP.Media (/:), ) import Servant.API (Accept (..), MimeRender (..)) +import qualified System.Envy as Envy + +data Area = Test | Live + deriving (Generic, Show) + +instance Envy.Var Area where + toVar = show + fromVar "Test" = Just Test + fromVar "Live" = Just Live + fromVar _ = Just Test newtype CSS = CSS { unCSS :: Text @@ -47,7 +58,7 @@ data Manifest = Manifest instance ToJSON Manifest -- | A wrapper for an HTML page. You need to provide an orphan --- 'Lucid.Base.ToHtml' instance in the Host module of your app. +-- 'Lucid.Base.ToHtml' instance in the web module of your app. -- -- Ideally this would be captured in a Biz.App type, with overrides for head -- elements, and we would wouldn't have to make the same basic orphan instance |