diff options
Diffstat (limited to 'app/posts')
-rw-r--r-- | app/posts/templates/posts/range_detail.html | 33 | ||||
-rw-r--r-- | app/posts/views/range_views.py | 3 |
2 files changed, 11 insertions, 25 deletions
diff --git a/app/posts/templates/posts/range_detail.html b/app/posts/templates/posts/range_detail.html index 15b4cd5..ac3af66 100644 --- a/app/posts/templates/posts/range_detail.html +++ b/app/posts/templates/posts/range_detail.html @@ -9,22 +9,6 @@ {%block extrahead%} <link rel="canonical" href="https://luxagraf.net{{object.get_absolute_url}}" /> - <meta property="og:type" content="article" /> - <meta property="og:title" content="{{object.title|safe}}" /> - <meta property="og:url" content="https://luxagraf.net{{object.get_absolute_url}}" /> - <meta property="og:description" content="{{object.meta_description}}" /> - <meta property="article:published_time" content="{{object.pub_date|date:'c'}}" /> - <meta property="article:author" content="Scott Gilbertson" /> - <meta property="og:site_name" content="Luxagraf" /> - <meta property="og:image" content="{{object.get_featured_image}}" /> - <meta property="og:locale" content="en_US" /> - <meta name="twitter:card" content="summary_large_image"/> - <meta name="twitter:description" content="{{object.meta_description}}"/> - <meta name="twitter:title" content="{{object.title|safe}}"/> - <meta name="twitter:site" content="@luxagraf"/> - <meta name="twitter:domain" content="luxagraf"/> - <meta name="twitter:image:src" content="{{object.get_featured_image}}"/> - <meta name="twitter:creator" content="@luxagraf"/> <script type="application/ld+json"> { "@context": "https://schema.org", @@ -63,7 +47,7 @@ <meta itemprop="position" content="2" /> </span> <span class="nav-item" itemprop="item"> - <span itemprop="name">{{object.get_issue_str}}</span> + <span itemprop="name">{{mailing.get_issue_str}}</span> <meta itemprop="position" content="3" /> </span> </nav> @@ -72,7 +56,7 @@ <main> <figure class="large-top-image"> <a href="{{object.get_absolute_url}}" title="{{object.title}}">{%with image=object.featured_image%} - <img style="margin:0;" class="u-photo" itemprop="image" sizes="(max-width: 960px) 100vw" + <img style="margin:0;" sizes="(max-width: 960px) 100vw" srcset="{{image.get_srcset}}" src="{{image.get_src}}" alt="{{image.alt}} photographed by {% if image.photo_credit_source %}{{image.photo_credit_source}}{%else%}luxagraf{%endif%}"> @@ -85,7 +69,7 @@ <header id="header" class="post-header"> <h1 class="p-name post-title" itemprop="headline">{{object.title|smartypants|safe}}</h1> <div class="post-dateline"> - <time class="dt-published published dt-updated post-date lttr-box" datetime="{{object.pub_date|date:'c'}}" itemprop="datePublished">Image {{object.get_issue_str}} – {{object.pub_date|date:"F j, Y"}}</span></time> + <time class="dt-published published dt-updated post-date lttr-box" datetime="{{object.pub_date|date:'c'}}" itemprop="datePublished"><span>Image {{mailing.get_issue_str}} – {{object.pub_date|date:"F j, Y"}}</span></time> <span class="hide" itemprop="author" itemscope itemtype="http://schema.org/Person">by <a class="p-author h-card" href="/about"><span itemprop="name">Scott Gilbertson</span></a></span> </div> </header> @@ -144,16 +128,15 @@ <a href="{{ next.get_absolute_url }}" rel="next" title=" {{next.title}}">{{next.title|safe}}</a> </div>{%endif%} </nav>{%endwith%}{%endwith%} - <aside class="narrow donate join"> - <p>You're reading <em>Range</em>, a weekly mailing of a single photograph, along with a few notes, and video of the processing. If you'd like to join us, drop your email in the form below: </p> - <iframe target='_parent' style="border:none !important; background:white; width:100% !important;" title="embedded form for subscribing the the Friends of a Long Year newsletter" src="{% url 'lttr:subscribe' slug='range' %}"></iframe> - </aside> - </div> + <aside class="narrow donate join"> + <p>You're reading <em>Range</em>, a weekly mailing of a single photograph, along with a few notes, and video of the processing. If you'd like to join us, drop your email in the form below: </p> + <iframe style="border:none !important; background:white; width:100% !important;" title="embedded form for subscribing to the Range newsletter" src="{% url 'lttr:subscribe' slug='range' %}"></iframe> + </aside> {% if object.related.all %}<div class="article-afterward related"> <div class="related-bottom"> <h6 class="hedtinycaps">You might also enjoy</h6> <div class="archive-grid-quad">{% for object in related %} - <div class="archive-grid-card archive-grid-card-simple"> + <div class="archive-grid-card archive-grid-card-simple" itemscope itemType="http://schema.org/BlogPosting"> <a href="{{object.get_absolute_url}}" title="{{object.title}}"> <div class="card-image-tiny"> {% if object.featured_image %} diff --git a/app/posts/views/range_views.py b/app/posts/views/range_views.py index 0a808b8..da3b61f 100644 --- a/app/posts/views/range_views.py +++ b/app/posts/views/range_views.py @@ -13,6 +13,7 @@ from utils.views import PaginatedListView, LuxDetailView #from ..models import Entry, HomepageCurrator, Home from ..models import Post, PostType +from lttr.models import NewsletterMailing from locations.models import LuxCheckIn, Country, Region, Location from sightings.models import Sighting @@ -29,8 +30,10 @@ class RangeDetailView(LuxDetailView): model = apps.get_model(obj.model_name.app_label, obj.model_name.model) related.append(model.objects.get(slug=obj.slug, pub_date=obj.pub_date)) context['related'] = related + context['mailing'] = NewsletterMailing.objects.get(post__id=self.object.id) return context + class RangeListView(PaginatedListView): """ Return a list of Newsletter posts in reverse chronological order |