packages feed

panda-0.0.0.1: Panda/View/Template.hs

module Panda.View.Template where

import Kibro

import MPS
import Prelude hiding ((.), (/), id, span)

import Panda.Config.Global as Config
import Panda.Helper.Helper



-- template entry point
page x     = html_head +++ html_body x


-- meta
html_head  = header << [meta_tag, title_tag, screen_css, ie_css]

title_tag  = thetitle << Config.blog_title
screen_css = css_link "blueprint/screen"
ie_css     = ie $ css_link "blueprint/ie"


-- builder
html_body x = body << [body_header, hr, body_content x]

container   = div_class "container"
home_link   = h6 << hotlink "/" << "Home"
about       = h6 << hotlink "/static/about" << "About"
rss_link    = hotlink "/rss.xml" << image ! [src "/image/feed.png", alt "feed link", height "18", width "18"]

body_header = container <<
  div_class "span-24 last" <<
  [ div_class "span-3" << hotlink "/" << 
      image ! [src "/image/piano.jpg", alt "logo", height "75", width "75"]
  , div_class "span-21 last" <<
    [ space
    , div_class "span-17 last" << h1 << Config.blog_title
    , div_class "span-4 last" << 
      [ space
      , space
      , div_class "span-2 " << about
      , div_class "span-2 last" << rss_link
      ]
    , space
    ]
  ]

body_content x = container << div_class "span-24 last" << x


-- no footer for now
-- body_footer = container << div_class "span-24 last" << about