rat/templates/thread.html

100 lines
3.1 KiB
HTML
Raw Normal View History

2023-07-11 11:32:13 +00:00
<!DOCTYPE html>
<head>
2023-07-13 12:06:44 +00:00
<title>{{ info.thread.text }}{{ ao }} - 自由软件吧 - RAT</title>
2023-07-11 11:32:13 +00:00
<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>
2023-07-13 12:06:44 +00:00
<div class="list">
<div class="vlist">
<div><a {% if not ao %} class="current-sel" {% endif %} href="/p/{{ info.thread.tid }}?ao=0">全部回复</a></div>
<div><a {% if ao %} class="current-sel" {% endif %} href="/p/{{ info.thread.tid }}?ao=1">仅看楼主</a></div>
</div>
</div>
2023-07-11 11:32:13 +00:00
<div class="list">
{% for p in info %}
<div class="post" id="{{ p.floor }}">
2023-07-13 10:48:49 +00:00
<div>
<img class="avatar" src="/proxy/avatar/{{ p.user.portrait }}">
{% if p.user.is_bawu %}
<div style="background-color: var(--important-color); !important" class="tier">吧务</div>
{% endif %}
<div class="tier">level {{ p.user.level }}</div>
</div>
2023-07-11 11:32:13 +00:00
<div>
<div class="userinfo">
2023-07-14 02:06:58 +00:00
<a href="/home/main?id={{ p.user.user_id }}">{{ p.user.show_name }}</a>
2023-07-11 11:32:13 +00:00
{% 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-12 14:52:47 +00:00
{% if p.comments %}
<div class="replies">
{% for comment in p.comments %}
<div class="post">
<img class="avatar" src="/proxy/avatar/{{ comment.user.portrait }}">
<div>
<div class="userinfo">
2023-07-14 02:06:58 +00:00
<a href="/home/main?id={{ comment.user.user_id }}">{{ comment.user.show_name }}</a>
2023-07-12 14:52:47 +00:00
</div>
<div class="content">
{{ comment.contents|translate(comment.reply_to_id)|safe }}
</div>
<small class="date">{{ comment.create_time|date }}</small>
</div>
</div>
{% endfor %}
</div>
{% endif %}
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 %}
2023-07-13 12:06:44 +00:00
<a href="/p/{{ info.thread.tid }}&ao={{ao}}">首页</a>
2023-07-11 14:23:48 +00:00
{% endif %}
{% for i in range(5) %}
{% set np = info.page.current_page - 5 + i %}
{% if np > 0 %}
2023-07-13 12:06:44 +00:00
<a href="/p/{{ info.thread.tid }}?pn={{ np }}&ao={{ao}}">{{ np }}</a>
2023-07-11 14:23:48 +00:00
{% 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 %}
2023-07-13 12:06:44 +00:00
<a href="/p/{{ info.thread.tid }}?pn={{ np }}&ao={{ao}}">{{ np }}</a>
2023-07-11 14:23:48 +00:00
{% endif %}
{% endfor %}
{% if info.page.current_page < info.page.total_page %}
2023-07-13 12:06:44 +00:00
<a href="/p/{{ info.thread.tid }}?pn={{ info.page.total_page }}&ao={{ao}}">尾页</a>
2023-07-11 14:23:48 +00:00
{% 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>