mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-25 10:21:55 +01:00
Add back old homepage
This commit is contained in:
parent
046d3b6094
commit
66bd8eb752
@ -13,8 +13,8 @@ import Yesod.GitRepo (grContent)
|
|||||||
-- The majority of the code you will write in Yesod lives in these handler
|
-- 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
|
-- functions. You can spread them across multiple files if you are so
|
||||||
-- inclined, or create a single monolithic file.
|
-- inclined, or create a single monolithic file.
|
||||||
getHomeR :: Handler Html
|
getHomeR' :: Handler Html
|
||||||
getHomeR = contentHelper "Stackage Server" wcHomepage
|
getHomeR' = contentHelper "Stackage Server" wcHomepage
|
||||||
|
|
||||||
getAuthorsR :: Handler Html
|
getAuthorsR :: Handler Html
|
||||||
getAuthorsR = contentHelper "Library Authors" wcAuthors
|
getAuthorsR = contentHelper "Library Authors" wcAuthors
|
||||||
@ -24,8 +24,6 @@ getInstallR = contentHelper "Haskell Installation Instructions" wcInstall
|
|||||||
|
|
||||||
contentHelper :: Html -> (WebsiteContent -> Html) -> Handler Html
|
contentHelper :: Html -> (WebsiteContent -> Html) -> Handler Html
|
||||||
contentHelper title accessor = do
|
contentHelper title accessor = do
|
||||||
windowsLatest <- linkFor "unstable-ghc78hp-inclusive"
|
|
||||||
restLatest <- linkFor "unstable-ghc78-inclusive"
|
|
||||||
homepage <- getYesod >>= fmap accessor . liftIO . grContent . websiteContent
|
homepage <- getYesod >>= fmap accessor . liftIO . grContent . websiteContent
|
||||||
defaultLayout $ do
|
defaultLayout $ do
|
||||||
setTitle title
|
setTitle title
|
||||||
@ -34,7 +32,19 @@ contentHelper title accessor = do
|
|||||||
, css_bootstrap_responsive_modified_css
|
, css_bootstrap_responsive_modified_css
|
||||||
])
|
])
|
||||||
toWidget homepage
|
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
|
where
|
||||||
linkFor name =
|
linkFor name =
|
||||||
do slug <- mkSlug name
|
do slug <- mkSlug name
|
||||||
|
|||||||
@ -17,11 +17,11 @@
|
|||||||
<ul .operating-systems>
|
<ul .operating-systems>
|
||||||
$maybe win <- windowsLatest
|
$maybe win <- windowsLatest
|
||||||
<li>
|
<li>
|
||||||
<a href=@{StackageHomeR win}>
|
<a href=@{SnapshotR win StackageHomeR}>
|
||||||
Windows & OS X (Haskell Platform-based snapshot)
|
Windows & OS X (Haskell Platform-based snapshot)
|
||||||
$maybe rest <- restLatest
|
$maybe rest <- restLatest
|
||||||
<li>
|
<li>
|
||||||
<a href=@{StackageHomeR rest}>
|
<a href=@{SnapshotR rest StackageHomeR}>
|
||||||
Linux & non-Haskell Platform users
|
Linux & non-Haskell Platform users
|
||||||
|
|
||||||
<h2 .how-stackage-works>How Stackage Works
|
<h2 .how-stackage-works>How Stackage Works
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user