Skip to content

Instantly share code, notes, and snippets.

@alogic0
Forked from ali-abrar/bootstrap.hs
Last active September 27, 2016 00:57
Show Gist options
  • Save alogic0/2b3bb84d5a393f18d176e0c7b2d52cb4 to your computer and use it in GitHub Desktop.
Save alogic0/2b3bb84d5a393f18d176e0c7b2d52cb4 to your computer and use it in GitHub Desktop.
Reflex.Dom and Bootstrap CSS
-- source https://gist.github.com/ali-abrar/080f8696c446c477b007
import Reflex.Dom
import Data.Monoid
main :: IO ()
main = mainWidgetWithHead headWidget bodyWidget
headWidget = do
elAttr "link" ("href" =: "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" <> "rel" =: "stylesheet" <> "type" =: "text/css") $ return ()
bodyWidget = do
divClass "container" $ divClass "jumbotron" $ do
el "h1" $ text "Hello, world!"
el "p" $ text "This was made with Reflex and Bootstrap. This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information."
el "p" $ elAttr "a" ("class" =: "btn btn-primary btn-lg" <> "href" =: "https://github.com/ryantrinkle/try-reflex" <> "role" =: "button") $ text "Learn more"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment