Add help page

This commit is contained in:
David Hoppenbrouwers
2022-10-10 19:01:24 +02:00
parent d4baefa573
commit db4f4e2a4d
3 changed files with 29 additions and 0 deletions

View File

@@ -539,6 +539,14 @@ def admin_restart():
restart()
return redirect(url_for('admin'))
# TODO can probably be a static-esque page, maybe?
@app.route('/help/')
def help():
return render_template(
'help.html',
title = 'Help',
user = get_user(),
)
def _admin_check():
user = get_user()

View File

@@ -27,6 +27,8 @@
{%- endif -%}
<a href="{{ url_for('login') }}">Login</a>
{%- endif -%}
<span> | </span>
<a href="{{ url_for('help') }}">Help</a>
</nav>
<main>
<h1>{{ title }}</h1>

19
templates/help.html Normal file
View File

@@ -0,0 +1,19 @@
{% extends 'base.html' %}
{% block content %}
<h2>Formatting</h2>
<ul>
<li>
Prepend two spaces to format code, e.g.
<div>{{ minimd(' This is code\n More code') | safe }}</div>
</li>
<li>
Lists, starting with '- ' or '0.', '1.' ... automatically have linebreaks added.
e.g.
<div>{{ minimd('- Item A\n- Item B') | safe }}</div>
Note that there must be a single space between '-' and the rest of the line.
</li>
<li>
Words starting with 'http://' or 'https://' are automatically turned into links.
</li>
</ul>
{% endblock %}