Add help page
This commit is contained in:
8
main.py
8
main.py
@@ -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()
|
||||
|
||||
@@ -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
19
templates/help.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user