panda 2008.10.11 → 2008.10.12
raw patch · 13 files changed
+44/−22 lines, 13 filesdep ~cgi
Dependency ranges changed: cgi
Files
- Panda/Controller/Application.hs +0/−1
- Panda/Helper/Helper.hs +3/−1
- Panda/Helper/MPSCandidate.hs +0/−1
- Panda/Model/Comment.hs +3/−2
- Panda/Model/Post.hs +4/−1
- Panda/Model/Static.hs +3/−2
- Panda/Type/Sidebar.hs +3/−2
- Panda/View/Control/Helper.hs +2/−2
- Panda/View/Widget/RSS.hs +3/−2
- Panda/View/Widget/Sidebar.hs +1/−1
- changelog.markdown +15/−1
- panda.cabal +4/−5
- readme.markdown +3/−1
Panda/Controller/Application.hs view
@@ -63,7 +63,6 @@ blogs <- Post.list.liftIO blogs.RSSV.rss "" "" .output - blog = do id <- uri ^ ("blog/" ++) blog <- Post.get id .liftIO
Panda/Helper/Helper.hs view
@@ -17,7 +17,6 @@ import Panda.Type.Pager as Pager hiding (empty) import MPS import Prelude hiding ((.), (/), (^), id)-import Panda.Helper.MPSCandidate import Char import Data.List import Panda.Type.Reader@@ -105,5 +104,8 @@ class Resource a where resource_title :: a -> String++class Markable a where+ markup :: a -> Html spaced_url = gsub "/" " / "
− Panda/Helper/MPSCandidate.hs
@@ -1,1 +0,0 @@-module Panda.Helper.MPSCandidate where
Panda/Model/Comment.hs view
@@ -19,6 +19,9 @@ instance Resource Comment where resource_title = uid >>> spaced_url+ +instance Markable Comment where+ markup x = render_to_html Markdown (x.body) list_for post_id = do has_comments <- doesDirectoryExist d@@ -64,5 +67,3 @@ fill_comment_size x = do size <- x.Post.uid.list_for ^ length return $ x { Post.comment_size = size }--markup x = render_to_html Markdown (x.body)
Panda/Model/Post.hs view
@@ -22,6 +22,9 @@ instance Resource Post where resource_title = uid >>> id_to_resource++instance Markable Post where+ markup x = render_to_html (x.reader) (x.body) list = ls G.blog_uri ^ map from_utf8 ^ rsort ^ map (G.blog_id /) >>= mapM get @@ -39,4 +42,4 @@ search "" = return [] search s = list ^ filter (match s) -markup x = render_to_html (x.reader) (x.body)+
Panda/Model/Static.hs view
@@ -15,6 +15,9 @@ instance Resource Static where resource_title = uid >>> spaced_url++instance Markable Static where+ markup x = render_to_html (x.reader) (x.body) get id = liftM2 (Static id) (get_body id) (return $ get_reader id) get_title = id_to_resource >>> dropExtension@@ -22,5 +25,3 @@ get_reader id = id.take_extension.guess_reader.fromMaybe G.default_reader title = uid >>> get_title--markup x = render_to_html (x.reader) (x.body)
Panda/Type/Sidebar.hs view
@@ -11,9 +11,10 @@ } deriving (Show, Eq) +instance Markable SidebarItem where+ markup x = render_to_html (x.reader) (x.body)+ read_sidebar_item default_reader s = liftM2 (SidebarItem name) body (return reader) where body = s.to_utf8.readFile reader = s.take_extension.guess_reader.fromMaybe default_reader name = s.takeFileName.dropExtension--markup x = render_to_html (x.reader) (x.body)
Panda/View/Control/Helper.hs view
@@ -7,8 +7,8 @@ nav p r = - [ div_class "alighleft" << nav_next p r- , div_class "alignright" << nav_previous p r+ [ div_class "alignleft" << nav_previous p r+ , div_class "alignright" << nav_next p r ] nav_previous p r = if p.Pager.has_previous
Panda/View/Widget/RSS.hs view
@@ -6,6 +6,7 @@ import qualified Panda.Config.Global as G import Panda.Type.Pager as Pager import Text.RSS+import qualified Text.RSS as RSS -- model import Panda.Model.Post as Post@@ -14,11 +15,11 @@ entry_uri x = "/" ++ Post.uid x.split "/".tail.join "/" -- RSS-channel_rss_template = [ Language "en-us" ]+channel_rss_template = [ RSS.Language "en-us" ] item_rss_template x = [ Title $ x.Post.title- , Description $ x.Post.markup.show+ , Description $ x.markup.show , Author $ G.author_email , Link $ x.item_uri , PubDate $ x.Post.date
Panda/View/Widget/Sidebar.hs view
@@ -20,7 +20,7 @@ [ feed state , tag_list $ state.State.tags ] - custom_list = G.sidebar.map (\x -> h2 << x.Sidebar.name +++ x.Sidebar.markup)+ custom_list = G.sidebar.map (\x -> h2 << x.Sidebar.name +++ x.markup) formatted_list = (stock_list ++ custom_list) .intersperse hr feed state = toHtml
changelog.markdown view
@@ -1,11 +1,23 @@-2008.10.11+2008.10.12 ---------- ### Fix +* navigation style typo+++2008.10.11+----------++### Feature+ * Proper title in header++### Fix+ * Change to GPL ( since panda links to GPL libraries ) + 2008.9.29 --------- @@ -13,6 +25,7 @@ * Text based theme + 2008.9.28 --------- @@ -20,6 +33,7 @@ * Add favicon config * Add google analytics config+ 2008.9.20 ----------
panda.cabal view
@@ -1,8 +1,8 @@ Name: panda-Version: 2008.10.11+Version: 2008.10.12 Build-type: Simple-Synopsis: Simple Static Blog Engine-Description: Simple Static Blog Engine+Synopsis: A simple static blog engine+Description: A simple static blog engine License: GPL License-file: LICENSE Author: Wang, Jinjing@@ -14,7 +14,7 @@ data-files: readme.markdown, changelog.markdown library- build-depends: base, cgi <= 3001.1.6.0, network, haskell98, old-locale, old-time, directory, filepath, containers, mps >= 2008.9.19, parsedate >= 3000.0.0, rss >= 3000.0.1, xhtml, kibro == 0.0, utf8-string >= 0.3.1, pandoc >= 0.46, MissingH, parsec >= 2+ build-depends: base, cgi, network, haskell98, old-locale, old-time, directory, filepath, containers, mps >= 2008.9.19, parsedate >= 3000.0.0, rss >= 3000.0.1, xhtml, kibro == 0.0, utf8-string >= 0.3.1, pandoc >= 0.46, MissingH, parsec >= 2 exposed-modules: Panda Panda.Config.Global @@ -24,7 +24,6 @@ Panda.Helper.Env Panda.Helper.Helper- Panda.Helper.MPSCandidate Panda.Model.Comment Panda.Model.Post
readme.markdown view
@@ -39,7 +39,9 @@ Install -------- -### install [lighttpd](http://www.lighttpd.net/ )+### install [lighttpd (version 1.4.19)](http://www.lighttpd.net/ )++Note: 1.4.20 is bugged for reason still unknown yet. ### install panda