aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2023-02-01 20:37:52 -0500
committerBobby <[email protected]>2023-02-01 20:37:52 -0500
commitcc2deda835e3700d117e9fc82bbaca3033bb1984 (patch)
treedfa1b1a3de3a330ced94a81f5db11a7a5ecf1edb
parent345592cc92682d836aab0c4cfe2fdbf5b09cdebf (diff)
downloadthatcomputerscientist-cc2deda835e3700d117e9fc82bbaca3033bb1984.tar.xz
thatcomputerscientist-cc2deda835e3700d117e9fc82bbaca3033bb1984.zip
rendering fixes for posts
-rw-r--r--templates/blog/articles.html18
-rw-r--r--templates/blog/home.html9
-rw-r--r--templates/blog/partials/base.html9
-rw-r--r--templates/blog/post.html9
4 files changed, 32 insertions, 13 deletions
diff --git a/templates/blog/articles.html b/templates/blog/articles.html
index 309ef566..8038c8a9 100644
--- a/templates/blog/articles.html
+++ b/templates/blog/articles.html
@@ -8,6 +8,8 @@
<h2 style="margin-top:0px;"> Posts made in Category: {{ category }}</h2>
{% endif %}
+
+{% if posts %}
<form id="filters" method="get">
<span><b>Filters:</b>&nbsp;&nbsp;&nbsp;&nbsp;</span>
<label for="order_by">Order By: </label>
@@ -32,8 +34,6 @@
<span>&nbsp;&nbsp;</span>
<input type="submit" value="Apply" class="button button-special" />
</form>
-
-{% if posts %}
<div id="recent-posts" class="mtctitem">
{% for post in posts %}
<br>
@@ -54,7 +54,6 @@
<br>
{% endfor %}
</div>
-{% endif %}
<div>
<table id="pagination" style="clear: both;">
<tr>
@@ -79,5 +78,16 @@
</tr>
</table>
</div>
-
+<script type="text/javascript" src="http{% if request.is_secure %}s{% endif %}://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full">
+</script>
+<script type="text/x-mathjax-config">
+ MathJax.Hub.Config({
+ tex2jax: {
+ inlineMath: [['$','$'], ['\\(','\\)']],
+ }
+ });
+</script>
+{% else %}
+ <p>No posts found.</p>
+{% endif %}
{% endblock %} \ No newline at end of file
diff --git a/templates/blog/home.html b/templates/blog/home.html
index 95e08043..ee158897 100644
--- a/templates/blog/home.html
+++ b/templates/blog/home.html
@@ -71,6 +71,15 @@
</div>
{% endfor %}
</div>
+<script type="text/javascript" src="http{% if request.is_secure %}s{% endif %}://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full">
+</script>
+<script type="text/x-mathjax-config">
+ MathJax.Hub.Config({
+ tex2jax: {
+ inlineMath: [['$','$'], ['\\(','\\)']],
+ }
+ });
+</script>
{% endif %}
{% endblock %}
diff --git a/templates/blog/partials/base.html b/templates/blog/partials/base.html
index 2b6e2413..2f395b1b 100644
--- a/templates/blog/partials/base.html
+++ b/templates/blog/partials/base.html
@@ -63,13 +63,4 @@
</div>
</div>
</body>
- <script type="text/javascript" src="http{% if request.is_secure %}s{% endif %}://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full">
- </script>
- <script type="text/x-mathjax-config">
- MathJax.Hub.Config({
- tex2jax: {
- inlineMath: [['$','$'], ['\\(','\\)']],
- }
- });
- </script>
</html>
diff --git a/templates/blog/post.html b/templates/blog/post.html
index 42fb78b1..67231db3 100644
--- a/templates/blog/post.html
+++ b/templates/blog/post.html
@@ -109,6 +109,15 @@
<p><em>You must be logged in to leave a comment.</em></p>
</div>
{% endif %}
+<script type="text/javascript" src="http{% if request.is_secure %}s{% endif %}://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full">
+</script>
+<script type="text/x-mathjax-config">
+ MathJax.Hub.Config({
+ tex2jax: {
+ inlineMath: [['$','$'], ['\\(','\\)']],
+ }
+ });
+</script>
<script>
function editComment(id) {
document.getElementById('comment-body-' + id).style.display = 'none';