packages feed

panda 2008.10.19 → 2008.10.21

raw patch · 7 files changed

+29/−80 lines, 7 files

Files

Panda/Config/Global.hs view
@@ -79,7 +79,7 @@    -- custom as_l s                   = "[" ++ s ++ "]"-post_date_format         = config_for' "post_date_format" "%y-%m-%d %T"+post_date_format         = config_for' "post_date_format" "%y-%m-%d" comment_date_format      = config_for' "comment_date_format" "%y-%m-%d %T" url_date_format          = config_for' "url_date_format" "%y-%m-%d" url_date_matcher         = config_for' "url_date_matcher" "\\d{2}-\\d{2}-\\d{2}"
Panda/Controller/Application.hs view
@@ -47,18 +47,21 @@ -- main controller  pages = -  [ ("$"                  ,index             )-  , ("(\\?.+)?$"          ,index             )-  , ("rss.xml$"           ,index_feed        )-  , (blog_regex           ,blog              )-  , ("static/."           ,static            )-  , ("tag/.*/rss.xml$"    ,tag_feed          )-  , ("tag/."              ,tag               )-  , ("search"             ,search            )-  , ("comment/create"     ,comment_create    )+  [ ("$"                  ,index              )+  , ("(\\?.+)?$"          ,index              )+  , ("rss.xml$"           ,index_feed         )+  , (blog_regex           ,blog               )+  , ("static/."           ,static             )+  , ("tag/.*/rss.xml$"    ,tag_feed           )+  , ("tag/."              ,tag                )+  , ("search"             ,search             )+  , ("comment/create"     ,comment_create     )   ] .map_fst ((G.root /) >>> ("^" ++))   ++-  [ ("^" ++ G.root ++ "$"          ,index      )]+  [ ("^" ++ G.root ++ "$" ,index              )+  , ("^" ++ G.root ++ "?" ,index              )+  ]+     index = do@@ -134,7 +137,7 @@      if [checked, valid_path, exists].and     then-      inputs >>= (Comment.create >>> liftIO)+      inputs >>= (Comment.create >>> u)     else       return ()   redirect $ (post_id.Post.id_to_uri.to_utf8).urlEncode
Panda/Model/Post.hs view
@@ -24,7 +24,7 @@   deriving (Show, Eq)  instance Resource Post where-  resource_title = uid >>> id_to_resource+  resource_title = title  instance Markable Post where   markup x  = render_to_html (x.reader) (x.body)
Panda/View/Control/Post.hs view
@@ -5,6 +5,7 @@ import Prelude hiding ((.), (/), (^), id, span)  import qualified Panda.Type.State as State+import qualified Panda.Config.Global as G  -- model import qualified Panda.Model.Comment as Comment@@ -20,5 +21,5 @@ view state xs x = (x.render_data +++ CommentV.list xs +++ CommentV.create (x.uid.Comment.from_post_id) ).page state  -- list view-list state = for_current_page p >>> map render_data >>> (+++ nav p "/") >>> page state+list state = for_current_page p >>> map render_data >>> (+++ nav p G.root) >>> page state   where p = state.State.pager
changelog.markdown view
@@ -1,3 +1,10 @@+2008.10.21+-----------++### Fix++* next page link works in if mounted on a directory, e.g. /blog+ 2008.10.19 ----------- 
panda.cabal view
@@ -1,5 +1,5 @@ Name:                 panda-Version:              2008.10.19+Version:              2008.10.21 Build-type:           Simple Synopsis:             A simple static blog engine Description:          A simple static blog engine@@ -10,8 +10,8 @@ Build-Depends:        base Cabal-version:        >= 1.2 category:             Web-homepage:             http://github.com/nfjinjing/panda/-data-files:			      readme.markdown, changelog.markdown+homepage:             http://jinjing.blog.easymic.com/static/panda/readme+data-files:			  readme.markdown, changelog.markdown  library   build-depends: base, cgi, network, haskell98, old-locale, old-time, directory, filepath, containers, mps >= 2008.10.15, parsedate >= 3000.0.0, rss >= 3000.0.1, xhtml, kibro == 0.3, utf8-string >= 0.3.1, pandoc >= 0.46, MissingH, parsec >= 2
readme.markdown view
@@ -1,65 +1,3 @@ ## Panda: a simple blog engine in Haskell -### Features--#### simple file structure--    db-    |---- blog-    |     |---- 08-09-01 first post-    |     |---- 09-09-02 learn javascript.html-    |-    |---- tag-    |     |---- programming-    |     |---- funny-    |-    |---- static-          |---- About--#### simple config file--    blog_title    = C大调-    blog_subtitle = 野猫不吃薯片-    host_name     = jinjing.easymic.com-    author_email  = nfjinjing@gmail.com--    navigation    = About-    per_page      = 7-    sidebar       = Blogroll.md-    favicon       = panda_icon.png---#### clear separation of code and data--theme structure through, for example, `db/config/theme/blueprint.txt`:--    container  = container-    header     = column span-12 first-    navigation = column span-12 first large-    main       = column span-9 first-    sidebar    = column span-3 last-    footer     = footer-    -    css        = screen, blueprint-wp, custom-    js         = jquery-1.2.6.min, custom--theme styling inside, for example, `db/public/theme/blueprint`, where all theme specific resources, e.g. `css/js/images`, are hosted.--#### standard web technology--extend/customize with pure css and javascript ( note the custom part in css and js from the last section )--#### hacker friendly--* posts are in plain text-* SCM for publishing / data managing ( not really a feature, but a design goal from the beginning )-* blindly follow the KISS principle from code to UI: be a simple blog, no more no less--### Try--Follow the [install guide](/static/panda/install)--### Links--* [Kibro](http://chrisdone.com/tag/Kibro)-* [Panda on Jinjing's blog](http://jinjing.blog.easymic.com/tag/Panda)+[Panda homepage](http://jinjing.blog.easymic.com/static/panda/readme)