Webanwendung mit FastCGI und Haskell
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 line
492B

  1. {-# LANGUAGE OverloadedStrings #-}
  2. module App.Startpage (
  3. Startpage(..)
  4. ) where
  5. import Text.XHtml
  6. import Control.Monad.State (gets)
  7. import Request
  8. import Template
  9. import Network.FastCGI
  10. import AppMonad (numVisited)
  11. data Startpage = Startpage
  12. instance RequestHandler Startpage where
  13. handle handler = do
  14. n <- gets numVisited
  15. result <- render "startpage" [("pagetitle", "Startseite"),
  16. ("visited", show n)]
  17. output result