mirror of
https://0xacab.org/johnxina/rat.git
synced 2024-12-23 13:09:08 +00:00
front page of course!
This commit is contained in:
parent
6b75b414c1
commit
414e0194c0
6
app.py
6
app.py
@ -131,7 +131,7 @@ async def thread_view(tid):
|
||||
|
||||
@app.route('/f')
|
||||
async def forum_view():
|
||||
fname = request.args['kw']
|
||||
fname = request.args['kw'][:-1] if request.args['kw'][-1] == '吧' else request.args['kw']
|
||||
pn = int(request.args.get('pn') or 1)
|
||||
sort = int(request.args.get('sort') or 0)
|
||||
|
||||
@ -149,6 +149,10 @@ async def forum_view():
|
||||
async def user_view():
|
||||
return 'UNDER CONSTRUCTION'
|
||||
|
||||
@app.route('/')
|
||||
async def main_view():
|
||||
return await render_template('index.html')
|
||||
|
||||
######################################################################
|
||||
|
||||
@app.errorhandler(RuntimeError)
|
||||
|
56
templates/index.html
Normal file
56
templates/index.html
Normal file
@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title>错误 - RAT</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link href="/static/css/main.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
.list {
|
||||
margin: 5% !important;
|
||||
padding: 1% !important;
|
||||
}
|
||||
|
||||
form {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin: 1%;
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
form > label {
|
||||
flex-shrink: 0;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
form > input {
|
||||
flex-grow: 1;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="list" style="text-align: center;">
|
||||
<div style="font-size: 10em;">
|
||||
<a title="吱?" style="text-decoration: none;">
|
||||
🐀
|
||||
</a>
|
||||
</div>
|
||||
<h1>RAT Ain't Tieba</h1>
|
||||
<h2>一款<a href="https://writefreesoftware.org/">尊重用户自由的</a>百度贴吧前端</h2>
|
||||
</div>
|
||||
<div class="list">
|
||||
<form action="/f" method="get">
|
||||
<label for="kw">贴吧传送门:</label>
|
||||
<input type="text" name="kw" required />
|
||||
</form>
|
||||
</div>
|
||||
<footer>
|
||||
<div><a href="https://0xacab.org/johnxina/rat">RAT Ain't Tieba</a></div>
|
||||
<div><a href="https://0xacab.org/johnxina/rat/-/blob/no-masters/LICENSE">自豪地以 AGPLv3 释出</a></div>
|
||||
<div><a href="https://0xacab.org/johnxina/rat">源代码</a></div>
|
||||
</footer>
|
||||
</body>
|
Loading…
Reference in New Issue
Block a user