From fb6423fd8d2e0068c9c5b5bb8a643ea991e59739 Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Tue, 14 May 2013 13:44:42 +0200 Subject: Speed up page loading on long threads Speed up page loading on threads with many replies by loading the replies asynchronously. Preserve search engine indexation by detecting bots and serving the usual page in one go. --- hyperkitty/templates/threads/participants.html | 14 ++++++++++++++ hyperkitty/templates/threads/replies.html | 11 +++++++++++ hyperkitty/templates/threads/right_col.html | 15 ++++++--------- 3 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 hyperkitty/templates/threads/participants.html create mode 100644 hyperkitty/templates/threads/replies.html (limited to 'hyperkitty/templates/threads') diff --git a/hyperkitty/templates/threads/participants.html b/hyperkitty/templates/threads/participants.html new file mode 100644 index 0000000..b40445b --- /dev/null +++ b/hyperkitty/templates/threads/participants.html @@ -0,0 +1,14 @@ +{% load url from future %} +{% load gravatar %} +{% load hk_generic %} + + participants ({{participants|length}}) + + diff --git a/hyperkitty/templates/threads/replies.html b/hyperkitty/templates/threads/replies.html new file mode 100644 index 0000000..19ee0e2 --- /dev/null +++ b/hyperkitty/templates/threads/replies.html @@ -0,0 +1,11 @@ +{% load url from future %} +{% load hk_generic %} + + {% for email in replies %} +
+ + {% include 'messages/message.html' %} + +
+ {% endfor %} diff --git a/hyperkitty/templates/threads/right_col.html b/hyperkitty/templates/threads/right_col.html index cbc7772..8744f66 100644 --- a/hyperkitty/templates/threads/right_col.html +++ b/hyperkitty/templates/threads/right_col.html @@ -44,15 +44,12 @@
- participants ({{participants|length}}) - + {% if is_bot %} + {% include 'threads/participants.html' %} + {% else %} + participants + Loading... + {% endif %}
-- cgit