Changeset 1160 for lang/haskell
- Timestamp:
- 11/06/07 01:09:06 (13 months ago)
- Location:
- lang/haskell/blosxkel
- Files:
-
- 4 modified
-
blosxkel.hs (modified) (3 diffs)
-
foot.html (modified) (1 diff)
-
head.html (modified) (1 diff)
-
story.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/haskell/blosxkel/blosxkel.hs
r1159 r1160 15 15 16 16 import Network.CGI 17 18 import Text.Regex19 20 17 21 18 -- ref. http://i.loveruby.net/ja/stdhaskell/samples/lazylines/Template.hs.html … … 40 37 parseLine l 41 38 | all isSpace l = [] 42 | otherwise = let (k, (':':v)) = (break (== ':') l)43 in [(strip k, strip v)]39 | otherwise = let (k, (':':v)) = (break (== ':') l) 40 in [(strip k, strip v)] 44 41 strip = rstrip . lstrip 45 42 rstrip = reverse . lstrip . reverse … … 103 100 ; cs <- mapM 104 101 (\e -> fill "story" 105 [("title", title e), 106 ("body", concat (body e)), 107 ("time", formatCalendarTime defaultTimeLocale "%Y-%m-%d %H:%M:%S" (toUTCTime (time e))), 108 ("path", path e)]) 102 [("title" , title e), 103 ("body" , concat (body e)), 104 ("time" , formatCalendarTime defaultTimeLocale "%Y-%m-%d %H:%M:%S" (toUTCTime (time e))), 105 ("yr" , formatCalendarTime defaultTimeLocale "%Y" (toUTCTime (time e))), 106 ("mo" , formatCalendarTime defaultTimeLocale "%b" (toUTCTime (time e))), 107 ("mo_num" , formatCalendarTime defaultTimeLocale "%m" (toUTCTime (time e))), 108 ("da" , formatCalendarTime defaultTimeLocale "%d" (toUTCTime (time e))), 109 ("dw" , formatCalendarTime defaultTimeLocale "%a" (toUTCTime (time e))), 110 ("hr" , formatCalendarTime defaultTimeLocale "%H" (toUTCTime (time e))), 111 ("min" , formatCalendarTime defaultTimeLocale "%M" (toUTCTime (time e))), 112 ("hr12" , formatCalendarTime defaultTimeLocale "%I" (toUTCTime (time e))), 113 ("ampm" , formatCalendarTime defaultTimeLocale "%p" (toUTCTime (time e))), 114 ("ti" , formatCalendarTime defaultTimeLocale "%X" (toUTCTime (time e))), 115 ("fn" , path e), 116 ("path" , path e)]) 109 117 $ take 7 $ reverse $ sortBy (\a b -> compare (time a) (time b)) entries 110 118 ; cf <- fill "foot" [] 111 119 ; return $ (ct, concat $ [ch, concat cs, cf]) 112 120 } where 113 fill place params = fillFlavour "html" place (params ++ [("title" , getConfig config "title"),114 ("author" , getConfig config "author"),115 ("version", " aaa")] ++ cgiparams)121 fill place params = fillFlavour "html" place (params ++ [("title" , getConfig config "title"), 122 ("author" , getConfig config "author"), 123 ("version", "How I can get this version of GHC in program?")] ++ cgiparams) 116 124 117 125 cgiMain :: CGI CGIResult -
lang/haskell/blosxkel/foot.html
r1156 r1160 1 </div>1 </div> 2 2 3 <div id="footer">4 <p>$version </p>5 </div>6 </div>7 </body>3 <div id="footer"> 4 <p>$version $author</p> 5 </div> 6 </div> 7 </body> 8 8 </html> -
lang/haskell/blosxkel/head.html
r1156 r1160 91 91 <body> 92 92 <div class="all"> 93 <h1 id="top"><a href=" /">$title</a></h1>93 <h1 id="top"><a href="$home/">$title</a></h1> 94 94 95 95 <p>$home</p> -
lang/haskell/blosxkel/story.html
r1152 r1160 6 6 <dl class="information"> 7 7 <dt>DateTime</dt> 8 <dd>$ time</dd>8 <dd>$mo $yr $da $dw $hr:$min</dd> 9 9 <dt>Path</dt> 10 10 <dd><a href="$home$path">$path</a></dd>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)