summaryrefslogtreecommitdiff
path: root/app/pages/templates
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2020-01-27 20:37:10 -0500
committerluxagraf <sng@luxagraf.net>2020-01-27 20:37:10 -0500
commit6e8b62d8c38f6ca366f240ea45ad738ebfd62943 (patch)
treeb8c695cdd5c7f1f7729fa6750ed49c1eb2eae3e8 /app/pages/templates
parent09abece4982e8dceabe1dd8d678639205a4a6208 (diff)
abstracted breadcrumbs into seperate template
Diffstat (limited to 'app/pages/templates')
-rw-r--r--app/pages/templates/pages/page_detail.html37
-rw-r--r--app/pages/templates/pages/page_detail.txt8
2 files changed, 45 insertions, 0 deletions
diff --git a/app/pages/templates/pages/page_detail.html b/app/pages/templates/pages/page_detail.html
new file mode 100644
index 0000000..4644386
--- /dev/null
+++ b/app/pages/templates/pages/page_detail.html
@@ -0,0 +1,37 @@
+{% extends 'base.html' %}
+{% load typogrify_tags %}
+{% load comments %}
+{% block pagetitle %}Luxagraf | {{object.title}}{% endblock %}
+{% block metadescription %}{{object.meta_description}}{% endblock %}
+{%block htmlclass%}class="detail"{%endblock%}
+{%block bodyid%}id="{{object.title|slugify}}"{%endblock%}
+{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %}
+{% block primary %}<main>
+ <article>
+ <header class="post-header">
+ <h1 class="post-title">{{object.title}}</h1>
+ {%if object.sub_title %}<h2 class="post-subtitle">{{object.sub_title}}</h2>{%endif%}
+ </header>
+ <div class="post-article">
+ {{object.body_html|safe|smartypants|widont}}
+ </div>
+ </article>
+ {% 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%}
+<div class="comment--form--wrapper {%if comment_count > 0%}comment-form-border{%endif%}">
+{% render_comment_form for object %}
+</div>
+{%endif%}
+ </main>
+{% endblock %}
+{% block js %}
+<script src="/media/js/lightbox.js" type="text/javascript"></script>
+<script>var opts={captions:true,onload:function(){var im=document.getElementById("jslghtbx-contentwrapper");var link=im.appendChild(document.createElement('a'))
+link.href=im.firstChild.src;link.innerHTML="open ";link.target="_blank";link.setAttribute('class','p-link');im.appendChild(link);}};var lightbox=new Lightbox();lightbox.load(opts);</script>
+{% endblock %}
+
+
diff --git a/app/pages/templates/pages/page_detail.txt b/app/pages/templates/pages/page_detail.txt
new file mode 100644
index 0000000..547ce79
--- /dev/null
+++ b/app/pages/templates/pages/page_detail.txt
@@ -0,0 +1,8 @@
+{{object.title|safe}}
+{% for letter in object.title %}={%endfor%}
+
+ by Scott Gilbertson
+ <{{SITE_URL}}{{object.get_absolute_url}}>
+ {{object.pub_date|date:"l, d F Y"}}
+
+{{object.body_markdown|safe}}