rat/templates/thread.html

70 lines
2.0 KiB
HTML
Raw Normal View History

2023-07-11 11:32:13 +00:00
<!DOCTYPE html>
<head>
<title>{{ info.thread.text }} - 自由软件吧 - RAT</title>
<meta charset="utf-8">
<meta name="referrer" content="never">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="/static/css/main.css" rel="stylesheet">
</head>
<body>
<header class="thread-nav">
<div class="title">{{ info.thread.title }}</div>
<div class="from"><a href="/f?kw={{ info.forum.fname }}">{{ info.forum.fname }}吧</a></div>
</header>
<div class="list">
{% for p in info %}
<div class="post" id="{{ p.floor }}">
<img class="avatar" src="/proxy/avatar/{{ p.user.portrait }}">
<div>
<div class="userinfo">
<a href="/home/main?id={{ p.user.user_id }}">{{ p.user.user_name }}</a>
{% if p.is_thread_author %}
<span class="tag tag-blue">楼主</span>
{% endif %}
</div>
<div class="content">
2023-07-11 14:23:48 +00:00
{{ p.contents|translate|safe }}
2023-07-11 11:32:13 +00:00
</div>
<small class="date">{{ p.create_time|date }}</small>
2023-07-11 14:23:48 +00:00
<small class="permalink"><a href="#{{ p.floor }}">{{ p.floor }}</a></small>
2023-07-11 11:32:13 +00:00
</div>
</div>
{% endfor %}
</div>
2023-07-11 14:23:48 +00:00
<div class="paginator">
{% if info.page.current_page > 1 %}
<a href="/p/{{ info.thread.tid }}">首页</a>
{% endif %}
{% for i in range(5) %}
{% set np = info.page.current_page - 5 + i %}
{% if np > 0 %}
<a href="/p/{{ info.thread.tid }}?pn={{ np }}">{{ np }}</a>
{% endif %}
{% endfor %}
<a>{{ info.page.current_page }}</a>
{% for i in range(5) %}
{% set np = info.page.current_page + 1 + i %}
{% if np <= info.page.total_page %}
<a href="/p/{{ info.thread.tid }}?pn={{ np }}">{{ np }}</a>
{% endif %}
{% endfor %}
{% if info.page.current_page < info.page.total_page %}
<a href="/p/{{ info.thread.tid }}?pn={{ info.page.total_page }}">尾页</a>
{% endif %}
</div>
2023-07-11 11:32:13 +00:00
<footer>
<div><a href="/">RAT Ain't Tieba</a></div>
<div><a href="#">自豪地以 AGPLv3 释出</a></div>
<div><a href="#">源代码</a></div>
</footer>
</body>