From 1b33d099958c697574018821fc83d882c5924773 Mon Sep 17 00:00:00 2001 From: Yo Mama Date: Tue, 28 Sep 2021 01:21:53 +0200 Subject: [PATCH] Make the new comments counts more locally included instead of being included on all the pages --- files/templates/comments.html | 2 + files/templates/default.html | 44 ---------- .../templates/embeds/new_comments_count.html | 80 +++++++++++++++++++ files/templates/submission.html | 2 + files/templates/submission_listing.html | 2 + 5 files changed, 86 insertions(+), 44 deletions(-) create mode 100644 files/templates/embeds/new_comments_count.html diff --git a/files/templates/comments.html b/files/templates/comments.html index 3875c0c21d..357e7e6e6a 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -9,6 +9,8 @@ {% endif %} +{% include 'embeds/new_comments_count.html' %} + - {% endif %} diff --git a/files/templates/embeds/new_comments_count.html b/files/templates/embeds/new_comments_count.html new file mode 100644 index 0000000000..c2adf6acb1 --- /dev/null +++ b/files/templates/embeds/new_comments_count.html @@ -0,0 +1,80 @@ + diff --git a/files/templates/submission.html b/files/templates/submission.html index e639c5d6f4..3585c3535d 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -64,6 +64,8 @@ {% endif %} +{% include 'embeds/new_comments_count.html' %} + diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index 365d203a2e..209f341af5 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -15,6 +15,8 @@ }); +{% include 'embeds/new_comments_count.html' %} + {% for p in listing %} {% set ups=p.upvotes %}