{-# LANGUAGE NoImplicitPrelude #-}
module Bamboo.Theme.MiniHTML5.Control.Post where

import Bamboo.Type.State hiding (uid)
import Bamboo.Theme.MiniHTML5.Atom.Post
import Bamboo.Theme.MiniHTML5.Widget.Helper
import Bamboo.Theme.MiniHTML5.Env hiding (p, nav)
import Bamboo.Theme.MiniHTML5.Widget.Template

-- import qualified Bamboo.Type as C
-- import qualified Bamboo.Model.Comment as Comment
-- import qualified Bamboo.Theme.MiniHTML5.Control.Comment as CommentV

-- entry view
view :: R
view s = page s - do
  let x = s.posts.first

  x.entry' s Summary
  
  disqus_thread

  {-
  when (has_extension Comment) -
    CommentV.list - s.comments
    CommentV.create s (x.uid.Comment.from_post_id)
  -}

-- list view
list :: R
list s = page s - do
  s.posts.mapM_ (entry s)
  nav (s.pager) - s.env.slashed_script_name
