matebeamter/src/View/Scaffold.hs
2019-09-08 17:27:38 +02:00

27 lines
580 B
Haskell

{-# LANGUAGE OverloadedStrings #-}
module View.Scaffold where
import qualified Text.Blaze.Html5 as H
import qualified Text.Blaze.Html5.Attributes as H
import qualified Data.Text as T
import Data.Text.I18n
-- internal imports
import Types.Page
scaffold
:: L10n
-> Locale
-> Page H.Html (I18n T.Text)
-> H.Html
-> H.Html
scaffold l10n locale page content = template page l10n locale $ do
H.header $ H.nav $ H.ul $ do
H.li $ H.a H.! H.href "/" $ H.toHtml $ localize l10n locale $ gettext "Home"
H.hr
H.div H.! H.id "main" H.! H.role "main" $ do
content