diff options
author | Joris | 2020-01-19 16:30:01 +0100 |
---|---|---|
committer | Joris | 2020-01-19 16:30:01 +0100 |
commit | 5a13317efdaa2a8594a138b07ddd45eab40a8322 (patch) | |
tree | 56c715e2bf57bbae5c6321488d2504f5708dbfe5 /server/src | |
parent | 209008f155068835077719eeec942a9b979b3a04 (diff) |
Return the css at /css/main.css instead of inlined
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/Main.hs | 5 | ||||
-rw-r--r-- | server/src/View/Page.hs | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/server/src/Main.hs b/server/src/Main.hs index 324557e..999f973 100644 --- a/server/src/Main.hs +++ b/server/src/Main.hs @@ -14,6 +14,7 @@ import qualified Controller.Income as Income import qualified Controller.Index as Index import qualified Controller.Payment as Payment import qualified Controller.User as User +import qualified Design.Global as Design import Job.Daemon (runDaemons) main :: IO () @@ -28,6 +29,10 @@ main = do S.middleware . staticPolicy $ noDots >-> addBase "public" + S.get "/css/main.css" $ do + S.setHeader "Content-Type" "text/css" + S.text Design.globalDesign + S.post "/api/signIn" $ S.jsonData >>= Index.signIn conf diff --git a/server/src/View/Page.hs b/server/src/View/Page.hs index 4ada5f7..bac6b8a 100644 --- a/server/src/View/Page.hs +++ b/server/src/View/Page.hs @@ -18,8 +18,6 @@ import qualified Text.Blaze.Html5.Attributes as A import Common.Model (Init) import qualified Common.Msg as Msg -import Design.Global (globalDesign) - page :: Maybe Init -> Text page init = renderHtml . docTypeHtml $ do @@ -30,8 +28,8 @@ page init = script ! src "/javascript/main.js" $ "" jsonScript "init" init link ! rel "stylesheet" ! type_ "text/css" ! href "/css/reset.css" + link ! rel "stylesheet" ! type_ "text/css" ! href "/css/main.css" link ! rel "icon" ! type_ "image/png" ! href "/images/icon.png" - H.style $ toHtml globalDesign H.body $ do H.div ! A.class_ "spinner" $ "" |