Base HTML
This commit is contained in:
parent
f0136ab01e
commit
c92abf2ee3
|
@ -0,0 +1,5 @@
|
||||||
|
<div id="PlainDiscussComment{ID}">
|
||||||
|
<h5>{User}, {Date}, <a href="#PlainDiscussComment{ID}">#{ID}</a></h5>
|
||||||
|
<button type="submit" name="Report" value="{ID}">Report</button>
|
||||||
|
<button type="submit" name="Reply" value="{ID}">Reply to</button>
|
||||||
|
</div>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<div>
|
||||||
|
<h3>Comments</h3>
|
||||||
|
<button type="submit" name="Action" value="Delete">Delete Selected</button>
|
||||||
|
<button type="submit" name="Action" value="Login">Admin Login</button>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div>
|
||||||
|
<label>Secret Key (Optional):</label>
|
||||||
|
<span><input type="password" name="SecretKey"></span>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div>
|
||||||
|
<label>CAPTCHA:</label>
|
||||||
|
<span><input type="text" name="CAPTCHA"></span>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div>
|
||||||
|
<label>Your Name:</label>
|
||||||
|
<span><input type="text" name="User"></span>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div>
|
||||||
|
<label>Reply:</label>
|
||||||
|
<button type="submit" name="Action" value="Post">Post as New Comment</button>
|
||||||
|
<textarea name="Comment"></textarea>
|
||||||
|
</div>
|
|
@ -1,31 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" href="Style.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<form action="/Comments" method="get">
|
|
||||||
<div>
|
|
||||||
<h3>Comments</h3>
|
|
||||||
<button type="submit" name="Action" value="Delete">Delete Selected</button>
|
|
||||||
<button type="submit" name="Action" value="Login">Admin Login</button>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
<div>
|
|
||||||
<label>Your Secret Key (Optional):</label>
|
|
||||||
<span><input type="password" name="SecretKey"></span>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
<div>
|
|
||||||
<label>CAPTCHA:</label>
|
|
||||||
<span><input type="text" name="CAPTCHA"></span>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
<div>
|
|
||||||
<label>Your Reply:</label>
|
|
||||||
<button type="submit" name="Action" value="Post">Post as New Comment</button>
|
|
||||||
<textarea name="Comment"></textarea>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,6 +1,7 @@
|
||||||
Input, TextArea {
|
Input, TextArea {
|
||||||
Width: 100%;
|
//Width: 100%;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
Span {
|
Span {
|
||||||
Display: Block;
|
Display: Block;
|
||||||
Overflow: Hidden;
|
Overflow: Hidden;
|
||||||
|
@ -9,6 +10,7 @@ Label{
|
||||||
Float: Left;
|
Float: Left;
|
||||||
Padding-Right: 8px;
|
Padding-Right: 8px;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
TextArea {
|
TextArea {
|
||||||
Width: 100%;
|
Width: 100%;
|
||||||
Height: 30%;
|
Height: 30%;
|
|
@ -0,0 +1,10 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="Main.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form action="/Comments" method="get">
|
||||||
|
{}
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -42,19 +42,51 @@ def SetConfig():
|
||||||
Config[i] = File[i]
|
Config[i] = File[i]
|
||||||
return Config
|
return Config
|
||||||
|
|
||||||
def HandlePost(Req):
|
def GetComments():
|
||||||
|
return [0,0,0]
|
||||||
|
|
||||||
|
def PatchHTML():
|
||||||
|
Base = ReadFile('Source/Main.html')
|
||||||
|
FormMain = ReadFile('Source/Form.Main.html')
|
||||||
|
FormComment = ReadFile('Source/Form.Comment.html')
|
||||||
|
|
||||||
|
Comments = ''
|
||||||
|
for i in GetComments():
|
||||||
|
Comments += "\n<br><hr>\n" + FormComment.format(
|
||||||
|
User="User",
|
||||||
|
Date="Date",
|
||||||
|
ID="ID")
|
||||||
|
|
||||||
|
return Base.format(FormMain + Comments)
|
||||||
|
|
||||||
|
def Get(Req):
|
||||||
|
Data = Req.args
|
||||||
|
print(Data.get('Site'))
|
||||||
|
print(Data.get('Page'))
|
||||||
|
print(Data.get('User'))
|
||||||
|
print(Data.get('CAPTCHA'))
|
||||||
|
print(Data.get('Comment'))
|
||||||
|
print(Data.get('SecretKey'))
|
||||||
|
print(Data.get('Action'))
|
||||||
|
print(Data.get('Reply'))
|
||||||
|
print(Data.get('Report'))
|
||||||
|
return PatchHTML()
|
||||||
|
|
||||||
|
def Post(Req):
|
||||||
Data = Req.get_json()
|
Data = Req.get_json()
|
||||||
|
print(Data)
|
||||||
|
|
||||||
@App.route('/Test.html')
|
@App.route('/Main.css')
|
||||||
def Test():
|
def SendCSS():
|
||||||
return send_file('Test.html')
|
return send_file('Main.css')
|
||||||
|
|
||||||
@App.route('/Comments', methods=['GET' 'POST'])
|
@App.route('/Comments', methods=['GET', 'POST'])
|
||||||
def Comments():
|
def Comments():
|
||||||
if request.method == 'GET':
|
Req = request
|
||||||
pass
|
if Req.method == 'GET':
|
||||||
if request.method == 'POST':
|
return Get(Req)
|
||||||
return HandlePost(request)
|
if Req.method == 'POST':
|
||||||
|
return Post(Req)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
Config = SetConfig()
|
Config = SetConfig()
|
||||||
|
|
Loading…
Reference in New Issue