|
@@ -6,6 +6,7 @@
|
|
|
{{ super() }}
|
|
|
<link href="{{ url_for('static', filename='styles/docx/article.css') }}" rel="stylesheet">
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='editor.md/css/editormd.min.css') }}" />
|
|
|
+ <link rel="stylesheet" href="{{ url_for('static', filename='editor.md/css/sons-of-obsidian.css') }}" />
|
|
|
{% endblock %}
|
|
|
|
|
|
{% block content %}
|
|
@@ -16,7 +17,7 @@
|
|
|
<article class="col-12">
|
|
|
<h1> {{ article.title }} <small> {{ article.subtitle }} <small> {{ article.update_time}} / {{ article.create_time}} </small> </small> </h1>
|
|
|
{% for archive in article.archive %}
|
|
|
- <span class="badge badge-info"> {{ archive.name }} </span>
|
|
|
+ <span class="badge bg-info"> {{ archive.name }} </span>
|
|
|
{% endfor %}
|
|
|
<a href="{{ url_for('docx.article_down_page', blog=article.id) }}"> 下载 </a>
|
|
|
<hr>
|
|
@@ -30,13 +31,13 @@
|
|
|
{{ view.content(class="form-control mb-2", style="display:none;") }}
|
|
|
</div>
|
|
|
{% for error in view.content.errors %}
|
|
|
- <small class="text-danger form-text"> {{ error }} </small>
|
|
|
+ <div class="invalid-feedback"> {{ error }} </div>
|
|
|
{% endfor %}
|
|
|
|
|
|
{% if can_update %}
|
|
|
<div id="UpdateModal" class="modal fade" role="dialog" aria-hidden="true">
|
|
|
<div class="modal-dialog">
|
|
|
- <div class="modal-content text-left">
|
|
|
+ <div class="modal-content text-start">
|
|
|
<div class="modal-header">
|
|
|
<h4 class="modal-title"> 确认更新博文吗? </h4>
|
|
|
</div>
|
|
@@ -45,7 +46,7 @@
|
|
|
</div>
|
|
|
<div class="modal-footer">
|
|
|
{{ view.submit(class="btn btn-danger", value="确认") }}
|
|
|
- <button type="button" class="btn btn-outline-dark" data-dismiss="modal">取消</button>
|
|
|
+ <button type="button" class="btn btn-outline-dark" data-bs-dismiss="modal">取消</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -55,7 +56,7 @@
|
|
|
{% if can_update %}
|
|
|
<div id="UpdateArchiveModal" class="modal fade" role="dialog" aria-hidden="true">
|
|
|
<div class="modal-dialog">
|
|
|
- <div class="modal-content text-left">
|
|
|
+ <div class="modal-content text-start">
|
|
|
<div class="modal-header">
|
|
|
<h4 class="modal-title"> 更新博客归档信息? </h4>
|
|
|
</div>
|
|
@@ -63,26 +64,28 @@
|
|
|
<div class="modal-body">
|
|
|
{{ archive.hidden_tag() }}
|
|
|
{{ archive.blog_id() }}
|
|
|
- {{ macro.render_field(archive.archive) }}
|
|
|
+ {{ macro.render_select_field(archive.archive) }}
|
|
|
</div>
|
|
|
<div class="modal-footer">
|
|
|
{{ archive.add(class="btn btn-outline-danger", formaction=url_for("docx.update_archive_page", add='1')) }}
|
|
|
{{ archive.sub(class="btn btn-outline-danger", formaction=url_for("docx.update_archive_page", add='0')) }}
|
|
|
- <button type="button" class="btn btn-outline-dark" data-dismiss="modal">取消</button>
|
|
|
+ <button type="button" class="btn btn-outline-dark" data-bs-dismiss="modal">取消</button>
|
|
|
</div>
|
|
|
</form>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="text-right mb-2">
|
|
|
- <a type="button" class="btn btn-primary" data-toggle="modal" data-target="#UpdateModal"> 更新博文 </a>
|
|
|
- {% if article.top %}
|
|
|
- <a class="btn btn-danger" href="{{ url_for("docx.set_blog_top_page", blog=article.id, top='0') }}"> 取消置顶 </a>
|
|
|
- {% else %}
|
|
|
- <a class="btn btn-danger" href="{{ url_for("docx.set_blog_top_page", blog=article.id, top='1') }}"> 置顶文章 </a>
|
|
|
- {% endif %}
|
|
|
- <a type="button" class="btn btn-outline-danger" data-toggle="modal" data-target="#UpdateArchiveModal"> 更新归档 </a>
|
|
|
+ <div class="text-end mb-2">
|
|
|
+ <div class="btn-group">
|
|
|
+ <a type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#UpdateModal"> 更新博文 </a>
|
|
|
+ {% if article.top %}
|
|
|
+ <a class="btn btn-danger" href="{{ url_for("docx.set_blog_top_page", blog=article.id, top='0') }}"> 取消置顶 </a>
|
|
|
+ {% else %}
|
|
|
+ <a class="btn btn-danger" href="{{ url_for("docx.set_blog_top_page", blog=article.id, top='1') }}"> 置顶文章 </a>
|
|
|
+ {% endif %}
|
|
|
+ <a type="button" class="btn btn-outline-danger" data-bs-toggle="modal" data-bs-target="#UpdateArchiveModal"> 更新归档 </a>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
{% endif %}
|
|
|
</article>
|
|
@@ -94,17 +97,19 @@
|
|
|
<article class="col-12">
|
|
|
<h1 class="mt-3"> 评论 </h1>
|
|
|
|
|
|
- <section class="col-12 text-right">
|
|
|
+ <section class="col-12 text-end">
|
|
|
<form action="{{ url_for('docx.comment_page', blog=article.id) }}" method="post">
|
|
|
{{ form.hidden_tag() }}
|
|
|
- {{ form.content(class="form-control mb-2", rows="3") }}
|
|
|
- {% for error in form.content.errors %}
|
|
|
- <small class="text-danger form-text text-left"> {{ error }} </small>
|
|
|
- {% endfor %}
|
|
|
+ <div>
|
|
|
+ {{ form.content(class="form-control mb-2", rows="3") }}
|
|
|
+ {% for error in form.content.errors %}
|
|
|
+ <div class="invalid-feedback"> {{ error }} </div>
|
|
|
+ {% endfor %}
|
|
|
+ </div>
|
|
|
|
|
|
<div id="CommentModal" class="modal fade" role="dialog" aria-hidden="true">
|
|
|
<div class="modal-dialog">
|
|
|
- <div class="modal-content text-left">
|
|
|
+ <div class="modal-content text-start">
|
|
|
<div class="modal-header">
|
|
|
<h4 class="modal-title" id="CommentModalLabel"> 确认评论? </h4>
|
|
|
</div>
|
|
@@ -113,13 +118,13 @@
|
|
|
</div>
|
|
|
<div class="modal-footer">
|
|
|
{{ form.submit(class="btn btn-danger", value="确认") }}
|
|
|
- <button type="button" class="btn btn-outline-dark" data-dismiss="modal">取消</button>
|
|
|
+ <button type="button" class="btn btn-outline-dark" data-bs-dismiss="modal">取消</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <button type="button" class="btn btn-primary mb-2" data-toggle="modal" data-target="#CommentModal"> 评论 </button>
|
|
|
+ <button type="button" class="btn btn-primary mb-2" data-bs-toggle="modal" data-bs-target="#CommentModal"> 评论 </button>
|
|
|
</form>
|
|
|
</section>
|
|
|
<hr>
|
|
@@ -129,7 +134,7 @@
|
|
|
{% if show_delete %}
|
|
|
<div id="DeleteModal{{comment.id }}" class="modal fade" role="dialog" aria-hidden="true">
|
|
|
<div class="modal-dialog">
|
|
|
- <div class="modal-content text-left">
|
|
|
+ <div class="modal-content text-start">
|
|
|
<div class="modal-header">
|
|
|
<h4 class="modal-title"> 确认删除评论? </h4>
|
|
|
</div>
|
|
@@ -139,7 +144,7 @@
|
|
|
<div class="modal-footer">
|
|
|
<a class="btn btn-danger"
|
|
|
href="{{ url_for("docx.delete_comment_page", comment=comment.id) }}"> 删除 </a>
|
|
|
- <button type="button" class="btn btn-outline-dark" data-dismiss="modal"> 取消 </button>
|
|
|
+ <button type="button" class="btn btn-outline-dark" data-bs-dismiss="modal"> 取消 </button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -157,7 +162,7 @@
|
|
|
|
|
|
{% if show_delete %}
|
|
|
<a class="mb-2"
|
|
|
- data-toggle="modal" data-target="#DeleteModal{{comment.id }}"> × </a>
|
|
|
+ data-bs-toggle="modal" data-bs-target="#DeleteModal{{comment.id }}"> × </a>
|
|
|
{% endif %}
|
|
|
|
|
|
<br>
|
|
@@ -175,6 +180,7 @@
|
|
|
|
|
|
{% block javascript %}
|
|
|
{{ super() }}
|
|
|
+ <script src="https://code.jquery.com/jquery-3.6.1.slim.min.js" integrity="sha256-w8CvhFs7iHNVUtnSP0YKEg00p9Ih13rlL9zGqvLdePA=" crossorigin="anonymous"></script>
|
|
|
<script src="{{ url_for('static', filename='editor.md/editormd.min.js') }}"></script>
|
|
|
<script src="{{ url_for('static', filename='editor.md/lib/marked.min.js') }}"></script>
|
|
|
<script src="{{ url_for('static', filename='editor.md/lib/prettify.min.js') }}"></script>
|