smaller display size

This commit is contained in:
nek0 2016-07-16 15:51:15 +02:00
parent 7509099d14
commit a2d30af5a3

View file

@ -26,7 +26,7 @@ import Yesod.AtomFeed
getHomeR :: Handler Html getHomeR :: Handler Html
getHomeR = do getHomeR = do
recentMedia <- runDB $ selectList [] [Desc MediumTime, LimitTo 30] recentMedia <- runDB $ selectList [] [Desc MediumTime, LimitTo 15]
nextMediaQuery <- runDB $ selectList [] [Desc MediumTime, LimitTo 1, OffsetBy 30] nextMediaQuery <- runDB $ selectList [] [Desc MediumTime, LimitTo 1, OffsetBy 30]
let nextMedia = not $ L.null nextMediaQuery let nextMedia = not $ L.null nextMediaQuery
defaultLayout $ do defaultLayout $ do
@ -37,8 +37,8 @@ getHomeR = do
getPageR :: Int -> Handler Html getPageR :: Int -> Handler Html
getPageR page = do getPageR page = do
pageMedia <- runDB $ selectList [] [Desc MediumTime, LimitTo 30, OffsetBy (page*30)] pageMedia <- runDB $ selectList [] [Desc MediumTime, LimitTo 15, OffsetBy (page*15)]
nextMediaQuery <- runDB $ selectList [] [Desc MediumTime, LimitTo 1, OffsetBy ((page + 1) * 30)] nextMediaQuery <- runDB $ selectList [] [Desc MediumTime, LimitTo 1, OffsetBy ((page + 1) * 15)]
let nextMedia = not $ L.null nextMediaQuery let nextMedia = not $ L.null nextMediaQuery
defaultLayout $ do defaultLayout $ do
rssLink RootFeedRssR "Root Feed" rssLink RootFeedRssR "Root Feed"