time-wasting-thread-memorial/web/src/Within/DBMemorial/Views/Example.hs

20 lines
456 B
Haskell

{-# LANGUAGE OverloadedStrings #-}
module Within.DBMemorial.Views.Example where
import Control.Monad (forM_)
import Text.Blaze.Html
import Text.Blaze.Html5 as H
import Text.Blaze.Html5.Attributes as A
numbers :: Int -> Html
numbers n = docTypeHtml $ do
H.head $ do
H.title "Natural numbers"
body $ do
p "A list of natural numbers:"
ul $ forM_ [1 .. n] (li . toHtml)
simpleImage :: Html
simpleImage = img ! src "foo.png"