summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2025-01-04 16:38:17 -0600
committerluxagraf <sng@luxagraf.net>2025-01-04 16:38:17 -0600
commit33cf413ce780efd1b7d3626fa75147e15168a241 (patch)
tree810f49fdc877ecc4a96bd08826f9430808f9d70e
parentfe7d43f308bbc3953d4a88480b8088d12cbcb0b6 (diff)
posts: got rid of some old url patterns I don't useHEADmaster
-rw-r--r--app/posts/templates/photo_essay_list.html47
-rw-r--r--app/posts/urls/__init__old.py4
-rw-r--r--app/posts/urls/friends_urls.py25
-rw-r--r--app/posts/urls/guide_urls.py30
-rw-r--r--app/posts/urls/range_urls.py20
-rw-r--r--app/posts/urls/trip_urls.py25
-rw-r--r--config/base_urls.py20
-rw-r--r--templates/base.html6
8 files changed, 59 insertions, 118 deletions
diff --git a/app/posts/templates/photo_essay_list.html b/app/posts/templates/photo_essay_list.html
new file mode 100644
index 0000000..e8bebfd
--- /dev/null
+++ b/app/posts/templates/photo_essay_list.html
@@ -0,0 +1,47 @@
+{% extends 'base.html' %}
+{%block htmlclass%}class="detail single"{% endblock %}
+{% load typogrify_tags %}
+{% load get_image_by_size %}
+{% load html5_datetime %}
+{% load pagination_tags %}
+{% block pagetitle %} Photos | luxagraf {% endblock %}
+{% block metadescription %} Recent Images {% endblock %}
+{%block bodyid%}class="photos" id="notes-archive"{%endblock%}
+{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %}
+{% block primary %}
+ <main class="archive-wrapper">
+ <div class="archive-intro">
+ <h1>Photos</h1>
+ <h3>I first picked up a camera in the late 1980s and started documenting trips into the mountains, inspired by <a href="https://en.wikipedia.org/wiki/Galen_Rowell">Galen Rowell</a>. These are ongoing projects, updated regularly.</h3>
+ <hr />
+ <h2>Join us. Subscribe to <em>Friends of a Long Year</em></h2>
+ <iframe target='_parent' style="border:none; background:white; width:100%;" title="embedded form for subscribing the the Friends of a Long Year newsletter" onload="resizeIframe(this)" src="{% url 'lttr:subscribe' slug='friends' %}"></iframe>
+ </div>
+ <ul class="photo-list">{% for object in object_list %}
+ <li class="h-entry hentry" itemscope itemType="http://schema.org/BlogPosting">{% get_image_by_size object.featured_image 'featured_photo_essay' as featured %}
+ <figure>
+ <a href="{{object.get_absolute_url}}">
+ <img src="{{featured}}" alt="{{object.featured_image.alt}} photographed by Scott Gilbertson">
+ </a>
+ <figcaption>
+ <h1 class="p-name" itemprop="headline">{{object.title|smartypants|safe}}</h1>
+ <time class="dt-published published dt-updated card-smcaps" datetime="{{object.pub_date|date:'c'}}" itemprop="datePublished"> &nbsp;&ndash; Last update: {{object.last_updated|date:"F Y"}}</time>
+ <span class="hide" itemprop="author" itemscope itemtype="http://schema.org/Person">by <span class="p-author h-card" ><span itemprop="name">Scott Gilbertson</span></span></span>
+ {%if object.location %}<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>{%endif%}
+ </figcaption>
+ </figure>
+ </a>
+ </li>{%endfor%}
+ </ul>
+ </main>
+{% endblock%}
+{% block js %}
+
+<script>
+ function resizeIframe(obj) {
+ obj.style.height = (obj.contentWindow.document.body.scrollHeight - 75) + 'px';
+ }
+</script>
+{% endblock %}
diff --git a/app/posts/urls/__init__old.py b/app/posts/urls/__init__old.py
deleted file mode 100644
index 4993c34..0000000
--- a/app/posts/urls/__init__old.py
+++ /dev/null
@@ -1,4 +0,0 @@
-from .guide_urls import urlpatterns as guide_urlpatterns
-from .reviews_urls import urlpatterns as review_urlpatterns
-
-urlpatterns = review_urlpatterns + guide_urlpatterns
diff --git a/app/posts/urls/friends_urls.py b/app/posts/urls/friends_urls.py
deleted file mode 100644
index ca68ca0..0000000
--- a/app/posts/urls/friends_urls.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from django.urls import path, re_path, include
-from django.views.generic.base import RedirectView
-
-from ..views import friends_views as views
-
-app_name = "range"
-
-urlpatterns = [
- # path(
- # r'feed.xml',
- # views.FriendsRSSFeedView(),
- # name="feed"
- # ),
- # path(
- # r'<int:issue>/<str:slug>',
- # views.FriendsDetailView.as_view(),
- # name="friends-detail"
- # ),
- path(
- r'',
- views.FriendsListView.as_view(),
- {'page':1},
- name="friends-list"
- ),
-]
diff --git a/app/posts/urls/guide_urls.py b/app/posts/urls/guide_urls.py
deleted file mode 100644
index 5e2b37e..0000000
--- a/app/posts/urls/guide_urls.py
+++ /dev/null
@@ -1,30 +0,0 @@
-from django.urls import path, re_path, include
-from django.views.generic.base import RedirectView
-
-from ..views import guide_views as views
-
-app_name = "guides"
-
-urlpatterns = [
- path(
- r'',
- views.GuideListView.as_view(),
- {'page':1},
- name="guide-list"
- ),
- path(
- r'<int:page>/',
- views.GuideListView.as_view(),
- name="guide-list"
- ),
- path(
- r'<str:topic>/<str:slug>',
- views.GuidePostDetailView.as_view(),
- name="guide-post-detail"
- ),
- path(
- r'<str:slug>/',
- views.GuideDetailView.as_view(),
- name="guide-detail"
- ),
-]
diff --git a/app/posts/urls/range_urls.py b/app/posts/urls/range_urls.py
deleted file mode 100644
index 65638ce..0000000
--- a/app/posts/urls/range_urls.py
+++ /dev/null
@@ -1,20 +0,0 @@
-from django.urls import path, re_path, include
-from django.views.generic.base import RedirectView
-
-from ..views import range_views as views
-
-app_name = "range"
-
-urlpatterns = [
- path(
- r'',
- views.RangeListView.as_view(),
- {'page':1},
- name="list"
- ),
- path(
- r'<int:page>',
- views.RangeListView.as_view(),
- name="list"
- ),
-]
diff --git a/app/posts/urls/trip_urls.py b/app/posts/urls/trip_urls.py
deleted file mode 100644
index 7e9c95f..0000000
--- a/app/posts/urls/trip_urls.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from django.urls import path, re_path, include
-from django.views.generic.base import RedirectView
-
-from ..views import trip_views as views
-
-app_name = "trips"
-
-urlpatterns = [
- path(
- r'<str:slug>',
- views.TripDetailView.as_view(),
- name="detail"
- ),
- path(
- r'<int:page>/',
- views.TripListView.as_view(),
- name="list"
- ),
- path(
- r'',
- views.TripListView.as_view(),
- {'page':1},
- name="list"
- ),
-]
diff --git a/config/base_urls.py b/config/base_urls.py
index 2b7d43d..93b90b7 100644
--- a/config/base_urls.py
+++ b/config/base_urls.py
@@ -45,6 +45,12 @@ urlpatterns = [
#path(r'people/', include('people.urls')),
#path(r'work/', include('resume.urls', namespace='resume')),
#path(r'<path>/<slug>/', PageDetailView.as_view()),
+ #re_path(r'^trip/$', RedirectView.as_view(url='/trips/')),
+ #path(r'trip/', include('posts.urls.trip_urls')),
+ #path(r'trips/', include('posts.urls.trip_urls', namespace='trips')),
+ #re_path(r'^guide/$', RedirectView.as_view(url='/guides/')),
+ #path(r'guides/', include('posts.urls.guide_urls', namespace='guides')),
+ #path(r'guide/', include('posts.urls.guide_urls')),
re_path(r'^admin/build/.*', builder.views.do_build),
path(r'admin/data/', include('utils.urls')),
path(r'admin/', admin.site.urls),
@@ -60,19 +66,13 @@ urlpatterns = [
path(r'walks/', include('locations.walk_urls')),
path(r'locations/', include('locations.urls')),
path(r'newsletter/', include('lttr.urls')),
- path(r'photos/', include('media.urls')),
- path(r'images/', include('posts.urls.photo_essay_urls', namespace='photo-essay-list')),
- re_path(r'^trip/$', RedirectView.as_view(url='/trips/')),
- path(r'trip/', include('posts.urls.trip_urls')),
- path(r'trips/', include('posts.urls.trip_urls', namespace='trips')),
- re_path(r'^guide/$', RedirectView.as_view(url='/guides/')),
- path(r'guides/', include('posts.urls.guide_urls', namespace='guides')),
- path(r'guide/', include('posts.urls.guide_urls')),
+ #path(r'photos/', include('media.urls')),
+ path(r'photos/', include('posts.urls.photo_essay_urls', namespace='photo-essay-list')),
re_path(r'^essay/$', RedirectView.as_view(url='/essays/')),
path(r'essay/', include('posts.urls.essay_urls')),
path(r'essays/', include('posts.urls.essay_urls', namespace='essay-list')),
- path(r'range/', include('posts.urls.range_urls', namespace='range')),
- path(r'friends/', include('posts.urls.friends_urls', namespace='friends')),
+ #path(r'range/', include('posts.urls.range_urls', namespace='range')),
+ #path(r'friends/', include('posts.urls.friends_urls', namespace='friends')),
path(r'book-notes/', include('books.urls')),
path(r'dialogues/', include('sightings.urls', namespace='sightings')),
path(r'field-notes/', include('posts.urls.field_note_urls', namespace='fieldnote')),
diff --git a/templates/base.html b/templates/base.html
index 0bce354..2e4eb8b 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -16,7 +16,7 @@
title="Luxagraf RSS feed"
href="https://luxagraf.net/rss/">
{%block stylesheet%}<link rel="stylesheet"
- href="/media/screenv11.min.css?{% now "u" %}"
+ href="/media/screenv11.css?{% now "u" %}"
media="screen">{%endblock%}
{%block extrahead%}{%endblock%}
</head>
@@ -29,10 +29,8 @@
<nav>
<a class="nav-item smcaps" href="{% url "jrnl:list" %}" title="Stories of life on the road.">Jrnl</a>
<a class="nav-item smcaps" href="/essays/" title="Life and how to live it">Essays</a>
- <!--<a class="nav-item smcaps" href="{% url "guides:guide-list" %}" title="Guides">Guides</a> -->
+ <a class="nav-item smcaps" href="{% url "photo_essay:list" %}" title="Photo essays">Photos</a>
<a class="nav-item smcaps" href="/about" title="About Scott">About</a>
- <!--
- <a class="nav-item smcaps" href="/guides/" title="Useful Stuff">Guides</a> -->
</nav>
</header>
{% block breadcrumbs %}{% endblock %}