Procházet zdrojové kódy

유저 메뉴와 버전

2DU před 9 roky
rodič
revize
17b8b37f3c
2 změnil soubory, kde provedl 19 přidání a 1 odebrání
  1. 6 1
      app.py
  2. 13 0
      templates/index.html

+ 6 - 1
app.py

@@ -426,7 +426,12 @@ def grammar():
 
 @app.route('/version')
 def version():
-    return render_template('index.html', title = '버전', logo = data['name'], data = '<h2 style="margin-top: -5px;">0.1</h2><li>문서 보기와 편집</li><li>기타 문서</li><li>랜덤 구현</li>')
+    return render_template('index.html', title = '버전', logo = data['name'], tn = 14)
+
+@app.route('/user')
+def user():
+    ip = getip(request)
+    return render_template('index.html', title = '유저 메뉴', logo = data['name'], data = ip + '<br><br><li><a href="/login">로그인</a></li><li><a href="/logout">로그아웃</a></li>')
 
 @app.route('/random')
 def random():

+ 13 - 0
templates/index.html

@@ -239,6 +239,19 @@
 				<br>
 				<button class="btn btn-primary" type="submit">되돌리기</button>
 			</form>
+			{% elif tn == 14 %}
+			<h1 class="title">{{title}}</h1>
+			<h2 class="title"><span style="margin-left:5px"></span></h2>
+			<div>
+				<h2 style="margin-top: -5px;">0.1 (알파)</h2>
+				<li>문서 보기와 편집</li>
+				<li>기타 문서</li>
+				<li>랜덤 구현</li>
+				<h2>0.2 ~ 0.9 (베타)</h2>
+				<li>그 외 엄청나게 많은 기능 구현 (기존 Ownet 기능에서 로그인 필요한 기능 빼고 구현)</li>
+				<h2>1.0</h2>
+				<li>로그인 구현 (예정)</li>
+			</div>
 			{% else %}
 			<h1 class="title">{{title}}</h1>
 			<h2 class="title"><span style="margin-left:5px"></span></h2>