diff options
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 |