summaryrefslogtreecommitdiff
path: root/design/templates/details/entry.html
diff options
context:
space:
mode:
Diffstat (limited to 'design/templates/details/entry.html')
-rw-r--r--design/templates/details/entry.html43
1 files changed, 25 insertions, 18 deletions
diff --git a/design/templates/details/entry.html b/design/templates/details/entry.html
index b2be14d..948a9b8 100644
--- a/design/templates/details/entry.html
+++ b/design/templates/details/entry.html
@@ -1,5 +1,6 @@
{% extends 'base.html' %}
{% load typogrify_tags %}
+{% load comments %}
{% block pagetitle %}{{object.title|title|smartypants|safe}} - Luxagraf, Writing{%comment%}{% if object.country_name == "United States" %}{{object.location_name|smartypants|safe}}, {{object.state_name}}{%else%}{{object.location_name|smartypants|safe}}, {{object.country_name}}{%endif%}{%endcomment%}{% endblock %}
@@ -45,29 +46,35 @@ class="{%if t == 0 or t == 2 %}single{%endif%}{%if t == 1 or t == 3 %}double{%en
</li>{%endif%}
</ul>
</nav>{%endwith%}{%endwith%}
- {%comment%}
- {% load comments %}
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}fluent_comments/css/ajaxcomments.css" />
-<script src="{{MEDIA_URL}}js/jquery.js" type="text/javascript"></script>
-<script type="text/javascript" src="{{ STATIC_URL }}fluent_comments/js/ajaxcomments.js"></script>
-
-{% render_comment_list for object %}
-{% render_comment_form for object %}
- {%endcomment%}
- {%comment%}
- <section id="comments">
- <h4><a class="disqus-link-count" href="{{object.get_absolute_url}}#disqus_thread">Comments</a></h4>
- <div id="disqus_thread"></div><script type="text/javascript" src="http://disqus.com/forums/luxagraf/embed.js"></script><noscript><a href="http://luxagraf.disqus.com/?url=ref">View the discussion thread.</a></noscript><a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
- </section>
- {%endcomment%}
- </main>
- <div class="mailing-list--wrapper">
+ {% comment %} <div class="mailing-list--wrapper">
<h5>If you enjoyed this, you should join the mailing&nbsp;list&hellip;</h5>
{% include 'mailing_list.html' %}
- </div>
+ </div> {% endcomment %}
+ </main>
+
+{% get_comment_count for object as comment_count %}.
+{%if comment_count > 0%}
+<p class="comments--header">{{comment_count}} Comments</p>
+{% render_comment_list for object %}
+{%endif%}
+{% render_comment_form for object %}
{% endblock %}
{% block js %}
+ <script type="text/javascript">
+window.onload = function() {
+ //delay loading of gravatar images using nsoscript data-hash attribute
+ dataattr = document.getElementsByClassName("datahashloader");
+ for(var i=0; i<dataattr.length; i++) {
+ var c = dataattr[i].parentNode;
+ var img = document.createElement("img");
+ img.src = 'https://images.luxagraf.net/gravcache/' + dataattr[i].getAttribute('data-hash') + '.jpg';
+ img.className += "gravatar";
+ c.insertBefore(img, c.childNodes[3]);
+
+ }
+}
+ </script>
{% with object.template_name as t %}{%if t == 1 or t == 3 %}
<script src="{{MEDIA_URL}}js/hyphenate.min.js" type="text/javascript"></script>
{%endif%}{%endwith%}{%endblock%}