mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-09 14:37:36 +01:00
Improve markdown editor style, switch to EasyMDE, add to comment reply fields
This commit is contained in:
parent
a7fcce4448
commit
86566bcd39
7
app/public/static/easymde.min.css
vendored
Normal file
7
app/public/static/easymde.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
app/public/static/easymde.min.js
vendored
Normal file
7
app/public/static/easymde.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
app/public/static/simplemde.min.css
vendored
4
app/public/static/simplemde.min.css
vendored
File diff suppressed because one or more lines are too long
15
app/public/static/simplemde.min.js
vendored
15
app/public/static/simplemde.min.js
vendored
File diff suppressed because one or more lines are too long
@ -80,14 +80,32 @@
|
||||
color: #7ac;
|
||||
}
|
||||
|
||||
.editor-toolbar {
|
||||
background-color: #333 !important;
|
||||
.editor-toolbar, .editor-toolbar.fullscreen {
|
||||
margin-bottom: 0 !important;
|
||||
background-color: #444 !important;
|
||||
border: none !important;
|
||||
border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0 !important;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.125) !important;
|
||||
}
|
||||
|
||||
.CodeMirror {
|
||||
background-color: #222 !important;
|
||||
.editor-toolbar button {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.editor-preview-side {
|
||||
background-color: #222 !important;
|
||||
.editor-toolbar button.active, .editor-toolbar button:hover {
|
||||
background: #375a7f !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.editor-toolbar.fullscreen::before, .editor-toolbar.fullscreen::after {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
// .CodeMirror {
|
||||
// background-color: #222 !important;
|
||||
// }
|
||||
|
||||
.editor-preview-side, .editor-preview {
|
||||
background-color: #222 !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
@ -125,6 +125,13 @@
|
||||
<script src="/static/jquery.min.js"></script>
|
||||
<script src="/static/popper.min.js"></script>
|
||||
<script src="/static/bootstrap.min.js"></script>
|
||||
<script src="/static/easymde.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/static/easymde.min.css">
|
||||
<script>
|
||||
$("textarea.markdown").each(function() {
|
||||
new EasyMDE({ element: this, hideIcons: ["image"] });
|
||||
})
|
||||
</script>
|
||||
{% block scriptextra %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
@ -44,7 +44,7 @@
|
||||
|
||||
<form method="post" action="{{ url_for('thread_page', id=thread.id)}}" class="card-body">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<textarea class="form-control" required maxlength=500 name="comment" placeholder="Markdown supported"></textarea><br />
|
||||
<textarea class="form-control markdown" required maxlength=500 name="comment"></textarea><br />
|
||||
<input class="btn btn-primary" type="submit" value="Comment" />
|
||||
</form>
|
||||
</div>
|
||||
|
@ -11,13 +11,6 @@
|
||||
|
||||
{% block scriptextra %}
|
||||
{{ form_scripts() }}
|
||||
|
||||
<script src="/static/simplemde.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/static/simplemde.min.css">
|
||||
<script>
|
||||
var simplemde = new SimpleMDE({ element: $("#desc")[0] });
|
||||
</script>
|
||||
|
||||
{% if enable_wizard %}
|
||||
<script src="/static/url.min.js"></script>
|
||||
<script src="/static/polltask.js"></script>
|
||||
@ -54,7 +47,7 @@
|
||||
{{ render_field(form.name, class_="pkg_meta") }}
|
||||
{{ render_field(form.title, class_="pkg_meta") }}
|
||||
{{ render_field(form.shortDesc, class_="pkg_meta") }}
|
||||
{{ render_field(form.desc, class_="pkg_meta") }}
|
||||
{{ render_field(form.desc, class_="pkg_meta", fieldclass="form-control markdown") }}
|
||||
{{ render_multiselect_field(form.tags, class_="pkg_meta") }}
|
||||
<div class="pkg_meta">
|
||||
{{ render_field(form.license, class_="not_txp") }}
|
||||
|
@ -22,7 +22,7 @@
|
||||
<a name="reply"></a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{ render_field(form.comment, label="", class_="m-0") }}
|
||||
{{ render_field(form.comment, label="", class_="m-0", fieldclass="form-control markdown") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user