diff --git a/app.py b/app.py index 3e849a2..21609b8 100644 --- a/app.py +++ b/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) diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..afa1a5a --- /dev/null +++ b/templates/index.html @@ -0,0 +1,56 @@ + + + 错误 - RAT + + + + + + + + + + +
+
+ + 🐀 + +
+

RAT Ain't Tieba

+

一款尊重用户自由的百度贴吧前端

+
+
+
+ + +
+
+ +