Fix inconsistent case choice for function otherUrl -> otherURL

This commit is contained in:
Tissevert 2020-04-14 11:28:54 +02:00
parent 4e402174b1
commit 3c19a2c568
2 changed files with 5 additions and 9 deletions

View File

@ -4,7 +4,7 @@
module ArticlesList ( module ArticlesList (
ArticlesList(..) ArticlesList(..)
, description , description
, otherUrl , otherURL
, title , title
) where ) where
@ -22,8 +22,8 @@ data ArticlesList = ArticlesList {
, featured :: [Article] , featured :: [Article]
} }
otherUrl :: ArticlesList -> String otherURL :: ArticlesList -> String
otherUrl (ArticlesList {full, tagged}) = absoluteLink $ otherURL (ArticlesList {full, tagged}) = absoluteLink $
(if full then id else (</> "all.html")) $ maybe "" id tagged (if full then id else (</> "all.html")) $ maybe "" id tagged
title :: MonadReader Blog m => ArticlesList -> m String title :: MonadReader Blog m => ArticlesList -> m String
@ -39,7 +39,3 @@ description (ArticlesList {full, tagged}) =
getDescription (False, Nothing) = render "latestPage" [] getDescription (False, Nothing) = render "latestPage" []
getDescription (False, Just tag) = getDescription (False, Just tag) =
render "latestTaggedPage" [("tag", pack tag)] render "latestTaggedPage" [("tag", pack tag)]

View File

@ -6,7 +6,7 @@ module DOM (
import Article (Article(..)) import Article (Article(..))
import qualified Article (preview) import qualified Article (preview)
import ArticlesList (ArticlesList(..), otherUrl, description) import ArticlesList (ArticlesList(..), otherURL, description)
import Blog (Blog(..), Path(..), Skin(..), URL(..)) import Blog (Blog(..), Path(..), Skin(..), URL(..))
import qualified Blog (get) import qualified Blog (get)
import Blog.Wording (render) import Blog.Wording (render)
@ -37,7 +37,7 @@ instance Page ArticlesList where
content al@(ArticlesList {featured, full}) = do content al@(ArticlesList {featured, full}) = do
preview <- Article.preview <$> (Blog.get $skin.$previewLinesCount) preview <- Article.preview <$> (Blog.get $skin.$previewLinesCount)
h2_ . toHtml =<< description al h2_ . toHtml =<< description al
a_ [href_ . pack $ otherUrl al] . toHtml =<< otherLink a_ [href_ . pack $ otherURL al] . toHtml =<< otherLink
div_ [class_ "articles"] ( div_ [class_ "articles"] (
mapM_ (article False . preview) featured mapM_ (article False . preview) featured
) )