add latex to homepage

This commit is contained in:
Dinh 2020-01-22 16:19:24 -06:00
parent ab7bdf1eef
commit 184fa549e0
3 changed files with 8 additions and 45020 deletions

File diff suppressed because it is too large Load diff

View file

@ -31,7 +31,6 @@ else:
kwargs.setdefault('css', ('pagedown_widget.css',)) kwargs.setdefault('css', ('pagedown_widget.css',))
super(PagedownWidget, self).__init__(*args, **kwargs) super(PagedownWidget, self).__init__(*args, **kwargs)
class AdminPagedownWidget(PagedownWidget, admin_widgets.AdminTextareaWidget): class AdminPagedownWidget(PagedownWidget, admin_widgets.AdminTextareaWidget):
class Media: class Media:
css = {'all': [ css = {'all': [
@ -40,7 +39,6 @@ else:
]} ]}
js = ['admin/js/pagedown.js'] js = ['admin/js/pagedown.js']
class MathJaxPagedownWidget(PagedownWidget): class MathJaxPagedownWidget(PagedownWidget):
class Media: class Media:
js = [ js = [
@ -49,11 +47,9 @@ else:
'pagedown_math.js', 'pagedown_math.js',
] ]
class MathJaxAdminPagedownWidget(AdminPagedownWidget, MathJaxPagedownWidget): class MathJaxAdminPagedownWidget(AdminPagedownWidget, MathJaxPagedownWidget):
pass pass
class HeavyPreviewPageDownWidget(PagedownWidget): class HeavyPreviewPageDownWidget(PagedownWidget):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
kwargs.setdefault('template', 'pagedown.html') kwargs.setdefault('template', 'pagedown.html')
@ -86,7 +82,6 @@ else:
css = {'all': ['dmmd-preview.css']} css = {'all': ['dmmd-preview.css']}
js = ['dmmd-preview.js'] js = ['dmmd-preview.js']
class HeavyPreviewAdminPageDownWidget(AdminPagedownWidget, HeavyPreviewPageDownWidget): class HeavyPreviewAdminPageDownWidget(AdminPagedownWidget, HeavyPreviewPageDownWidget):
class Media: class Media:
css = {'all': [ css = {'all': [

View file

@ -266,3 +266,11 @@
</div> </div>
{% block after_posts %}{% endblock %} {% block after_posts %}{% endblock %}
{% endblock %} {% endblock %}
{% block bodyend %}
{{ super() }}
{% if REQUIRE_JAX %}
{% include "mathjax-load.html" %}
{% endif %}
{% include "comments/math.html" %}
{% endblock %}