bamboo-theme-blueprint-2009.6.8: src/Bamboo/Theme/Blueprint/Widget/Helper.hs
{-# LANGUAGE NoImplicitPrelude #-}
module Bamboo.Theme.Blueprint.Widget.Helper where
import Bamboo.Theme.Blueprint.Env hiding (link)
import qualified Bamboo.Model.Tag as Tag
import qualified Bamboo.Type as C
import qualified Bamboo.Type.State as State
rss_url_link_pair :: State.State -> (String, HotLink)
rss_url_link_pair s =
if tagged
then link ( s.config.tag_id / tag_name) tag_name
else link "" home_nav
where
tag_name = Tag.get_name uid
uid = State.uid s
tagged = uid.match "^tag/.+" .isJust
url r = s.config.root / r / "rss.xml"
link r x = (url r, hotlink (url r) ! [ theclass "feedlink" ] << x)