From 8e5000e31396debf13da969012d1c47886c37524 Mon Sep 17 00:00:00 2001 From: Bobby Date: Fri, 10 Mar 2023 00:00:50 -0500 Subject: DRY improvements --- templates/blog/activity.html | 34 +----------------------------- templates/blog/home.html | 36 +------------------------------- templates/blog/partials/mathjax.html | 39 +++++++++++++++++++++++++++++++++++ templates/blog/post.html | 40 ++++++------------------------------ 4 files changed, 47 insertions(+), 102 deletions(-) create mode 100644 templates/blog/partials/mathjax.html diff --git a/templates/blog/activity.html b/templates/blog/activity.html index dce9256f..6c3d99f2 100644 --- a/templates/blog/activity.html +++ b/templates/blog/activity.html @@ -52,38 +52,6 @@ {% endif %} - - +{% include 'blog/partials/mathjax.html' %} {% endblock %} diff --git a/templates/blog/home.html b/templates/blog/home.html index e07440a4..eba8c4f9 100644 --- a/templates/blog/home.html +++ b/templates/blog/home.html @@ -15,8 +15,6 @@ - - {% if announcements is not None %}

@@ -71,39 +69,7 @@
{% endfor %} - - +{% include 'blog/partials/mathjax.html' %} {% endif %} {% endblock %} diff --git a/templates/blog/partials/mathjax.html b/templates/blog/partials/mathjax.html new file mode 100644 index 00000000..f580c4f5 --- /dev/null +++ b/templates/blog/partials/mathjax.html @@ -0,0 +1,39 @@ +{% load static %} + + \ No newline at end of file diff --git a/templates/blog/post.html b/templates/blog/post.html index 80c7d625..2cd87644 100644 --- a/templates/blog/post.html +++ b/templates/blog/post.html @@ -15,7 +15,6 @@
{{ post.body | safe }}
-
{% if comments %}

Comments

@@ -99,6 +98,11 @@   shortkey: Ctrl or Cmd + K

+
  • Wrap text in double dollar sign ($$) to make it a math block and single dollar sign ($) to make it inline math. You can use LaTeX syntax. +
    +   e.g. $$\frac{1}{2}$$ or $\frac{1}{2}$ +

    +
  • Any links, images or other markup will be kept as plain text. Also, free speech is good and all, but please keep it civil. Sufficient JavaScript support will be required to bind shortkeys. Please type the markup manually if you are on an older browser.

    @@ -109,39 +113,7 @@

    You must be logged in to leave a comment.

    {% endif %} - - +{% include 'blog/partials/mathjax.html' %}