diff --git a/judge/views/markdown_editor.py b/judge/views/markdown_editor.py index 395f9dc..a014ba6 100644 --- a/judge/views/markdown_editor.py +++ b/judge/views/markdown_editor.py @@ -1,13 +1,6 @@ -# from django.contrib.auth.decorators import login_required from django.views import View -from django.utils.timezone import now from django.shortcuts import render -from django.db.models import BooleanField, Value -from django.middleware.csrf import get_token -from .preview import BlogMarkdownPreviewView - - -# __all__ = ["MarkdownEditor"] +from django.utils.translation import gettext_lazy as _ class MarkdownEditor(View): @@ -16,6 +9,6 @@ class MarkdownEditor(View): request, "markdown_editor/markdown_editor.html", { - "title": ("Markdown Editor"), + "title": _("Markdown Editor"), }, ) diff --git a/locale/vi/LC_MESSAGES/django.po b/locale/vi/LC_MESSAGES/django.po index a4dde83..62e0e49 100644 --- a/locale/vi/LC_MESSAGES/django.po +++ b/locale/vi/LC_MESSAGES/django.po @@ -130,6 +130,10 @@ msgstr "Thể thức" msgid "Rating" msgstr "" +#: templates/markdown_editor/markdown_editor.html:103 +msgid "Insert Image" +msgstr "Chèn hình ảnh" + #: judge/admin/contest.py:201 msgid "Access" msgstr "Truy cập" diff --git a/locale/vi/LC_MESSAGES/dmoj-user.po b/locale/vi/LC_MESSAGES/dmoj-user.po index ffd36e9..d754ca9 100644 --- a/locale/vi/LC_MESSAGES/dmoj-user.po +++ b/locale/vi/LC_MESSAGES/dmoj-user.po @@ -39,6 +39,9 @@ msgstr "Đăng ký tên" msgid "Report" msgstr "Báo cáo" +msgid "Insert Image" +msgstr "Chèn hình ảnh" + msgid "2sat" msgstr "" diff --git a/templates/markdown_editor/markdown_editor.html b/templates/markdown_editor/markdown_editor.html index b78e03b..110cde7 100644 --- a/templates/markdown_editor/markdown_editor.html +++ b/templates/markdown_editor/markdown_editor.html @@ -25,10 +25,10 @@ width: 51%; } .wmd-input { - height: 678px; + height: calc(100vh - 146px); } .right-markdown{ - height: 725px; + height: calc(100vh - 100px); overflow-y: scroll; } @@ -87,44 +87,42 @@
-
- - -
-
-
-
- -
-
-
Update Preview
-
-
-
-

Insert Image

-
-
- - -
-
-
-
- - -
-
-
-
- - + + +
+
+
+
+ +
+
+
Update Preview
+
+
+
+

{{_('Insert Image')}}

+
+
+ +
-
-
- +
+
+ + +
+
+
+
+ + +
+
+
+
-
+
{% endblock %}