% function pad(n) { -%>
<% return +n < 10 ? '0' + n : String(n) -%>
<% } -%>
<% var _months = 'January February March April May June July August September October November December'.split(' ') -%>
<% var _shortMonths = _months.map(function(m) { return m.slice(0, 3) }) -%>
<% function formatDate(t) { -%>
<% var d = new Date(t) -%>
<% return d.getDate() + ' ' + _shortMonths[d.getMonth()] -%>
<% } -%>
<% function sortPosts(dir) { -%>
<% var slugs = Object.keys(dir._data) -%>
<% var posts = slugs.map(function(slug) { -%>
<% var d = dir._data[slug]; -%>
<% d.slug = slug; -%>
<% return d; -%>
<% }) -%>
<% posts.sort(function(a, b) { -%>
<% var t1 = a.timestamp -%>
<% var t2 = b.timestamp -%>
<% return t1 < t2 ? 1 : (t1 > t2 ? -1 : 0) -%>
<% }) -%>
<% return posts -%>
<% } -%>
<% var posts = sortPosts(public.posts[current.path[1]][current.path[2]]) -%>
<% for (var i in posts) { -%>
<% var post = posts[i] -%>
<% if (post.hidden) continue -%>
→ <%= post.title %>
∞
<% } else { -%>
<%= post.title %>
<% } -%>