v1.4.0: fix #43, #31, #29, #49, #33 + shared templating

This commit is contained in:
2026-05-20 20:08:25 +03:00
parent ca4d00c895
commit 64991f0228
63 changed files with 5005 additions and 45 deletions
@@ -0,0 +1,29 @@
{% extends "page.html" %}
{% block breadcrumb %}<a href="/service/documents/">Документация</a> / Редактирование{% endblock %}
{% block page_actions %}<a href="/service/documents/{{ doc.filename | replace('.md', '') }}" class="btn btn-secondary btn-sm">← Назад</a>{% endblock %}
{% block page_content %}
<div class="card" style="padding-bottom:0">
<form method="post" action="/service/documents/{{ doc.filename | replace('.md', '') }}/edit">
<div class="form-group" style="margin-bottom:0">
<textarea id="editor" name="content">{{ content }}</textarea>
</div>
<div class="form-actions edit-form-actions">
<button type="submit" class="btn btn-primary">Сохранить</button>
<a href="/service/documents/{{ doc.filename | replace('.md', '') }}" class="btn btn-secondary">Отмена</a>
</div>
</form>
</div>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/easymde/dist/easymde.min.css">
<script src="https://cdn.jsdelivr.net/npm/easymde/dist/easymde.min.js"></script>
<script>
const easyMDE = new EasyMDE({
element: document.getElementById('editor'),
spellChecker: false,
autosave: {
enabled: true,
uniqueId: "{{ doc.filename }}",
delay: 1000,
},
});
</script>
{% endblock %}