aboutsummaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-rw-r--r--server/src/Main.hs5
-rw-r--r--server/src/View/Page.hs4
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" $ ""