version advance + some refactoring

This commit is contained in:
Yusur 2023-07-12 16:28:59 +02:00
parent ded90d1ac4
commit 910e01b691
6 changed files with 49 additions and 72 deletions

View file

@ -12,19 +12,6 @@
{% else %}
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
{% endif %}
{% if math_version and katex_url %}
<link rel="stylesheet" href="{{ katex_url }}" />
<style type="text/css">
.katex img {
object-fit: fill;
padding: unset;
display: block;
position: absolute;
width: 100%;
height: inherit;
}
</style>
{% endif %}
{% block json_info %}{% endblock %}
</head>
<body {% if request.cookies.get('dark') == '1' %}class="dark"{% endif %}>

View file

@ -45,9 +45,6 @@
{% if not pl_readonly %}
<div class="pre-text-input">
<p>This editor is using Markdown for text formatting (e.g. bold, italic, headers and tables). <a href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet" rel="nofollow">More info on Markdown</a>.</p>
{% if math_version and pl_enablemath %}
<p>Math with KaTeX is <mark>enabled</mark>. <a href="https://katex.org/docs/supported.html">KaTeX guide</a></p>
{% endif %}
</div>
<div class="over-text-input"></div>
{% else %}
@ -68,10 +65,6 @@
<input type="text" name="comment" value="{{ pl_comment }}" placeholder="{{ T('write-a-comment') }}" />
</div>
<h3>Advanced options</h3>
<div>
<input type="checkbox" id="CB__enablemath" name="enablemath" {% if math_version and pl_enablemath %}checked=""{% elif not math_version %}disabled=""{% endif %}>
<label for="CB__enablemath">Enable math expressions parsing {% if not math_version %}(disabled for this instance){% endif %}</label>
</div>
{% if pl_owner_is_current_user %}
<div>
<input type="checkbox" id="CB__lockpage" name="lockpage" {% if pl_is_locked %}checked=""{% endif %}>

View file

@ -9,7 +9,7 @@
{% block json_info %}<script>window.page_info={{ p.js_info()|tojson|safe }};</script>{% endblock %}
{% set html_and_toc = rev.html_and_toc(math = request.args.get('math') not in ['0', 'false', 'no', 'off']) %}
{% set html_and_toc = rev.html_and_toc() %}
{% block content %}
<article>