In this recipe, we will use Blaze HTML to create bootstrap based HTML. In this recipe, we will create a Navbar (which is actually one of the examples at http://getbootstrap.com).
Use blaze-html with Bootstrap to create HTML template
How to do it...Â
- Create a new folder blaze-html. We will not be creating a separate project. Instead, create a new file called index.hs file. Open the file and enable the extension OverloadedStrings for being able to use a generic string syntax for supporting text as well as ByteString:
{-# LANGUAGE OverloadedStrings #-}
- Add the necessary imports:
import Prelude import qualified Prelude as P import Data.Monoid (mempty,(<>)) import Text.Blaze.Html5 hiding (main) import...