rat/templates/bar.html

94 lines
2.9 KiB
HTML
Raw Normal View History

2023-07-11 11:32:13 +00:00
<!DOCTYPE html>
<head>
<title>{{ info['name'] }}吧 - RAT</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="/static/css/main.css" rel="stylesheet">
</head>
<body>
<header class="bar-nav">
<img src="/proxy/pic/{{ info['avatar'] }}"></nav>
<div>
<div class="title">{{ info['name'] }}吧</div>
<div class="description">{{ info['desc'] }}</div>
<div class="stats">
<small>关注: {{ info['member']|intsep }}</small>
<small>主题: {{ info['topic']|intsep }}</small>
<small>帖子: {{ info['thread']|intsep }}</small>
</div>
</div>
</header>
2023-07-12 14:52:47 +00:00
<div class="list">
<div class="vlist">
<!-- POPULAR SORT IS UNAVAILABLE -->
<!-- <div><a {% if sort == 0 %} class="current-sel" {% endif %}
href="/f?kw={{ info['name'] }}&pn={{ threads.page.current_page }}&sort=0">时下热门</a></div> -->
2023-07-12 14:52:47 +00:00
<div><a {% if sort == 5 %} class="current-sel" {% endif %}
href="/f?kw={{ info['name'] }}&sort=5">最新回复</a></div>
<div><a {% if sort == 1 %} class="current-sel" {% endif %}
href="/f?kw={{ info['name'] }}&sort=1">最新发布</a></div>
2023-07-12 14:52:47 +00:00
</div>
</div>
2023-07-11 11:32:13 +00:00
<div class="list">
{% for t in threads %}
<div class="thread">
<div class="stats">
<div class="replies">{{ t.reply_num }}</div>
<small>{{ t.last_time|simpledate }}</small>
</div>
<div class="summary">
<div class="title">
{% if t.is_top or t.is_livepost
%}<span class="tag tag-blue">置顶</span>{%
endif %}{% if t.is_good
%}<span class="tag tag-red"></span>{% endif
2023-07-12 14:52:47 +00:00
%}<a href="/p/{{ t.tid }}">{{ t.title if t.title else t.text|trim }} </a>
2023-07-11 11:32:13 +00:00
</div>
2023-07-12 14:52:47 +00:00
{% if t.title %}
2023-07-11 11:32:13 +00:00
<div>{{ t.text[(t.title|length):]|trim }}</div>
2023-07-12 14:52:47 +00:00
{% endif %}
2023-07-11 11:32:13 +00:00
</div>
<div class="participants">
<div>🧑<a href="">{{ t.user.user_name }}</a></div>
<!-- <div>💬<a href=""> API UNAVAILABLE </a></div> -->
</div>
</div>
{% endfor %}
2023-07-11 14:23:48 +00:00
<div class="paginator">
{% if threads.page.current_page > 1 %}
2023-07-12 14:52:47 +00:00
<a href="/f?kw={{ info['name'] }}&sort={{ sort }}">首页</a>
2023-07-11 14:23:48 +00:00
{% endif %}
{% for i in range(5) %}
{% set np = threads.page.current_page - 5 + i %}
{% if np > 0 %}
2023-07-12 14:52:47 +00:00
<a href="/f?kw={{ info['name'] }}&pn={{ np }}&sort={{ sort }}">{{ np }}</a>
2023-07-11 14:23:48 +00:00
{% endif %}
{% endfor %}
<a>{{ threads.page.current_page }}</a>
{% for i in range(5) %}
{% set np = threads.page.current_page + 1 + i %}
{% if np <= threads.page.total_page %}
2023-07-12 14:52:47 +00:00
<a href="/f?kw={{ info['name'] }}&pn={{ np }}&sort={{ sort }}">{{ np }}</a>
2023-07-11 14:23:48 +00:00
{% endif %}
{% endfor %}
{% if threads.page.current_page < threads.page.total_page %}
2023-07-12 14:52:47 +00:00
<a href="/f?kw={{ info['name'] }}&pn={{ threads.page.total_page }}&sort={{ sort }}">尾页</a>
2023-07-11 14:23:48 +00:00
{% endif %}
</div>
2023-07-11 11:32:13 +00:00
</div>
<footer>
<div><a href="#">RAT Ain't Tieba</a></div>
<div><a href="#">自豪地以 AGPLv3 释出</a></div>
<div><a href="#">源代码</a></div>
</footer>
</body>