From 3c19a2c56858db34ed00b4a231b3fe21db976a00 Mon Sep 17 00:00:00 2001 From: Tissevert Date: Tue, 14 Apr 2020 11:28:54 +0200 Subject: [PATCH] Fix inconsistent case choice for function otherUrl -> otherURL --- src/ArticlesList.hs | 10 +++------- src/DOM.hs | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/ArticlesList.hs b/src/ArticlesList.hs index 4f5f564..c3ed38a 100644 --- a/src/ArticlesList.hs +++ b/src/ArticlesList.hs @@ -4,7 +4,7 @@ module ArticlesList ( ArticlesList(..) , description - , otherUrl + , otherURL , title ) where @@ -22,8 +22,8 @@ data ArticlesList = ArticlesList { , featured :: [Article] } -otherUrl :: ArticlesList -> String -otherUrl (ArticlesList {full, tagged}) = absoluteLink $ +otherURL :: ArticlesList -> String +otherURL (ArticlesList {full, tagged}) = absoluteLink $ (if full then id else ( "all.html")) $ maybe "" id tagged title :: MonadReader Blog m => ArticlesList -> m String @@ -39,7 +39,3 @@ description (ArticlesList {full, tagged}) = getDescription (False, Nothing) = render "latestPage" [] getDescription (False, Just tag) = render "latestTaggedPage" [("tag", pack tag)] - - - - diff --git a/src/DOM.hs b/src/DOM.hs index 00c976c..bd6673b 100644 --- a/src/DOM.hs +++ b/src/DOM.hs @@ -6,7 +6,7 @@ module DOM ( import Article (Article(..)) import qualified Article (preview) -import ArticlesList (ArticlesList(..), otherUrl, description) +import ArticlesList (ArticlesList(..), otherURL, description) import Blog (Blog(..), Path(..), Skin(..), URL(..)) import qualified Blog (get) import Blog.Wording (render) @@ -37,7 +37,7 @@ instance Page ArticlesList where content al@(ArticlesList {featured, full}) = do preview <- Article.preview <$> (Blog.get $skin.$previewLinesCount) h2_ . toHtml =<< description al - a_ [href_ . pack $ otherUrl al] . toHtml =<< otherLink + a_ [href_ . pack $ otherURL al] . toHtml =<< otherLink div_ [class_ "articles"] ( mapM_ (article False . preview) featured )