aboutsummaryrefslogtreecommitdiff
path: root/src/server/View
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/View')
-rw-r--r--src/server/View/Page.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/server/View/Page.hs b/src/server/View/Page.hs
index a397a96..e0b924b 100644
--- a/src/server/View/Page.hs
+++ b/src/server/View/Page.hs
@@ -5,15 +5,20 @@ module View.Page
) where
import Data.Text.Internal.Lazy (Text)
+import Data.Text.Lazy.Encoding (decodeUtf8)
+import Data.Aeson (encode)
import Text.Blaze.Html
import Text.Blaze.Html5
-import Text.Blaze.Html5.Attributes
import qualified Text.Blaze.Html5 as H
+import Text.Blaze.Html5.Attributes
+import qualified Text.Blaze.Html5.Attributes as A
import Text.Blaze.Html.Renderer.Text (renderHtml)
import Design.Global (globalDesign)
+import Model.Message (getTranslations)
+
page :: Text
page =
renderHtml . docTypeHtml $ do
@@ -21,9 +26,10 @@ page =
meta ! charset "UTF-8"
H.title "Shared Cost"
script ! src "javascripts/client.js" $ ""
+ script ! A.id "messages" ! type_ "application/json" $ toHtml . decodeUtf8 . encode $ getTranslations
link ! rel "stylesheet" ! type_ "text/css" ! href "css/reset.css"
link ! rel "stylesheet" ! href "css/font-awesome/css/font-awesome.min.css"
link ! rel "icon" ! type_ "image/png" ! href "images/icon.png"
H.style $ toHtml globalDesign
- body $
+ body $ do
script ! src "javascripts/elmLauncher.js" $ ""