diff options
-rw-r--r-- | app/pages/templates/pages/discursive/homepage.html | 20 | ||||
-rw-r--r-- | app/pages/templates/pages/discursive/page_detail.html | 30 | ||||
-rw-r--r-- | app/pages/templates/pages/discursive/page_detail.txt | 7 | ||||
-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.py | 8 | ||||
-rw-r--r-- | design/templates/discursive_base.html | 83 |
8 files changed, 146 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): diff --git a/design/templates/discursive_base.html b/design/templates/discursive_base.html new file mode 100644 index 0000000..7e9b7ff --- /dev/null +++ b/design/templates/discursive_base.html @@ -0,0 +1,83 @@ +{% load static %}<!DOCTYPE html> +<!--[if lt IE 8]> <html class="lte8"> <![endif]--> +<!--[if IE 8]> <html class="ie8 lte8"> <![endif]--> +<!--[if IE 9]> <html class="ie9"> <![endif]--> +<!--[if !IE]><!--> <html lang="en"><!--<![endif]--> +<head> + <title>{% block pagetitle %}{% endblock %}</title> + <meta name="viewport" content="width=device-width"> + <meta name="description" content=""> + <meta property="og:description" content=""> + <meta property="og:site_name" content=""> + <meta property="og:image" content=""> + <link rel="stylesheet" href="/media/screenv1.css?{%now "u"%}" type="text/css"> + {% block extrastyles %}{%endblock%} + <link rel="icon" type="image/png" href=""> + <!--<link rel="manifest" href="/webmanifest.json">--> + <link rel="apple-touch-icon" sizes="256x256" href=""> + {%comment%}{% block jsinclude %}{%endblock%} + <script async src="/media/js/main.pack.js?{%now "u"%}"></script>{%endcomment%} +</head> +<body id="{% block bodyid %}{%endblock%}" class="{% block bodyclass %}{% endblock %}"> + <div class="head-wrapper"> + <header> + <nav class="left"> + <ul> + <li><a href="/" title="">Home</a></li> + </ul> + </nav> + <div class="logo"></div> + <nav class="right {% if request.user.is_anonymous %}nologin{% endif %}"> + <ul> + <li><a href="{% url 'pages' slug='discursive-meditation-history' %}" title="">What is Discursive Meditation?</a></li> + <li><a href="{% url 'pages' slug='discursive-meditation-how-to' %}" title="">How Do I Do It?</a></li>{% if not request.user.is_anonymous %} + {%comment%}<li><a id="account-menu" href="{% url 'clients:settings' %}" title="">Account</a> + <div id="user-menu" class="dropmenu" tabindex="-1"> + <ul id="user-menu-list" class="list-style-none vertical"> + <li><a href="/settings/" class="">Account settings</a></li> + <li><a href="/plans/" class="">Subscription plans</a></li> + </ul> + <ul class="menu-divider list-style-none"> + <li> + <form action="/logout/" method="post">{% csrf_token %} + <input type="hidden" name="a" value="3"> + <button type="submit" value="Log out" class="btn-link">Log out</button> + </form> + </li> + </ul> + </div> + </li>{%endcomment%}{% else %} + {%comment %}<li><a href="{% url 'login' %}" title="" id="overlay-trigger" data-element="#js-overlay-content">Login</a></li> + <li><a href="{% url 'django_registration_register' %}" title="" class="btn">Get Started</a></li>{%endcomment%}{% endif %} + </ul> + </nav> + </header> + </div> + {% block color %}{%endblock%} + <div class="wrapper"> + {%comment%}<ul class="breadcrumb" id="breadcrumbs" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> + <li> + <a href="/" title="home" itemprop="url"><span itemprop="title">Home</span></a> + </li> + {% block breadcrumbs %}{% endblock %} + </ul>{%endcomment%} +{% block content %} +{% endblock %} + </div> + <footer> + <p>©{%comment%}{% now "Y" %}{%endcomment%}2018 discursivemeditation.com</p> + <nav> + <ul> + <li><a href="{% url 'pages' slug='faq' %}" title="">FAQ</a></li> + <li><a href="{% url 'pages' slug='resources' %}" title="">Resources</a></li> + </ul> + </nav> + </footer> + {% block extra %} + {%endblock%} +<script> +document.addEventListener("DOMContentLoaded", function () { + {% block jsdomready %}{%endblock%} +}); +</script> +</body> |