From 66bd8eb752cfa5dc26162604561a7074780b2c2c Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 14 Dec 2014 08:10:15 +0200 Subject: [PATCH] Add back old homepage --- Handler/Home.hs | 20 +++++++++++++++----- templates/homepage.hamlet | 4 ++-- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Handler/Home.hs b/Handler/Home.hs index c294f7f..469f4e2 100644 --- a/Handler/Home.hs +++ b/Handler/Home.hs @@ -13,8 +13,8 @@ import Yesod.GitRepo (grContent) -- The majority of the code you will write in Yesod lives in these handler -- functions. You can spread them across multiple files if you are so -- inclined, or create a single monolithic file. -getHomeR :: Handler Html -getHomeR = contentHelper "Stackage Server" wcHomepage +getHomeR' :: Handler Html +getHomeR' = contentHelper "Stackage Server" wcHomepage getAuthorsR :: Handler Html getAuthorsR = contentHelper "Library Authors" wcAuthors @@ -24,8 +24,6 @@ getInstallR = contentHelper "Haskell Installation Instructions" wcInstall contentHelper :: Html -> (WebsiteContent -> Html) -> Handler Html contentHelper title accessor = do - windowsLatest <- linkFor "unstable-ghc78hp-inclusive" - restLatest <- linkFor "unstable-ghc78-inclusive" homepage <- getYesod >>= fmap accessor . liftIO . grContent . websiteContent defaultLayout $ do setTitle title @@ -34,7 +32,19 @@ contentHelper title accessor = do , css_bootstrap_responsive_modified_css ]) toWidget homepage - -- $(widgetFile "homepage") + +-- FIXME remove this and switch to above getHomeR' when new homepage is ready +getHomeR :: Handler Html +getHomeR = do + windowsLatest <- linkFor "unstable-ghc78hp-inclusive" + restLatest <- linkFor "unstable-ghc78-inclusive" + defaultLayout $ do + setTitle "Stackage Server" + $(combineStylesheets 'StaticR + [ css_bootstrap_modified_css + , css_bootstrap_responsive_modified_css + ]) + $(widgetFile "homepage") where linkFor name = do slug <- mkSlug name diff --git a/templates/homepage.hamlet b/templates/homepage.hamlet index 873f0d3..645dae4 100644 --- a/templates/homepage.hamlet +++ b/templates/homepage.hamlet @@ -17,11 +17,11 @@