on master help sign in
Introduce CSS file to skeleton project
27a66a0rashadg1030
skeleton/frontend/src/Frontend.hs+9−3
@@ -1,24 +1,30 @@
1{-# LANGUAGE DataKinds #-}
1{-# LANGUAGE DataKinds #-}
2{-# LANGUAGE OverloadedStrings #-}
2{-# LANGUAGE OverloadedStrings #-}
3{-# LANGUAGE TypeApplications #-}
3{-# LANGUAGE TypeApplications #-}
4+
4module Frontend where
5module Frontend where
5
6
6import qualified Data.Text as T
7import qualified Data.Text as T
7import qualified Data.Text.Encoding as T
8import qualified Data.Text.Encoding as T
9+
8import Obelisk.Frontend
10import Obelisk.Frontend
9import Obelisk.Configs
11import Obelisk.Configs
10import Obelisk.Route
12import Obelisk.Route
13+import Obelisk.Generated.Static
14+
11import Reflex.Dom.Core
15import Reflex.Dom.Core
12
16
13import Common.Api
17import Common.Api
14import Common.Route
18import Common.Route
15−import Obelisk.Generated.Static
19+
16
20
17frontend :: Frontend (R FrontendRoute)
21frontend :: Frontend (R FrontendRoute)
18frontend = Frontend
22frontend = Frontend
23+ { _frontend_head = do
19− { _frontend_head = el "title" $ text "Obelisk Minimal Example"
24+ el "title" $ text "Obelisk Minimal Example"
25+ elAttr "link" ("href" =: (static @ "main.css") <> "type" =: "text/css" <> "rel" =: "stylesheet") blank
20 , _frontend_body = do
26 , _frontend_body = do
21− text "Welcome to Obelisk!"
27+ el "h1" $ text "Welcome to Obelisk!"
22 el "p" $ text $ T.pack commonStuff
28 el "p" $ text $ T.pack commonStuff
23 elAttr "img" ("src" =: static @"obelisk.jpg") blank
29 elAttr "img" ("src" =: static @"obelisk.jpg") blank
24 el "div" $ do
30 el "div" $ do
skeleton/static/main.cssnew file+3
@@ -0,0 +1,3 @@
1+p {
2+ color: #4f4f4f;
3+}