<%! import matsuba.templatetools as tt import extutil THREADS_VISIBLE, THREADS_LISTED = 10, 40 %> <%namespace file="common.html" import="*" /> <%inherit file="base.html" /> <%def name="bodyclass()">mainpage <% banner = get_random_banner(board) %> % if banner:
${SITE_TITLE|h}
% endif ## header.html goes here ##

${board and board.title or SITE_TITLE|h}

## rules.html goes here
Board look: % for sname in self.STYLESHEETS: ${sname|h} % endfor % if BOARD_LIST:
Site: ${BOARD_LIST} % endif
##
mid.html goes here!
% for n, thread in enumerate(threads[:THREADS_VISIBLE]): ${n+1}: ${thread.subject|h} (${thread.length}) % endfor % for n, thread in enumerate(threads[THREADS_VISIBLE:THREADS_LISTED]): ${n+1+THREADS_VISIBLE}: ${thread.subject|h} (${thread.length}) % endfor
% for tn, thread in enumerate(threads[:THREADS_VISIBLE]): <% op, res = thread[0], thread[1:] if thread.sticky: n = MAX_STICKY_REPLIES_SHOWN else: n = MAX_REPLIES_SHOWN replies = res[-n:] omitted = len(res) - len(replies) omitted_files = tt.filecount(res) - tt.filecount(replies) # extutil.make_plural(omitted_files, 'file') %>

${thread.subject|h} (${thread.length}${(', sticky' if thread.sticky else '')}${(', permasaged' if thread.sage and not thread.sticky else '')}${(', closed' if thread.closed else '')})

${singlepost(op, False)} % if omitted:
% endif % for post in replies: ${singlepost(post, False)} % endfor
<%call expr="postform(board, thread)"><%def name="links()">
% endfor

New thread

${postform(board)}