fix: Error on entering a document that doesn't exist
This commit is contained in:
parent
99911d025a
commit
0397f8d2d6
|
@ -70,6 +70,10 @@ pre {
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.grayed {
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.editor-toolbar {
|
.editor-toolbar {
|
||||||
border-top: 0px solid #444;
|
border-top: 0px solid #444;
|
||||||
|
|
|
@ -26,9 +26,13 @@
|
||||||
<a href="/{{ path }}?edit">Edit</a>
|
<a href="/{{ path }}?edit">Edit</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% autoescape false %}
|
{% if content is not none %}
|
||||||
{{ markdown(content, extensions=['extra']) }}
|
{% autoescape false %}
|
||||||
{% endautoescape %}
|
{{ markdown(content, extensions=['extra']) }}
|
||||||
|
{% endautoescape %}
|
||||||
|
{% else %}
|
||||||
|
<p class="grayed">This document doesn't exist</p>
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<form method="POST" action="/{{ path }}">
|
<form method="POST" action="/{{ path }}">
|
||||||
<textarea id="markdown-textarea" name="text">{{ content }}</textarea>
|
<textarea id="markdown-textarea" name="text">{{ content }}</textarea>
|
||||||
|
|
Loading…
Reference in New Issue