blob: 55da4f64441f4e85b7a453055751e8060e89db01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
{% extends 'src_base.html' %}
{% load typogrify_tags %}
{% load comments %}
{% block pagetitle %}{{object.title|title|smartypants|safe}} luxagraf:src{% endblock %}
{% block metadescription %}{% autoescape on %}{{object.meta_description|striptags|safe}}{% endautoescape %}{% endblock %}
{%block extrahead%}
<link rel="stylesheet" href="/media/src/prism.css" type="text/css" media="screen"/>
{%endblock%}
{% block primary %}
<main role="main">
<article class="h-entry hentry post--article{% with object.get_template_name_display as t %}{%if t == "double" or t == "double-dark" %} post--article--double{%endif%}{%endwith%}" itemscope itemType="http://schema.org/Article">
<header id="header" class="post--header {% with object.get_template_name_display as t %}{%if t == "double" or t == "double-dark" %}post--header--double{%endif%}{%endwith%}">
<h1 class="p-name entry-title post--title" itemprop="headline">{%if object.template_name == 1 or object.template_name == 3 %}{{object.title|safe|smartypants}}{%else%}{{object.title|safe|smartypants|widont}}{%endif%}</h1>
{% if object.slug != 'about' %}<time class="dt-published published dt-updated post--date" datetime="{{object.pub_date|date:'c'}}" itemprop="datePublished">{{object.pub_date|date:"F"}} <span>{{object.pub_date|date:"j, Y"}}</span></time>{%endif%}
{% if object.topics.all %}<span class="src-topics">Topics: {% for topic in object.topics.all%} <a href="/src/topic/{{topic.slug}}">{{topic.name}}</a>{%if forloop.last%}{%else%}, {%endif%}{%endfor%}</span>{%endif%}
<p class="p-author author hide" itemprop="author"><span class="byline-author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Scott Gilbertson</span></span></p>
</header>
<div id="article" class="e-content entry-content post--body post--body--{% with object.template_name as t %}{%if t == 0 or t == 2 %}single{%endif%}{%if t == 1 or t == 3 %}double{%endif%}{%endwith%}" itemprop="articleBody">
{{object.body_html|safe|smartypants|widont}}
</div>
</article>
{% if object.slug != 'about' %}
{% with object.get_next_published as next %}
{% with object.get_previous_published as prev %}
<nav id="page-navigation">
<ul>{% if prev%}
<li id="prev"><span class="bl">Previous:</span>
<a href="{{ prev.get_absolute_url }}" rel="prev" title=" {{prev.title}}">{{prev.title|safe}}</a>
</li>{%endif%}{% if next%}
<li id="next"><span class="bl">Next:</span>
<a href="{{ next.get_absolute_url }}" rel="next" title=" {{next.title}}">{{next.title|safe}}</a>
</li>{%endif%}
</ul>
</nav>{%endwith%}{%endwith%}
{%endif%}
</main>
{% if object.slug != 'about' %}
{% if object.enable_comments %}
{% get_comment_count for object as comment_count %}
{%if comment_count > 0 %}
<p class="comments--header">{{comment_count}} Comment{{ comment_count|pluralize }}</p>
{% render_comment_list for object %}
{%endif%}
{% render_comment_form for object %}
{% else %}
<p class="comments--header" style="text-align: center">Sorry, comments have been disabled for this post.</p>
{%endif%}
{%endif%}
{% endblock %}
{% block js %}
<script type="text/javascript">
window.onload = function() {
{% if object.enable_comments %}
{% get_comment_count for object as comment_count %}
{%if comment_count > 0 %}
//delay loading of gravatar images using noscript 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]);
}
{%endif%}
{%endif%}
{% with object.get_template_name_display as t %}{%if t == "single" or t == "single-dark" %}
createMap();
var open = false;
{%endif%}{%endwith%}
}
</script>
{% if object.has_code %}
<script src="/media/src/prism.js"></script>
{%endif %}
{% endblock %}
|