Changeset 623 for lang/vim/blosxom.vim.cgi
- Timestamp:
- 10/23/07 08:49:06 (6 years ago)
- Location:
- lang/vim/blosxom.vim.cgi
- Files:
-
- 2 modified
-
blosxom.vim.cgi (modified) (3 diffs)
-
head.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/vim/blosxom.vim.cgi/blosxom.vim.cgi
r622 r623 32 32 endfunction 33 33 34 call Template("head.html", {"title": "This is Vim." })34 call Template("head.html", {"title": "This is Vim.", "home": $SCRIPT_NAME}) 35 35 36 36 … … 43 43 call Inspect($PATH_INFO) 44 44 call Inspect($SCRIPT_NAME) 45 46 45 47 call Out(strftime("%Y-%m-%d %H:%M:%S\n")) 48 49 50 function FilteringByPathInfo(entries) 51 let pathinfo = split($PATH_INFO, "/") 52 call Inspect(pathinfo) 53 if len(pathinfo) > 0 54 call Inspect(str2nr(pathinfo[0])) 55 if str2nr(pathinfo[0]) == 0 56 call Inspect("path") 57 call filter(a:entries, '!match(v:val["name"], "^'.$PATH_INFO.'")') 58 else 59 "call Inspect('strftime("%Y", v:val["time"]) == '.string(pathinfo[0])) 60 call filter(a:entries, 'strftime("%Y", v:val["time"]) == '.string(pathinfo[0])) 61 if len(pathinfo) > 1 62 call filter(a:entries, 'strftime("%m", v:val["time"]) == '.string(pathinfo[1])) 63 if len(pathinfo) > 2 64 call filter(a:entries, 'strftime("%d", v:val["time"]) == '.string(pathinfo[2])) 65 end 66 endif 67 endif 68 endif 69 endfunction 70 46 71 let files = split(glob("data/**/*.txt"), "\n") 47 72 let entries = sort(map(files, '{"path": v:val, "time": getftime(v:val)}'), "CompareByTime") … … 54 79 let ent["home"] = $SCRIPT_NAME 55 80 let ent["path"] = join(split(ent["home"], "/")[0:-1], "/") 56 " call Out(ent["title"] . " " . ent["path"] . "\n") 81 endfor 82 83 call FilteringByPathInfo(entries) 84 85 for ent in entries 57 86 call Template("story.html", ent) 58 87 endfor -
lang/vim/blosxom.vim.cgi/head.html
r621 r623 2 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 3 <head> 4 <title> </title>4 <title>#{title}</title> 5 5 <style type="text/css"> 6 6 body { … … 61 61 <body> 62 62 <div id="whole"> 63 <h1 id="top"><a href=" /">#{title}</a></h1>63 <h1 id="top"><a href="#{home}/">#{title}</a></h1> 64 64 65 65 <div id="content">
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)