More pages

This commit is contained in:
Dominik V. Salonen 2015-12-24 15:26:55 +01:00
parent a6c35978fb
commit 004eee2642
5 changed files with 73 additions and 4 deletions

9
run.py
View File

@ -98,14 +98,19 @@ def upload_file():
elif request.method == 'GET': elif request.method == 'GET':
return render_template('upload.html', page=config["SITE_DATA"]) return render_template('upload.html', page=config["SITE_DATA"])
# Def all the static pages
@app.route('/about') @app.route('/about')
def about(): def about():
return render_template('about.html', page=config["SITE_DATA"]) return render_template('about.html', page=config["SITE_DATA"])
@app.route('/terms') @app.route('/terms')
def terms(): def terms():
return render_template('terms.html', page=config["SITE_DATA"]) return render_template('terms.html', page=config["SITE_DATA"])
@app.route('/privacy')
def privacy():
return render_template('privacy.html', page=config["SITE_DATA"])
@app.route('/faq')
def faq():
return render_template('faq.html', page=config["SITE_DATA"])
@app.route('/<filename>', methods=['GET']) @app.route('/<filename>', methods=['GET'])

View File

@ -80,15 +80,29 @@ p {
} }
h1 { h1 {
margin-top: 15px; margin-top: 25px;
margin-bottom: 10px;
}
h2 {
margin-top: 25px;
margin-bottom: 5px; margin-bottom: 5px;
} }
a { .title a {
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
} }
.title a:hover {
text-decoration: underline;
}
a {
color: #33BB33;
text-decoration: none;
}
a:hover { a:hover {
text-decoration: underline; text-decoration: underline;
} }

38
templates/faq.html Normal file
View File

@ -0,0 +1,38 @@
{% extends "regular.html" %}
{% block body %}
<h1 id="limits">Frequently asked questions</h1>
<h2>
Can I use ShareX to upload?
</h2>
<p>Sure thing! Here's the config: <a href="/QuadFile.json">i am link</a></p>
<p>Import that as a custom uploader and fire away</p>
<h2>
Who runs this thing
</h2>
<p>A guy called Quad (<a href="https://twitter.com/QuadPiece/">Twitter</a>)</p>
<h2>
What powers this site?
</h2>
<p>The server itself comes from RamNode, sitting behind CloudFlare.</p>
<p>The actual site is purely Python powered and only depends on Flask. The database is SQLite, but on SSD it works okay since this service isn't too write heavy.</p>
<h2>
What about the old files I uploaded?
</h2>
<p>All files from the old {{ page.title }} are still accessible, with the same URLs even.</p>
<h2>
Where can I donate?
</h2>
<p>You can't.</p>
<p>This is purely a novelty project for personal use, but it was opened up to the public as a free service. If you really want to donate, consider doing so to other projects of mine, such as <a href="http://openings.moe">openings.moe</a> </p>
<h2>
I get an "Internal server error" (Code 400), why?
</h2>
<p>The site is fresh. I still haven't implemented error handling for a lot of things, in those cases you will simply see that generic error page.</p>
{% endblock %}

6
templates/privacy.html Normal file
View File

@ -0,0 +1,6 @@
{% extends "regular.html" %}
{% block body %}
<h1 id="limits">Privacy policy</h1>
<p>Files are treated as most would expect. They're stored on a server owned by me until they expire. After expiring they're both deleted from storage and cleared from the database, no trails remain. No permanent logs are kept other than nginx's default access logs.</p>
<p>Otherwise there is no privacy policy. It all depends on how much you trust me not to leak your nudes.</p>
{% endblock %}

View File

@ -20,6 +20,12 @@
<li> <li>
<a href="/terms">Terms</a> <a href="/terms">Terms</a>
</li> </li>
<li>
<a href="/privacy">Privacy</a>
</li>
<li>
<a href="/faq">FAQ</a>
</li>
</ul> </ul>
<script> <script>
document.getElementById("file").onchange = function() { document.getElementById("file").onchange = function() {