\post.title
\post.content
include "page.wl" let posts = $query("SELECT title, content FROM Posts WHERE id=?", $post_id) let comments = $query("SELECT C.id, U.username, C.content, C.parent_post, C.parent_comment FROM Comments as C, Users as U WHERE C.parent_post=? AND U.id == C.author", $post_id) let lookup = {} for comment in comments: { comment.child = [] lookup[comment.id] = comment } let roots = [] for comment in comments: { if comment.parent_comment == none: roots << comment else lookup[comment.parent_comment].child << comment } comments = roots let post = posts[0] let style = procedure render_comment(parent)
\parent.content
\post.content