Actual some sort of navigation system
This commit is contained in:
parent
c122acf968
commit
37ade4fd34
9
templates/download.html
Normal file
9
templates/download.html
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{% extends "layout.html" %}
|
||||||
|
{% block body %}
|
||||||
|
test<br>test<br>test<br>test<br>test<br>test<br>test<br>test<br>
|
||||||
|
test<br>test<br>test<br>test<br>test<br>test<br>test<br>test<br>
|
||||||
|
test<br>test<br>test<br>test<br>test<br>test<br>test<br>test<br>
|
||||||
|
test<br>test<br>test<br>test<br>test<br>test<br>test<br>test<br>
|
||||||
|
test<br>test<br>test<br>test<br>test<br>test<br>test<br>test<br>
|
||||||
|
test<br>test<br>test<br>test<br>test<br>test<br>test<br>test<br>
|
||||||
|
{% endblock %}
|
|
@ -1,3 +1,17 @@
|
||||||
|
{% set header_links =
|
||||||
|
{
|
||||||
|
"Home":
|
||||||
|
{
|
||||||
|
"endpoint": "home_index",
|
||||||
|
"href": "/home"
|
||||||
|
},
|
||||||
|
"Download":
|
||||||
|
{
|
||||||
|
"endpoint": "download_index",
|
||||||
|
"href": "/download"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%}
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>osu!wayback</title>
|
<title>osu!wayback</title>
|
||||||
|
@ -51,13 +65,15 @@
|
||||||
<body class="pushable">
|
<body class="pushable">
|
||||||
<div class="ui large top fixed inverted menu transition hidden">
|
<div class="ui large top fixed inverted menu transition hidden">
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<a class="active item">Home</a>
|
{% for entry in header_links.keys() %}
|
||||||
<a class="item">Downloader</a>
|
<a class="{% if header_links[entry]["endpoint"] == request.endpoint %}active{% endif %} item" href="{{ header_links[entry]["href"] }}">{{entry}}</a>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui vertical inverted sidebar menu left" style="">
|
<div class="ui vertical inverted sidebar menu left">
|
||||||
<a class="active item">Home</a>
|
{% for entry in header_links.keys() %}
|
||||||
<a class="item">Downloader</a>
|
<a class="{% if header_links[entry]["endpoint"] == request.endpoint %}active{% endif %} item" href="{{ header_links[entry]["href"] }}">{{entry}}</a>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<div class="pusher">
|
<div class="pusher">
|
||||||
<div class="ui inverted vertical masthead center aligned segment">
|
<div class="ui inverted vertical masthead center aligned segment">
|
||||||
|
@ -66,8 +82,9 @@
|
||||||
<a class="toc item">
|
<a class="toc item">
|
||||||
<i class="sidebar icon"></i>
|
<i class="sidebar icon"></i>
|
||||||
</a>
|
</a>
|
||||||
<a class="active item">Home</a>
|
{% for entry in header_links.keys() %}
|
||||||
<a class="item">Downloader</a>
|
<a class="{% if header_links[entry]["endpoint"] == request.endpoint %}active{% endif %} item" href="{{ header_links[entry]["href"] }}">{{entry}}</a>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
7
web.py
7
web.py
|
@ -1,7 +1,7 @@
|
||||||
import json
|
import json
|
||||||
import MySQLdb
|
import MySQLdb
|
||||||
import MySQLdb.cursors
|
import MySQLdb.cursors
|
||||||
from flask import Flask, make_response, request, render_template
|
from flask import Flask, make_response, request, render_template, jsonify
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
@ -9,8 +9,13 @@ with open("config.json", "r") as f:
|
||||||
config = json.load(f)
|
config = json.load(f)
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
|
@app.route("/home")
|
||||||
def home_index():
|
def home_index():
|
||||||
return render_template("index.html")
|
return render_template("index.html")
|
||||||
|
|
||||||
|
@app.route("/download")
|
||||||
|
def download_index():
|
||||||
|
return render_template("download.html")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app.run(**config["web"])
|
app.run(**config["web"])
|
Loading…
Reference in New Issue
Block a user