Commits

Luke Plant committed 326644d

HTML changes

Comments (0)

Files changed (2)

src/Blog/Templates.hs

              }
 
 
+categoryLinks categories =
+    intersperse (toHtml ", ") $ map categoryLink categories
+
+metaInfoLine post categories divclass =
+    (thediv ! [theclass divclass]
+     << ("Posted in: "
+         +++
+         categoryLinks categories
+         +++
+         (toHtml " | ")
+         +++
+         (thespan ! [theclass "timestamp"]
+          << (showDate $ P.timestamp post)
+         )
+        )
+    )
+
 
 formatPost post categories =
-    (h1 << P.title post
+    (h1 ! [theclass "posttitle"] << P.title post
      +++
-     (thediv ! [theclass "timestamp"]
-      << ("Posted: "
-          ++
-          (showDate $ P.timestamp post)))
-     +++
-     (thediv ! [theclass "postcategories"]
-      << ((toHtml "Categories: ")
-          +++
-          (intersperse (toHtml ", ") $ map categoryLink categories)))
+     metaInfoLine post categories "metainfo"
      +++
      (thediv ! [theclass "post"]
       << (primHtml $ P.post_formatted post)

src/Blog/Views.hs

 
 postsRedirectView req = return $ Just $ redirectResponse indexUrl :: IO (Maybe Response)
 
--- TODO
-
 custom404 = with (standardResponse custom404page) [
              setStatus 404
             ]