forked from MarseyWorld/MarseyWorld
master
parent
c2e5fd44dd
commit
66372d8a95
|
@ -36,12 +36,7 @@ def terms(v):
|
|||
@app.get('/sidebar')
|
||||
@auth_required
|
||||
def sidebar(v):
|
||||
|
||||
if not path.exists(f'files/templates/sidebar_{site_name}.html'): abort(404)
|
||||
|
||||
with open(f'files/templates/sidebar_{site_name}.html', 'r') as f: sidebar = f.read()
|
||||
|
||||
return render_template('sidebar.html', sidebar=sidebar, v=v)
|
||||
return render_template('sidebar.html', v=v)
|
||||
|
||||
|
||||
@app.get("/stats")
|
||||
|
|
|
@ -14,7 +14,12 @@
|
|||
<h1 class="text-muted text-uppercase">{{'SITE_NAME'|app_config}} Sidebar{% if v and v.admin_level > 2 %} <a href="/admin/sidebar" class="btn btn-link text-lowercase"><i class="far fa-fw fa-pencil"></i> Edit sidebar</a>{% endif %}</h5>
|
||||
|
||||
<div id="sidebar" class="my-3">
|
||||
{{ sidebar | safe }}
|
||||
{% include "sidebar_" + SITE_NAME + ".html" %}
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.sidebar {
|
||||
display:block!important;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue