## defs provided:
## pager(page, numpages) - [Prev] [0] [1] [2] [3] [Next]
## singlepost(post, threadpage) - one post
## rules(board, thread=None) - the rules underneath the posting form (used internally here)
## postform(board, thread=None) - the posting form
## internal:
## post_name_label(post) - outputs a name (and link, if one is defined)
## post_timestamp_label(post, dateformat=None) - timestamp, with link if one is defined and no name is set.
## dateformat is passed to format_timestamp
## post_label(post, dateformat=None) - post subject, name, timestamp, and poster ID
## sticky_icon() - for a sticky icon
## post_message(post, threadpage=True) - message text of a post. if threadpage is False, long messages are
## abbreviated with a note to that effect.
<%!
import matsuba.templatetools as tt
import extutil
# True = index.html, 1.html, 2.html, etc.
# False = only index.html
THREADLIST_MULTIPAGE = True
# True = Wakaba style:
# Posts increment globally
# Threads served via /board/res/threadid.html
# Post id references link to #postid on the thread page
# Threads are trimmed
# False = Kareha style:
# Each thread has a post #1
# Threads are served via /board/read/postrange
# Post id references link to a single-post view
# Multiple-post ranges are supported in post references
# Threads are not trimmed
POSTIDS_ABSOLUTE = True
# True = a subject is required when posting a new thread
# False = subject can be blank
REQUIRE_SUBJECT = False
# Other pages to generate (catalog, subback, ...)
OTHER_PAGES = [('rssreplies', 'rss.xml'), ('catalog', 'catalog.html'), ('subback', 'subback.html')]
%>
## -------------------------------------------------------------------------------------------------------------
## Page list.
<%def name="pager(page, numpages)">
% if page == 0: Previous % else: % endif | ## Google-style; trim to 20 pages at most, with current page in middle % for n in xrange(max(0, page - 10), min(numpages, page + 10)): % if n == page: [${n}] % else: [${n}] % endif % endfor | % if page >= numpages - 1: Next % else: % endif |
⋯ |
## TODO: javascript, see above
No.${post.id}
% if post.filename or post.thumbnail:
% endif % if post.filename: File: ${post.short_basename|h} -(${(post.fileinfo if threadpage else post.sizeinfo)|h}) ## Thumbnail displayed, click image for full size. % endif % if post.thumbnail: |
${abbrev or post.message} % if abbrev: ## Kareha: Post too long. Click to view the whole post or the thread page. ## Shiichan: (Post truncated.)%def>Comment too long. Click here to view the full text.
% endif