2DU 9 年之前
父節點
當前提交
7b50c4167a
共有 2 個文件被更改,包括 9 次插入4 次删除
  1. 1 2
      app.py
  2. 8 2
      templates/index.html

+ 1 - 2
app.py

@@ -38,7 +38,6 @@ def history(number, title, data, date, ip, send, leng):
 def redirect():
     return '<meta http-equiv="refresh" content="0;url=/w/' + parse.quote(data['frontpage']) + '" />'
 
-@app.route('/RecentChanges')
 @app.route('/recentchanges')
 def recentchanges():
     i = 0
@@ -103,7 +102,7 @@ def setup():
     curs.execute("create table if not exists user(id text not null, pw text not null, acl text not null)")
     curs.execute("create table if not exists ban(block text not null, end text not null, why text not null, band text not null)")
     curs.execute("create table if not exists topic(id text not null, title text not null, sub text not null, data longtext not null, date text not null, ip text not null, block text not null)")
-    return '문제 없음'
+    return render_template('index.html', title = '설치 완료', logo = data['name'], data = '문제 없음')
 
 if __name__ == '__main__':
     app.run(host = '0.0.0.0', port = 3000)

+ 8 - 2
templates/index.html

@@ -15,8 +15,8 @@
 			<div id="top">
 				<a href="/" id="logo">{{logo}}</a>
 				<div>
-					<a href="/RecentChanges" id="RecentChanges"><i class="fa fa-refresh" aria-hidden="true"></i><span id="is_mobile">최근 변경</span></a>
-					<a href="/RecentChanges" id="RecentChanges"><i class="fa fa-comment" aria-hidden="true"></i><span id="is_mobile">최근 토론</span></a>
+					<a href="/recentchanges" id="RecentChanges"><i class="fa fa-refresh" aria-hidden="true"></i><span id="is_mobile">최근 변경</span></a>
+					<a href="/recentdiscuss" id="RecentChanges"><i class="fa fa-comment" aria-hidden="true"></i><span id="is_mobile">최근 토론</span></a>
 					<a href="/random" id="log"><i class="fa fa-random" aria-hidden="true"></i></a>
 					<a href="/user" id="log"><i class="fa fa-user" aria-hidden="true"></i></a>
 					<a href="/other" id="log"><i class="fa fa-cogs" aria-hidden="true"></i></a>
@@ -108,6 +108,12 @@
 				</tbody>
 			</table>
 			{% endfor %}
+			{% else %}
+			<h1 class="title">{{title}}</h1>
+			<h2 class="title"><span style="margin-left:5px"></span></h2>
+			<div>
+				{{data}}
+			</div>
 			{% endif %}
 			<hr id="last">
 			<p>{{license}}</p>