summaryrefslogtreecommitdiff
path: root/app/fieldnotes
diff options
context:
space:
mode:
Diffstat (limited to 'app/fieldnotes')
-rw-r--r--app/fieldnotes/templates/fieldnotes/fieldnote_detail.html11
-rw-r--r--app/fieldnotes/templates/fieldnotes/fieldnote_list.html9
-rw-r--r--app/fieldnotes/urls.py2
-rw-r--r--app/fieldnotes/views.py5
4 files changed, 8 insertions, 19 deletions
diff --git a/app/fieldnotes/templates/fieldnotes/fieldnote_detail.html b/app/fieldnotes/templates/fieldnotes/fieldnote_detail.html
index dc90e16..0d25108 100644
--- a/app/fieldnotes/templates/fieldnotes/fieldnote_detail.html
+++ b/app/fieldnotes/templates/fieldnotes/fieldnote_detail.html
@@ -13,15 +13,8 @@
<meta name="geo.region" content="{{object.country.iso2}}{%if object.state.code != '' %}-{{object.state.code}}{%endif%}">
{%endblock%}
{% block bodyid %}class="notes--permalin detail" id="archive-{% if month %}{{month|month_number_to_name}}{%endif%}{{year}}"{%endblock%}
-
-
-{% block primary %}<ul class="bl crumbs" id="breadcrumbs" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
- <li><a href="/" title="luxagraf homepage" itemprop="url"><span itemprop="title">Home</span></a> &rarr; </li>
- <li><a href="/field-notes/" itemprop="url"><span itemprop="title">Field Notes</span></a> &rarr;</li>
- <li><a href="/field-notes/{{object.pub_date|date:"Y"}}/">{{object.pub_date|date:"Y"}}</a> &rarr;</li>
- <li itemprop="title"><a href="/field-notes/{{object.pub_date|date:"Y"}}/{{object.pub_date|date:"m"}}/">{{object.pub_date|date:"F"}}</a></li>
- </ul>
- <main role="main">
+{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %}
+{% block primary %}<main role="main">
<article class="h-entry hentry {% 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/BlogPosting">
<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|smartypants|safe}}{%else%}{{object.title|smartypants|safe}}{%endif%}</h1>
diff --git a/app/fieldnotes/templates/fieldnotes/fieldnote_list.html b/app/fieldnotes/templates/fieldnotes/fieldnote_list.html
index c201382..5ee6f06 100644
--- a/app/fieldnotes/templates/fieldnotes/fieldnote_list.html
+++ b/app/fieldnotes/templates/fieldnotes/fieldnote_list.html
@@ -5,13 +5,8 @@
{% block pagetitle %} Field Notes | luxagraf {% endblock %}
{% block metadescription %}Rough notes and sketches from the field {% endblock %}
{%block bodyid%}id="field-notes"{%endblock%}
-
-{% block primary %}
- <ul class="bl" id="breadcrumbs" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
- <li><a href="/" title="luxagraf homepage" itemprop="url"><span itemprop="title">Home</span></a> &rarr; </li>
- <li>Field Notes</li>
- </ul>
- <main role="main" id="essay-archive" class="essay-archive archive-list">
+{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %}
+{% block primary %}<main role="main" id="essay-archive" class="essay-archive archive-list">
<div class="essay-intro">
<h2>Field Notes</h2>
<p>Quick notes, sketches and images from the road. This is the semi-orgnized brain dump that comes before the more organized <a href="/jrnl/" title="read the journal">journal entries</a> and <a href="/essays/" title="read essays">essays</a>. If I used social media this is the stuff I'd probably put there, but I prefer to put it here, even if it means a lot fewer people read it.</p>
diff --git a/app/fieldnotes/urls.py b/app/fieldnotes/urls.py
index f3ef944..85ee710 100644
--- a/app/fieldnotes/urls.py
+++ b/app/fieldnotes/urls.py
@@ -2,7 +2,7 @@ from django.urls import path, re_path
from . import views
-app_name = "fieldnotes"
+app_name = "field notes"
urlpatterns = [
re_path(
diff --git a/app/fieldnotes/views.py b/app/fieldnotes/views.py
index fefd138..9b49cc0 100644
--- a/app/fieldnotes/views.py
+++ b/app/fieldnotes/views.py
@@ -1,19 +1,20 @@
from django.views.generic.dates import YearArchiveView, MonthArchiveView
from django.views.generic.detail import DetailView
-from utils.views import PaginatedListView
+from utils.views import PaginatedListView, LuxDetailView
from .models import FieldNote
class FieldNoteListView(PaginatedListView):
+ model = FieldNote
"""
Return a list of Notes in reverse chronological order
"""
queryset = FieldNote.objects.filter(status=1).order_by('-pub_date')
-class FieldNoteDetailView(DetailView):
+class FieldNoteDetailView(LuxDetailView):
model = FieldNote
slug_field = "slug"