I think this is ACTUALLY production ready now.

This commit is contained in:
Dominik V. Salonen 2015-12-23 23:39:05 +01:00
parent f7d9c0e87c
commit 3481df067a
5 changed files with 49 additions and 6 deletions

9
run.py
View File

@ -96,6 +96,15 @@ def upload_file():
return render_template('upload.html', page=config["SITE_DATA"]) return render_template('upload.html', page=config["SITE_DATA"])
@app.route('/about')
def about():
return render_template('about.html')
@app.route('/terms')
def terms():
return render_template('terms.html')
@app.route('/<filename>', methods=['GET']) @app.route('/<filename>', methods=['GET'])
def get_file(filename): def get_file(filename):
print_log('Web', 'Hit "' + filename + '" - ' + time_to_string(time.time())) print_log('Web', 'Hit "' + filename + '" - ' + time_to_string(time.time()))

View File

@ -33,6 +33,12 @@ body {
transform: translateY(-50%) transform: translateY(-50%)
} }
.note {
text-align: center;
font-size: 8pt;
color: #AAAAAA;
}
.title { .title {
font-size: 34pt; font-size: 34pt;
font-weight: 300; font-weight: 300;

14
templates/about.html Normal file
View File

@ -0,0 +1,14 @@
<html>
<head>
<title>QuadFile info</title>
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<p>
This page is not yet done, just know this: Files are cleaned at set interval, do not use this for long time storage.
</p>
</body>
</html>

19
templates/terms.html Normal file
View File

@ -0,0 +1,19 @@
<html>
<head>
<title>QuadFile info</title>
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<p>This section is currently not complete, more will be added</p>
<h1 id="limits">Limits</h1>
<ul>
<li><strong>You</strong> are responsible for the file you upload</li>
<li>The max file size is <strong>100 MB</strong></li>
<li>Files may be deleted if requested by the content owner</li>
<li>If I find illegal content (eg. CP, viruses and such) it will instantly be deleted</li>
<li>Only certain filetypes are allowed</li>
</ul>
</body>
</html>

View File

@ -12,16 +12,11 @@
</div> </div>
<input type="hidden" name="source" value="web"> <input type="hidden" name="source" value="web">
</form> </form>
<p class="note">This is temporary storage. Check the about page for details</p>
<ul class="links"> <ul class="links">
<li> <li>
<a href="/about">About</a> <a href="/about">About</a>
</li> </li>
<li>
<a href="/faq">F.A.Q</a>
</li>
<li>
<a href="/sharex">ShareX</a>
</li>
<li> <li>
<a href="/terms">Terms</a> <a href="/terms">Terms</a>
</li> </li>