mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Aggiunta pagina principale per le wiki
This commit is contained in:
parent
19a1f98f1f
commit
e0428bb87b
2 changed files with 33 additions and 0 deletions
25
templates/wikihome.html
Normal file
25
templates/wikihome.html
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block pagetitle %}
|
||||||
|
Elenco delle Wiki
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
<h1>
|
||||||
|
Royal Wiki
|
||||||
|
</h1>
|
||||||
|
<div class="wiki-home">
|
||||||
|
<div class="box">
|
||||||
|
<div class="upper-box">
|
||||||
|
Pagine Wiki
|
||||||
|
</div>
|
||||||
|
<div class="lower-box">
|
||||||
|
<ul>
|
||||||
|
{% for page in wiki_pages %}
|
||||||
|
<li><a href="/wiki/{{ page.key }}">{{ page.key }}</a></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
|
@ -228,6 +228,14 @@ def page_game(name: str):
|
||||||
return render_template("game.html", minis=query, game_name=game_name, game_short_name=name, config=config)
|
return render_template("game.html", minis=query, game_name=game_name, game_short_name=name, config=config)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/wiki")
|
||||||
|
def page_wikihome():
|
||||||
|
db_session = db.Session()
|
||||||
|
wiki_pages = db_session.query(db.WikiEntry).order_by(db.WikiEntry.key).all()
|
||||||
|
db_session.close()
|
||||||
|
return render_template("wikihome.html", wiki_pages=wiki_pages, config=config)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/wiki/<key>", methods=["GET", "POST"])
|
@app.route("/wiki/<key>", methods=["GET", "POST"])
|
||||||
def page_wiki(key: str):
|
def page_wiki(key: str):
|
||||||
db_session = db.Session()
|
db_session = db.Session()
|
||||||
|
|
Loading…
Reference in a new issue