packages feed

bamboo-theme-blueprint 2009.6.8 → 2009.6.9

raw patch · 19 files changed

+54/−41 lines, 19 filesdep ~bamboodep ~hack-contrib

Dependency ranges changed: bamboo, hack-contrib

Files

bamboo-theme-blueprint.cabal view
@@ -1,5 +1,5 @@ Name:                 bamboo-theme-blueprint-Version:              2009.6.8+Version:              2009.6.9 Build-type:           Simple Synopsis:             bamboo blueprint theme Description:          bamboo blueprint theme@@ -22,8 +22,8 @@     , xhtml, utf8-string >= 0.3.3, parsec >= 2, gravatar >= 0.3     , data-default >= 0.2     , mps >= 2009.5.13, hcheat >= 2009.5.13-    , hack >= 2009.5.19, hack-contrib >= 2009.5.19-    , bamboo >= 2009.6.8+    , hack >= 2009.5.19, hack-contrib >= 2009.6.9+    , bamboo >= 2009.6.9   hs-source-dirs: src/   exposed-modules:                       Bamboo.Theme.Blueprint
changelog.md view
@@ -1,3 +1,10 @@+2009.6.9+--------++### Feature++* respect script_name+ 2009.6.8 -------- 
src/Bamboo/Theme/Blueprint/Atom/Comment.hs view
@@ -30,7 +30,7 @@ create :: State -> Comment -> Html create s x = toHtml   [ h2 ! [id "respond"] << "Leave a Response"-  , gui (s.config.root / "comment/create") ! [id "commentform"] <<+  , gui (s.env.slashed_script_name / "comment/create") ! [id "commentform"] <<       [ field Author n22 n1 "Name (required)"       , field AuthorEmail n22 n2 "Email (hidden)"       , field AuthorLink n22 n3 "Website"
src/Bamboo/Theme/Blueprint/Atom/Post.hs view
@@ -11,29 +11,33 @@ entry' :: State -> RenderStyle -> Post -> Html entry' s style x = div_class "post" << [entry_title, entry_mark, entry_body]    where-    entry_title = x.title_link+    entry_title = title_link     entry_body  = div_class "entry" << show_content style     entry_mark  = p ! [theclass "small"] -      << [ post_date, post_tags, post_comments ].map (send_to x)+      << [ post_date, post_tags, post_comments ]      show_content Summary = x.markup_summary     show_content Full    = x.markup  -    title_link y = h2 << hotlink (y.uri) << y.title-    post_date y  = toHtml $ y.date.format_time "%b %e, %Y"--    post_tags y | y.tags.null = empty_html-    post_tags y = -      " | " -      +++ "Published in " -      +++ y.tags.map (Tag.tag_link s) .intersperse (", ".toHtml)+    title_link = h2 << hotlink (s.env.slashed_script_name / x.uri) << x.title+    post_date = toHtml $ x.date.format_time "%b %e, %Y" -    post_comments y | y.comment_size.is 0 = empty_html-    post_comments y = -      " | " -      +++ hotlink ( y.uri / "#comments") -        << (y.comment_size.show ++ " Comments")+    post_tags = +      if x.tags.null+        then empty_html+        else+          " | " +          +++ "Published in " +          +++ x.tags.map (Tag.tag_link s) .intersperse (", ".toHtml)+  +    post_comments =+      if x.comment_size.is 0 +        then empty_html+        else+          " | " +          +++ hotlink ( x.uri / "#comments") +            << (x.comment_size.show ++ " Comments")      entry :: State -> Post -> Html entry s = render_summary s (s.config.summary_for_root)
src/Bamboo/Theme/Blueprint/Atom/Tag.hs view
@@ -4,5 +4,5 @@ import Bamboo.Theme.Blueprint.Env hiding (name)  tag_link :: State -> String -> Html-tag_link s x = toHtml $ hotlink (s.config.root / s.config.tag_id / x ) << x+tag_link s x = toHtml $ hotlink (s.env.slashed_script_name / s.config.tag_id / x ) << x 
src/Bamboo/Theme/Blueprint/Control/Comment.hs view
@@ -9,7 +9,8 @@ list [] = [] list xs =    [ h2 ! [id "comments"] << "Responses"-  , olist ! [theclass "commentlist" ] << xs.zip (cycle ["comments-alt", ""]).map (splash styled_entry)+  , olist ! [theclass "commentlist" ] +    << xs.zip (cycle ["comments-alt", ""]).map (splash styled_entry)   ]   where     styled_entry alt x = li ! [theclass alt] << x.CommentVA.entry
src/Bamboo/Theme/Blueprint/Control/Helper.hs view
@@ -17,10 +17,10 @@           << previous_sign       else space_html       -      where r' = if isSuffixOf "&" r then r else r ++ "?"+      where r' = if "&" `isSuffixOf` r then r else r ++ "?"          nav_next =        if p.has_next       then toHtml $ hotlink ( r' ++ "page=" ++ p.next.show ) << next_sign       else space_html-      where r' = if isSuffixOf "&" r then r else r ++ "?"+      where r' = if "&" `isSuffixOf` r then r else r ++ "?"
src/Bamboo/Theme/Blueprint/Control/Post.hs view
@@ -26,7 +26,7 @@  -- list view list :: Widget-list s = s.posts.(map render > (+++ nav p (s.config.root)) > page s)+list s = s.posts.(map render > (+++ nav p (s.env.slashed_script_name)) > page s)   where      p = s.pager     render = entry s
src/Bamboo/Theme/Blueprint/Control/Search.hs view
@@ -15,4 +15,4 @@     .(+++ nav (s.pager) nav_url)     .page s   where-    nav_url = (s.config.root / "search") ++ "?s=" ++ (s.search_key) ++ "&"+    nav_url = (s.env.slashed_script_name / "search") ++ "?s=" ++ (s.search_key) ++ "&"
src/Bamboo/Theme/Blueprint/Control/Tag.hs view
@@ -2,7 +2,7 @@  module Bamboo.Theme.Blueprint.Control.Tag where   -import Bamboo.Type (root, summary_for_tag)+import Bamboo.Type (summary_for_tag) import Bamboo.Type.State import Bamboo.Theme.Blueprint.Atom.Post import Bamboo.Theme.Blueprint.Control.Helper@@ -13,7 +13,7 @@   view :: Widget-view s = s.posts.(map render > (+++ nav p ( s.config.root / tag_id)) > page s) +view s = s.posts.(map render > (+++ nav p ( s.env.slashed_script_name / tag_id)) > page s)    where     p = s.pager     tag_id = s.uid
src/Bamboo/Theme/Blueprint/Env.hs view
@@ -8,7 +8,7 @@ ) where  import Bamboo.Env hiding (navigation, sidebar, footer, toHtml, Html)-import Bamboo.Type.State (config, nav_location, State)+import Bamboo.Type.State (config, nav_location, State, env) import Bamboo.Theme.Blueprint.Helper import Bamboo.Theme.Blueprint.Type import Text.XHtml.Strict hiding (title, select, sub)
src/Bamboo/Theme/Blueprint/Helper.hs view
@@ -115,4 +115,3 @@  link :: String -> Html -> HotLink link = hotlink-
src/Bamboo/Theme/Blueprint/Widget/Head.hs view
@@ -10,20 +10,22 @@  html_head :: Widget html_head s = header << (-  [ meta_tag, title_tag+  [ meta_tag+  , title_tag   , favicon_tag   , rss_tag   ] -  ++ s.config.theme_config.css.map css_link-  ++ s.config.theme_config.js.map js_link+  ++ s.config.theme_config.css.map (root > css_link)+  ++ s.config.theme_config.js.map (root > js_link)   )-     where+    root = (s.env.slashed_script_name / )     title_tag = thetitle <<        [s.config.blog_title ++ s.S.resource_title.format_title]      rss_tag = rss_link $ rss_url_link_pair s .fst-    favicon_tag = favicon_link $ s.config.favicon+    favicon_tag = favicon_link $ root (s.config.favicon)      format_title [] = ""     format_title x = " / " ++ x+    
src/Bamboo/Theme/Blueprint/Widget/Header.hs view
@@ -13,7 +13,7 @@  site_name :: Widget site_name s = toHtml $-  [ toHtml $ hotlink (s.config.root) ! [theclass "logo"] << ""+  [ toHtml $ hotlink (s.env.slashed_script_name) ! [theclass "logo"] << ""   , h1 << s.config.blog_title   , div_class "description" << s.config.blog_subtitle   ]
src/Bamboo/Theme/Blueprint/Widget/Helper.hs view
@@ -16,5 +16,5 @@     tag_name = Tag.get_name uid     uid      = State.uid s     tagged   = uid.match "^tag/.+" .isJust-    url r    = s.config.root / r / "rss.xml"+    url r    = s.env.slashed_script_name / r / "rss.xml"     link r x = (url r, hotlink (url r) ! [ theclass "feedlink" ] << x)
src/Bamboo/Theme/Blueprint/Widget/Navigation.hs view
@@ -21,7 +21,7 @@         current     = if x == nav then " current_page_item" else ""         link        = if x == home_nav then home_link else static_link -        home_link   = hotlink (s.config.root) << home_nav-        static_link = hotlink (s.config.root / "static" / x) +        home_link   = hotlink (s.env.slashed_script_name) << home_nav+        static_link = hotlink (s.env.slashed_script_name / "static" / x)            << x.drop_known_extension 
src/Bamboo/Theme/Blueprint/Widget/RSS.hs view
@@ -41,7 +41,7 @@   .to_rss.rssToXML.showXML   where     full_uri x  = def { uriScheme = "http://", uriPath = host_link x }-    host_link x = s.config.host_name ++ (s.config.root / x)+    host_link x = s.config.host_name ++ (s.env.slashed_script_name / x)     link        = full_uri (categary / title)     items       = s.posts.map item_rss_template     title = 
src/Bamboo/Theme/Blueprint/Widget/SearchBar.hs view
@@ -7,6 +7,6 @@ search_bar :: Widget search_bar s = html_only_for Search $        div_id "search" -  <<  form ! [action (s.config.root / "search"), method "get"]+  <<  form ! [action (s.env.slashed_script_name / "search"), method "get"]   <<  thediv   <<  textfield "s"
src/Bamboo/Theme/Blueprint/Widget/Sidebar.hs view
@@ -39,5 +39,5 @@       , unordList $ tags.Tag.sorted.map tag_link]        tag_link x = -      ( hotlink (s.config.root / x.Tag.uid) << x.Tag.name ) +      ( hotlink (s.env.slashed_script_name / x.Tag.uid) << x.Tag.name )        +++ ( " (" ++ x.Tag.resources.Set.size.show ++ ")" )