Browse Source

cats with title

elm
parent
commit
97ad7d7f2e
  1. 1
      Application.hs
  2. 9
      Handler/Cats.hs
  3. 1
      config/routes
  4. 1
      soggoth.cabal
  5. 13
      templates/cats.hamlet

1
Application.hs

@ -27,6 +27,7 @@ import Yesod.Core.Types (loggerSet, Logger (Logger))
-- Import all relevant handler modules here.
-- Don't forget to add new modules to your cabal file!
import Handler.Home
import Handler.Cats
-- This line actually creates our YesodDispatch instance. It is the second half
-- of the call to mkYesodData which occurs in Foundation.hs. Please see the

9
Handler/Cats.hs

@ -0,0 +1,9 @@
module Handler.Cats where
import Import
getCatsR :: Handler Html
getCatsR = do
defaultLayout $ do
setTitle "Some Cats"
$(widgetFile "cats")

1
config/routes

@ -5,3 +5,4 @@
/robots.txt RobotsR GET
/ HomeR GET POST
/cats CatsR GET

1
soggoth.cabal

@ -20,6 +20,7 @@ library
Settings.StaticFiles
Settings.Development
Handler.Home
Handler.Cats
if flag(dev) || flag(library-only)
cpp-options: -DDEVELOPMENT

13
templates/cats.hamlet

@ -0,0 +1,13 @@
<div .hero-unit>
<h1>Some Cats
<div .container>
<div .row>
<div .span4>
<h2>Persian
<p>The Persian cat
<div .span4>
<h2>Savannah
<p>The Savannah cat
<div .span4>
<h2>Siamese
<p>The Siamese cat
Loading…
Cancel
Save