summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/posts/templates/posts/jrnl_date.html67
-rw-r--r--app/posts/views/jrnl_views.py5
2 files changed, 42 insertions, 30 deletions
diff --git a/app/posts/templates/posts/jrnl_date.html b/app/posts/templates/posts/jrnl_date.html
index dba1c53..27a39df 100644
--- a/app/posts/templates/posts/jrnl_date.html
+++ b/app/posts/templates/posts/jrnl_date.html
@@ -4,36 +4,43 @@
{% 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>{% if month or year %}<a href="{% url 'jrnl:list' %}">Jrnl</a> &rarr;{%else%}Field Notes{%endif%}</li>
- <li>{% if not month %}{{year|date:"Y"}}{%else%}<a href="/jrnl/{{month|date:"Y"}}/">{{month|date:"Y"}}</a> &rarr;{%endif%}</li>
- {% if month %}<li itemprop="title">{{month|date:"F"}}</li>{% endif %}
- </ul>
- <main role="main" id="essay-archive" class="essay-archive archive-list">
- <div class="essay-intro">
- <h2>Journal {% if month or year %}{% if month %} from {{month|date:"F"}} {{month|date:"Y"}}{%else%} from {{year|date:"Y"}}{%endif%}{%endif%}</h2>
- </div>
- <ul class="fancy-archive-list">{% for object in object_list %}{% if object.slug != 'about' %}
- <li class="h-entry hentry" itemscope itemType="http://schema.org/Article">
- <a href="{{object.get_absolute_url}}">
- {% if object.featured_image %}<div class="circle-img-wrapper"><img src="{{object.featured_image.get_thumbnail_url}}" alt="{{object.featured_image.alt}}" /></div>{%endif%}
- <span class="date dt-published">{{object.pub_date|date:"F d, Y"}}</span>
- <a href="{{object.get_absolute_url}}">
- <h2>{{object.title|safe|smartypants|widont}}</h2>
- {% if object.subtitle %}<h3 class="p-summary">{{object.subtitle|safe|smartypants|widont}}</h3>{%endif%}
- </a>
- {% if object.location %}<h4 class="p-location h-adr post-location" itemprop="geo" itemscope itemtype="http://data-vocabulary.org/Geo">
- <span class="p-locality">{{object.location.name|smartypants|safe}}</span>,
- <span class="p-region">{{object.location.state_name}}</span>,
- <span class="p-country-name">{{object.location.country_name}}</span>
- <data class="p-latitude" value="{{object.latitude}}"></data>
- <data class="p-longitude" value="{{object.longitude}}"></data>
- </h4>{% endif %}
- </li>
- {%endif%}{%endfor%}</ul>
+{% block breadcrumbs %}
+<nav class="breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">
+ <span class="nav-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
+ <a href="/" itemprop="name">Home</a>
+ <meta itemprop="position" content="1" />
+ </span>
+ <span class="nav-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
+ <a href="{% url 'jrnl:list' %}" itemprop="name">jrnl</a>
+ <meta itemprop="position" content="2" />
+ </span>
+ <span class="nav-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
+ <span itemprop="name">{{year|date:"Y"}}</span>
+ <meta itemprop="position" content="2" />
+ </span>
+ </nav>
+{% endblock %}
+{% block primary %}<main class="archive-grid">
+ <h1 class="hide">Journal {% if month or year %}{% if month %} from {{month|date:"F"}} {{month|date:"Y"}}{%else%} from {{year|date:"Y"}}{%endif%}{%endif%}</h1> {% for object in object_list %}
+ <article class="h-entry hentry archive-grid-card" itemscope itemType="http://schema.org/Article">
+ <div class="card-image">
+ <a href="{{object.get_absolute_url}}" title="{{object.title}}">{% if object.featured_image %}
+ {% include "lib/img_archive.html" with image=object.featured_image %}
+ {%else%}
+ <img src="{{object.get_image_url}}" alt="{{ object.title }}" class="u-photo post-image" itemprop="image" />{%endif%}</a>
+ </div>
+ <h2 class="p-name card-hed-it" itemprop="headline"><a href="{{object.get_absolute_url}}" class="u-url" title="{%if object.title_keywords%}{{object.title_keywords}}{%else%}{{object.title}}{%endif%}">{{object.title|safe|smartypants|widont}}</a></h2>
+ <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>
+ <time class="dt-published published dt-updated card-smcaps" datetime="{{object.pub_date|date:'c'}}">{{object.pub_date|date:"F"}} <span>{{object.pub_date|date:"j, Y"}}</span></time>
+ <p class="card-summary card-dek">
+ <span class="p-location h-adr adr card-smcaps" itemprop="contentLocation" itemscope itemtype="http://schema.org/Place">
+ {% if object.location.country_name == "United States" %}<span class="p-locality locality">{{object.location.name|smartypants|safe}}</span>, <a class="p-region region" href="/jrnl/united-states/" title="travel writing from the United States">{{object.location.state_name}}</a>, <span class="p-country-name">U.S.</span>{%else%}<span class="p-region">{{object.location.name|smartypants|safe}}</span>, <a class="p-country-name country-name" href="/jrnl/{{object.location.country_slug}}/" title="travel writing from {{object.location.country_name}}">{{object.location.country_name}}</a>{%endif%}
+ </span> &ndash;
+ <span class="p-summary" itemprop="description">
+ {{object.dek|safe}}
+ </span>
+ </p>
+ </article> {% endfor %}
</main>
{% endblock %}
diff --git a/app/posts/views/jrnl_views.py b/app/posts/views/jrnl_views.py
index bb50f6f..8652e1d 100644
--- a/app/posts/views/jrnl_views.py
+++ b/app/posts/views/jrnl_views.py
@@ -74,6 +74,11 @@ class JrnlYearArchiveView(YearArchiveView):
allow_future = True
template_name = "posts/jrnl_date.html"
+ def get_context_data(self, **kwargs):
+ context = super(JrnlYearArchiveView, self).get_context_data(**kwargs)
+ context['breadcrumbs'] = ['jrnl', self.kwargs['year']]
+ context['crumb_url'] = reverse('jrnl:list')
+ return context
class JrnlMonthArchiveView(MonthArchiveView):
queryset = Post.objects.filter(status__exact=1).filter(post_type=PostType.JRNL).select_related()