about summary refs log tree commit diff
path: root/services/tazblog/src/Blog.hs
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-08-22T17·58+0100
committerVincent Ambo <tazjin@google.com>2019-08-22T17·58+0100
commitbd47122afb7d3da60ff61f6ca74994a133cc7a0c (patch)
tree2ffc76c71d79da5511521793faa193bcd4fd2168 /services/tazblog/src/Blog.hs
parentc5ef3e01b27b220d6b8c2b16584e752c69966e3d (diff)
chore(blog): Minor changes to integrate DNS based backend r/51
Diffstat (limited to 'services/tazblog/src/Blog.hs')
-rw-r--r--services/tazblog/src/Blog.hs12
1 files changed, 4 insertions, 8 deletions
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)
     <div .navigation>