sites/randogoth.com/bbs/templates/category.html

16 lines
1.3 KiB
HTML
Raw Normal View History

{% extends "base.html" %}
{% block title %}{{ category }} · {{ SITENAME }}{% endblock %}
{% block content %}
{% set info = BBS_AREAS.get(category|string, 0) %}
{% set t = "AREA " ~ info ~ ": " ~ category %}
<pre class="box">┌─ <span class="boxtitle">{{ t }}</span> {{ "─" * (75 - t|length) }}┐</pre>
<pre class="box">├──────────────────────────────────────────────────────────────────────────────┤</pre>
{%- set total = articles_paginator.object_list|length %}
{%- for a in articles_page.object_list %}
{%- set n = total - (loop.index0 + (articles_page.number - 1) * articles_paginator.per_page) %}
<pre class="box">│ <span class="key">[<b>{{ "%3d"|format(n) }}</b>]</span> <span class="date">{{ a.date.strftime('%d %b %y')|lower }}</span> <a data-key="{{ n }}" href="{{ SITEURL }}/{{ a.url }}">{{ "%-60s"|format(a.title|striptags|truncate(60, true, '')) }}</a> │</pre>
{%- endfor %}
<pre class="box">└──────────────────────────────────────────────────────────────────────────────┘</pre>
{% include 'pagination.html' %}
{% endblock %}