From e086b058f690780b632731b79ad8dae387505e1e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 31 Oct 2020 19:56:36 +0800 Subject: [PATCH] put latest nightly and lts in News: drop rows and Recent Snapshots --- src/Handler/Home.hs | 12 ++++++------ templates/default-layout.hamlet | 2 +- templates/home.hamlet | 32 ++++++++++++++------------------ 3 files changed, 21 insertions(+), 25 deletions(-) diff --git a/src/Handler/Home.hs b/src/Handler/Home.hs index 4abe9e9..5369d43 100644 --- a/src/Handler/Home.hs +++ b/src/Handler/Home.hs @@ -30,9 +30,12 @@ getHomeR :: Handler Html getHomeR = track "Handler.Snapshots.getAllSnapshotsR" $ do cacheSeconds $ 60 * 60 now' <- getCurrentTime - (map entityVal -> snapshots) <- - getSnapshots Nothing snapshotsPerPage 0 - let groups = groupUp now' snapshots + (map entityVal -> nightly) <- + getSnapshots (Just NightlyBranch) 1 0 + let latestNightly = groupUp now' nightly + (map entityVal -> lts) <- + getSnapshots (Just LtsBranch) 1 0 + let latestLts = groupUp now' lts latestLtsNameWithHoogle <- getLatestLtsNameWithHoogle latestLtsByGhc <- getLatestLtsByGhc @@ -49,9 +52,6 @@ getHomeR = track "Handler.Snapshots.getAllSnapshotsR" $ do groupUp now' = groupBy (on (==) (\(_,_,uploaded) -> uploaded)) . map (uncrapify now') -snapshotsPerPage :: Int -snapshotsPerPage = 8 - getAuthorsR :: Handler Html getAuthorsR = contentHelper "Library Authors" wcAuthors diff --git a/templates/default-layout.hamlet b/templates/default-layout.hamlet index 47ce8f7..8a71bcc 100644 --- a/templates/default-layout.hamlet +++ b/templates/default-layout.hamlet @@ -10,7 +10,7 @@
  • Nightly
  • Snapshots
  • FAQ -
  • News +
  • Blog $maybe msg <- mmsg
    diff --git a/templates/home.hamlet b/templates/home.hamlet index b5b66f6..a5b581f 100644 --- a/templates/home.hamlet +++ b/templates/home.hamlet @@ -1,5 +1,5 @@
    -
    +
    @@ -12,7 +12,7 @@