summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/pages/templates/pages/discursive/homepage.html20
-rw-r--r--app/pages/templates/pages/discursive/page_detail.html30
-rw-r--r--app/pages/templates/pages/discursive/page_detail.txt7
-rw-r--r--app/pages/templates/pages/luxagraf/homepage.html (renamed from app/pages/templates/pages/homepage.html)0
-rw-r--r--app/pages/templates/pages/luxagraf/page_detail.html (renamed from app/pages/templates/pages/page_detail.html)0
-rw-r--r--app/pages/templates/pages/luxagraf/page_detail.txt (renamed from app/pages/templates/pages/page_detail.txt)0
-rw-r--r--app/pages/views.py8
7 files changed, 63 insertions, 2 deletions
diff --git a/app/pages/templates/pages/discursive/homepage.html b/app/pages/templates/pages/discursive/homepage.html
new file mode 100644
index 0000000..68490ba
--- /dev/null
+++ b/app/pages/templates/pages/discursive/homepage.html
@@ -0,0 +1,20 @@
+{% extends 'discursive_base.html' %}
+{% load typogrify_tags %}
+{% load comments %}
+{% block pagetitle %}Learn Discursive Meditation{% endblock %}
+{% block metadescription %}{{object.meta_description}}{% endblock %}
+{%block bodyclass%}detail{%endblock%}
+{%block bodyid%}{%endblock%}
+{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %}
+{% block content %}<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>
+ </main>
+{% endblock %}
diff --git a/app/pages/templates/pages/discursive/page_detail.html b/app/pages/templates/pages/discursive/page_detail.html
new file mode 100644
index 0000000..8941cd2
--- /dev/null
+++ b/app/pages/templates/pages/discursive/page_detail.html
@@ -0,0 +1,30 @@
+{% extends 'discursive_base.html' %}
+{% load typogrify_tags %}
+{% load comments %}
+{% block pagetitle %}{{object.title}}{% endblock %}
+{% block metadescription %}{{object.meta_description}}{% endblock %}
+{%block htmlclass%}class="detail"{%endblock%}
+{%block bodyid%}{{object.title|slugify}}{%endblock%}
+{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %}
+{% block content %}<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 %}
diff --git a/app/pages/templates/pages/discursive/page_detail.txt b/app/pages/templates/pages/discursive/page_detail.txt
new file mode 100644
index 0000000..bbeb715
--- /dev/null
+++ b/app/pages/templates/pages/discursive/page_detail.txt
@@ -0,0 +1,7 @@
+{{object.title|safe}}
+{% for letter in object.title %}={%endfor%}
+
+ <https://{{object.site.domain}}{{object.get_absolute_url}}>
+ {{object.pub_date|date:"l, d F Y"}}
+
+{{object.body_markdown|safe}}
diff --git a/app/pages/templates/pages/homepage.html b/app/pages/templates/pages/luxagraf/homepage.html
index c8075ea..c8075ea 100644
--- a/app/pages/templates/pages/homepage.html
+++ b/app/pages/templates/pages/luxagraf/homepage.html
diff --git a/app/pages/templates/pages/page_detail.html b/app/pages/templates/pages/luxagraf/page_detail.html
index 4644386..4644386 100644
--- a/app/pages/templates/pages/page_detail.html
+++ b/app/pages/templates/pages/luxagraf/page_detail.html
diff --git a/app/pages/templates/pages/page_detail.txt b/app/pages/templates/pages/luxagraf/page_detail.txt
index 547ce79..547ce79 100644
--- a/app/pages/templates/pages/page_detail.txt
+++ b/app/pages/templates/pages/luxagraf/page_detail.txt
diff --git a/app/pages/views.py b/app/pages/views.py
index ed8d380..1356729 100644
--- a/app/pages/views.py
+++ b/app/pages/views.py
@@ -11,13 +11,17 @@ class PageDetailView(LuxDetailView):
def get_template_names(self):
obj = self.get_object()
- return ["pages/%s.html" % obj.slug, 'pages/page_detail.html']
+ return ["pages/%s/%s.html" % (obj.site.display_name, obj.slug), \
+ 'pages/%spage_detail.html'% obj.site.display_name]
class PageDetailTXTView(LuxDetailView):
model = Page
slug_field = "slug"
- template_name = "pages/page_detail.txt"
+
+ def get_template_names(self):
+ obj = self.get_object()
+ return 'pages/%spage_detail.txt'% obj.site.display_name
class HomePageList(DetailView):