summaryrefslogtreecommitdiff
path: root/app/posts
diff options
context:
space:
mode:
Diffstat (limited to 'app/posts')
-rw-r--r--app/posts/models.py4
-rw-r--r--app/posts/templates/posts/range_list.html6
2 files changed, 7 insertions, 3 deletions
diff --git a/app/posts/models.py b/app/posts/models.py
index 6705a83..9697f27 100644
--- a/app/posts/models.py
+++ b/app/posts/models.py
@@ -28,6 +28,7 @@ from normalize.models import RelatedPost
from media.models import LuxImage, LuxImageSize
from locations.models import Location
from books.models import Book
+from lttr.models import NewsletterMailing
#from fieldnotes.models import FieldNote
from taxonomy.models import TaggedItems, Category
from utils.util import render_images, render_products, parse_video, markdown_to_html, extract_main_image
@@ -105,6 +106,9 @@ class Post(models.Model):
def get_absolute_url(self):
if self.post_type == PostType.ESSAY:
return reverse('essays:detail', kwargs={"slug": self.slug})
+ if self.post_type == PostType.RANGE:
+ m = NewsletterMailing.objects.get(post__id=self.pk)
+ return reverse('range:range-detail', kwargs={"issue": m.get_issue_str(), "slug": self.slug})
if self.post_type == PostType.SRC:
return reverse('src:detail', kwargs={"slug": self.slug})
if self.post_type == PostType.FIELD_NOTE:
diff --git a/app/posts/templates/posts/range_list.html b/app/posts/templates/posts/range_list.html
index c6875e9..67c60d5 100644
--- a/app/posts/templates/posts/range_list.html
+++ b/app/posts/templates/posts/range_list.html
@@ -4,10 +4,10 @@
{% block metadescription %}A weekly photo, developed.{% endblock %}
{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %}
{% block primary %}
-<main role="main" class="archive-wrapper">{% for object in object_list %}{% if forloop.first %}
+<main class="archive-wrapper">{% for object in object_list %}{% if forloop.first %}
<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%}">
@@ -17,7 +17,7 @@
<h1 class="list-hed">Range</h1>
<h2 class="list-subhed">A weekly photo, developed.</h2>
<p>Please join us by dropping 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>
+ <iframe 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>
<p><em>Range</em> is a weekly mailing of a single photograph. </p>
<p>If you're interested there is also a link to a video of the RAW image processing in <a href="https://www.darktable.org/">darktable</a>, and sometimes a few words about the process. But the primary purpose is to deliver a single photo to your inbox. Simple and fun.</p>
<p>Yes, I know about Instagram. This is an attempt to reclaim that space, sharing photos with friends, but without all the distractions of the corporate social web, without the endless scroll of photos, likes, stories, comments, whatever. This is just an image delivered once a week to your inbox. I've been trying to think of a way to make it reciprocal, so you can send a picture to my inbox. If you have ideas, <a href="mailto:comments@luxagraf.net">email me</a>.</p>