From bd47122afb7d3da60ff61f6ca74994a133cc7a0c Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 22 Aug 2019 18:58:11 +0100 Subject: chore(blog): Minor changes to integrate DNS based backend --- services/tazblog/src/Blog.hs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'services/tazblog/src/Blog.hs') diff --git a/services/tazblog/src/Blog.hs b/services/tazblog/src/Blog.hs index b5d83a57699a..d02836a3f3ac 100644 --- a/services/tazblog/src/Blog.hs +++ b/services/tazblog/src/Blog.hs @@ -12,7 +12,6 @@ module Blog where import BlogStore -import Data.Maybe (fromJust) import Data.Text (Text, empty, pack) import Data.Text.Lazy (fromStrict) import Data.Time @@ -26,12 +25,9 @@ import qualified Data.Text as T replace :: Eq a => a -> a -> [a] -> [a] replace x y = map (\z -> if z == x then y else z) -show' :: Show a => a -> Text -show' = pack . show - --- |After this time all entries are Markdown -markdownCutoff :: UTCTime -markdownCutoff = fromJust $ parseTimeM False defaultTimeLocale "%s" "1367149834" +-- |After this date all entries are Markdown +markdownCutoff :: Day +markdownCutoff = fromGregorian 2013 04 28 -- blog HTML blogTemplate :: BlogLang -> Text -> Html -> Html @@ -99,7 +95,7 @@ $maybe links <- pageLinks where linkElems Entry{..} = concat $ ["/", show lang, "/", show entryId] -showLinks :: Maybe Integer -> BlogLang -> Html +showLinks :: Maybe Int -> BlogLang -> Html showLinks (Just i) lang = [shamlet| $if ((>) i 1)
-- cgit 1.4.1