Add a suggestion form to all documentation pages, so users can submit ideas for improving the documentation.

This commit is contained in:
Dan Helfman 2019-10-10 14:27:48 -07:00
parent 1d37b14356
commit f573c1810a
6 changed files with 59 additions and 1 deletions

4
NEWS
View file

@ -1,3 +1,7 @@
1.3.24.dev0
* Add a suggestion form to all documentation pages, so users can submit ideas for improving the
documentation.
1.3.23 1.3.23
* #174: More detailed error alerting via runtime context available in "on_error" hook. * #174: More detailed error alerting via runtime context available in "on_error" hook.

View file

@ -0,0 +1,18 @@
#suggestion-form textarea {
font-family: sans-serif;
width: 100%;
}
#suggestion-form label {
font-weight: bold;
}
#suggestion-form input[type=email] {
font-size: 16px;
width: 100%;
}
#suggestion-form .form-error {
color: red;
}

View file

@ -0,0 +1,33 @@
<h2>Improve this documentation</h2>
<p>Have an idea on how to make this documentation even better? Send your
feedback below! (But if you need help installing or using borgmatic, please
use our <a href="https://torsion.org/borgmatic/#issues">issue tracker</a>
instead.)</p>
<form id="suggestion-form">
<div><label for="suggestion">Suggestion</label></div>
<textarea id="suggestion" rows="8" cols="60" name="suggestion"></textarea>
<div data-sk-error="suggestion" class="form-error"></div>
<input id="_page" type="hidden" name="_page">
<input id="_subject" type="hidden" name="_subject" value="borgmatic documentation suggestion">
<br />
<label for="email">Email address</label>
<div><input id="email" type="email" name="email" placeholder="Only required if you want a response!"></div>
<div data-sk-error="email" class="form-error"></div>
<br />
<div><button type="submit">Send</button></div>
<br />
</form>
<script>
document.getElementById('_page').value = window.location.href;
window.sk=window.sk||function(){(sk.q=sk.q||[]).push(arguments)};
sk('form', 'init', {
id: '1d536680ab96',
element: '#suggestion-form'
});
</script>
<script defer src="https://js.statickit.com/statickit.js"></script>

View file

@ -11,6 +11,7 @@
{% include 'components/minilink.css' %} {% include 'components/minilink.css' %}
{% include 'components/toc.css' %} {% include 'components/toc.css' %}
{% include 'components/info-blocks.css' %} {% include 'components/info-blocks.css' %}
{% include 'components/suggestion-form.css' %}
{% include 'prism-theme.css' %} {% include 'prism-theme.css' %}
{% include 'asciinema.css' %} {% include 'asciinema.css' %}
{% endset %} {% endset %}

View file

@ -8,5 +8,7 @@ headerClass: elv-header-default
<main class="elv-layout{% if layoutClass %} {{ layoutClass }}{% endif %}"> <main class="elv-layout{% if layoutClass %} {{ layoutClass }}{% endif %}">
<article> <article>
{{ content | safe }} {{ content | safe }}
{% include 'components/suggestion-form.html' %}
</article> </article>
</main> </main>

View file

@ -1,6 +1,6 @@
from setuptools import find_packages, setup from setuptools import find_packages, setup
VERSION = '1.3.23' VERSION = '1.3.24.dev0'
setup( setup(