mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-09 22:47: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;
|
color: #7ac;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor-toolbar {
|
.editor-toolbar, .editor-toolbar.fullscreen {
|
||||||
background-color: #333 !important;
|
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 {
|
.editor-toolbar button {
|
||||||
background-color: #222 !important;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor-preview-side {
|
.editor-toolbar button.active, .editor-toolbar button:hover {
|
||||||
background-color: #222 !important;
|
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/jquery.min.js"></script>
|
||||||
<script src="/static/popper.min.js"></script>
|
<script src="/static/popper.min.js"></script>
|
||||||
<script src="/static/bootstrap.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 %}
|
{% block scriptextra %}{% endblock %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
<form method="post" action="{{ url_for('thread_page', id=thread.id)}}" class="card-body">
|
<form method="post" action="{{ url_for('thread_page', id=thread.id)}}" class="card-body">
|
||||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
<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" />
|
<input class="btn btn-primary" type="submit" value="Comment" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -11,13 +11,6 @@
|
|||||||
|
|
||||||
{% block scriptextra %}
|
{% block scriptextra %}
|
||||||
{{ form_scripts() }}
|
{{ 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 %}
|
{% if enable_wizard %}
|
||||||
<script src="/static/url.min.js"></script>
|
<script src="/static/url.min.js"></script>
|
||||||
<script src="/static/polltask.js"></script>
|
<script src="/static/polltask.js"></script>
|
||||||
@ -54,7 +47,7 @@
|
|||||||
{{ render_field(form.name, class_="pkg_meta") }}
|
{{ render_field(form.name, class_="pkg_meta") }}
|
||||||
{{ render_field(form.title, class_="pkg_meta") }}
|
{{ render_field(form.title, class_="pkg_meta") }}
|
||||||
{{ render_field(form.shortDesc, 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") }}
|
{{ render_multiselect_field(form.tags, class_="pkg_meta") }}
|
||||||
<div class="pkg_meta">
|
<div class="pkg_meta">
|
||||||
{{ render_field(form.license, class_="not_txp") }}
|
{{ render_field(form.license, class_="not_txp") }}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<a name="reply"></a>
|
<a name="reply"></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user