panda 2008.9.20 → 2008.9.28
raw patch · 9 files changed
+53/−10 lines, 9 filesdep ~cgidep ~kibro
Dependency ranges changed: cgi, kibro
Files
- Panda/Config/Global.hs +7/−0
- Panda/Extension/Analytics/T.hs +19/−0
- Panda/Helper/Helper.hs +1/−2
- Panda/View/RSS.hs +1/−1
- Panda/View/Theme/BluePrint/Template/Body.hs +10/−4
- Panda/View/Theme/BluePrint/Template/Header.hs +2/−1
- changelog.markdown +8/−0
- panda.cabal +3/−2
- readme.markdown +2/−0
Panda/Config/Global.hs view
@@ -46,3 +46,10 @@ sidebar = config_for "sidebar" .parse_config .map (sidebar_uri /).select (to_utf8 >>> doesFileExist >>> purify ) .map (read_sidebar_item default_reader >>> purify)+ +favicon = config_for "favicon"++++-- for extensions+analytics_account_id = config_for "analytics_account_id"
+ Panda/Extension/Analytics/T.hs view
@@ -0,0 +1,19 @@+module Panda.Extension.Analytics.T where++import Panda.Helper.Env+import Prelude hiding ((.), (/), (^), id, span)+import qualified Panda.Config.Global as G++analytics_snippet = + [ "<script type=\"text/javascript\"> "+ , "var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\"); "+ , "document.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\")); "+ , "</script> "+ , "<script type=\"text/javascript\"> "+ , "var pageTracker = _gat._getTracker(\"UA-xxxxxx-x\"); "+ , "pageTracker._trackPageview(); "+ , "</script> "+ ]+ .map strip+ .join "\n"+ .gsub "UA-xxxxxx-x" G.analytics_account_id
Panda/Helper/Helper.hs view
@@ -76,9 +76,9 @@ css_link l = itag "link" ! [rel "stylesheet", thetype "text/css", href l] js_link l = itag "script" ! [thetype "text/javascript", src l] rss_link l = itag "link" ! [rel "alternate", thetype "application/rss+xml", href l, title "RSS 2.0"]+favicon_link l = itag "link" ! [rel "icon", thetype "image/png", href l] meta_tag = meta ! [httpequiv "Content-Type", content "text/html; charset=utf-8"] - div_id s = thediv ! [id s] div_class s = thediv ! [theclass s] div_class_id x y = thediv ! [theclass x, id y]@@ -91,4 +91,3 @@ , s.show , "<![endif]-->" ] .join' .primHtml-
Panda/View/RSS.hs view
@@ -1,7 +1,7 @@ module Panda.View.RSS where -- env-import Panda.Helper.Env+import Panda.Helper.Env -- hiding (Language) import Prelude hiding ((.), (/), (^), id) import qualified Panda.Config.Global as G import Panda.Type.Pager as Pager
Panda/View/Theme/BluePrint/Template/Body.hs view
@@ -10,11 +10,17 @@ import Panda.View.Theme.BluePrint.Template.Sidebar import Panda.View.Theme.BluePrint.Template.Footer +-- extension+import Panda.Extension.Analytics.T -html_body state x = body << div_class "container" << - [ body_header state- , div_id "page" << [ body_content x, html_sidebar state ]- , html_footer++html_body state x = body << + [ div_class "container" << + [ body_header state+ , div_id "page" << [ body_content x, html_sidebar state ]+ , html_footer+ ]+ , primHtml analytics_snippet ] body_header state = toHtml
Panda/View/Theme/BluePrint/Template/Header.hs view
@@ -5,10 +5,11 @@ import qualified Panda.Config.Global as G -html_head = header << ([meta_tag, title_tag, rss_tag] ++ css_list ++ js_list )+html_head = header << ([meta_tag, title_tag, favicon_tag, rss_tag] ++ css_list ++ js_list ) title_tag = thetitle << G.blog_title rss_tag = rss_link "rss.xml"+favicon_tag = favicon_link G.favicon -- css css_list = [screen_css, wp_css, custom_css]
changelog.markdown view
@@ -1,3 +1,11 @@+2008.9.28+---------++### Features++* Add favicon config+* Add google analytics config+ 2008.9.20 ----------
panda.cabal view
@@ -1,5 +1,5 @@ Name: panda-Version: 2008.9.20+Version: 2008.9.28 Build-type: Simple Synopsis: Simple Static Blog Engine Description: Simple Static Blog Engine@@ -14,7 +14,7 @@ data-files: readme.markdown, changelog.markdown library- 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+ 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 exposed-modules: Panda Panda.Config.Global Panda.Controller.Application@@ -41,6 +41,7 @@ Panda.View.Theme.BluePrint.Template.Header Panda.View.Theme.BluePrint.Template.Sidebar Panda.View.Theme.BluePrint.Template.Template+ Panda.Extension.Analytics.T
readme.markdown view
@@ -113,4 +113,6 @@ reject, join, belongs_to, match, gsub and so on.++If the latest git version doesn't build, try `cabal install cgi`; if still no good, try `cabal update; cabal upgrade` to upgrade haskell packages.