Permalink
Browse files

hyperlink blog posts!

  • Loading branch information...
1 parent 29127e5 commit 3abe0f8c4b8293ce9667a3e00db00bc019909455 Austin Seipp committed Jun 13, 2011
Showing with 3 additions and 2 deletions.
  1. +2 −1 src/main.opa
  2. +1 −1 src/post.opa
View
@@ -8,7 +8,8 @@ import opaque.config
import opaque.post
mainpage() =
- toListItem(v) = <li><span>{Date.to_string(v.date)}</span> - {v.title}</li>
+ toListItem((i,v)) =
+ <li><span>{Date.to_string(v.date)}</span> - <a href="/post/{Int.to_string(i)}">{v.title}</a></li>
Layout.styled_page(Config.title,
<h1>Blog Posts</h1>
<ul class="posts">
View
@@ -22,7 +22,7 @@ db /posts : intmap(Post.post)
get_posts() = /posts
get_post(i) = ?/posts[i]
posts_to_list() =
- List.rev(Map_make(Int.order).To.val_list(get_posts()))
+ List.rev(Map_make(Int.order).To.assoc_list(get_posts()))
postpage(x) =
match Parser.int(x) with

0 comments on commit 3abe0f8

Please sign in to comment.