summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2022-09-05 10:44:43 -0500
committerluxagraf <sng@luxagraf.net>2022-09-05 10:44:43 -0500
commitf547a33e18f3c3b6de199d72e2c6fcfbb94de11b (patch)
tree125a0dc0c3c6a76b03b6105fd4408dc8d2a6440f /app
parent7df9d1fcf70d55165cb89536980d153ed59932ab (diff)
essays: cleaned up templates, fixed some stray bugs
Diffstat (limited to 'app')
-rw-r--r--app/lib/django_comments/templates/comments/form.html1
-rw-r--r--app/locations/templates/locations/location_detail.html36
-rw-r--r--app/pages/templates/pages/luxagraf/homepage.html2
-rw-r--r--app/posts/templates/posts/essay_detail.html37
-rw-r--r--app/posts/templates/posts/essay_list.html37
-rw-r--r--app/posts/templates/posts/fieldnote_detail.html1
-rw-r--r--app/posts/templates/posts/jrnl_detail.html1
-rw-r--r--app/posts/templates/posts/post_detail.html1
-rw-r--r--app/posts/templates/posts/range_detail.html4
-rw-r--r--app/posts/templates/posts/src_detail.html1
-rw-r--r--app/posts/templates/posts/src_list.html4
-rw-r--r--app/sightings/templates/sightings/ap_detail.html26
12 files changed, 57 insertions, 94 deletions
diff --git a/app/lib/django_comments/templates/comments/form.html b/app/lib/django_comments/templates/comments/form.html
index 939f7e1..aac33bf 100644
--- a/app/lib/django_comments/templates/comments/form.html
+++ b/app/lib/django_comments/templates/comments/form.html
@@ -19,3 +19,4 @@
<input type="submit" name="preview" class="submit-preview" value="{% trans "Preview" %}"/>
</p>
</form>
+{{form}}
diff --git a/app/locations/templates/locations/location_detail.html b/app/locations/templates/locations/location_detail.html
index 81aeb97..9622a14 100644
--- a/app/locations/templates/locations/location_detail.html
+++ b/app/locations/templates/locations/location_detail.html
@@ -64,29 +64,19 @@
</section>{% endif %}
{% if sighting_list %}
<div class="section">
- <h2 class="hedtinycaps">Birds and Mammals seen in {{object}}</h2> {% for object in sighting_list %}
- <ul class="archive-list">
- <li class="archive-list-card archive-list-card-sm">{% if object.ap.image%}
- <div class="circle-img-wrapper">
- <a href="{{object.ap.get_absolute_url}}" title="{{object.ap}}">
- {% include "lib/img_archive.html" with image=object.ap.image %}
- </a>
- </div>{% endif %}
- <h3 class="card-hed"><a href="{{object.ap.get_absolute_url}}" title="{%if object.title_keywords%}{{object.title_keywords}}{%else%}{{object.ap}}{%endif%}">{{object.ap|safe|smartypants|widont}}</a></h3>
- <p class="card-lede">{{object.ap.scientific_name}}</p>
- <time class="card-smcaps" datetime="{{object.pub_date|date:'c'}}">Last Seen: {{object.pub_date|date:"F"}} <span>{{object.pub_date|date:"j, Y"}}</span></time>
- </li>
- </ul> {% endfor %}
+ <h2 class="hedtinycaps">Birds and Mammals seen in {{object}}</h2>
+ <div class="archive-grid">{% for object in sighting_list %}
+ <article class="archive-grid-card">{% if object.ap.featured_image%}
+ <div class="card-image">
+ <a href="{{object.ap.get_absolute_url}}" title="{{object.ap}}">
+ {% include "lib/img_archive.html" with image=object.ap.featured_image %}
+ </a>
+ </div>{% endif %}
+ <h3 class="card-hed"><a href="{{object.ap.get_absolute_url}}" title="{%if object.title_keywords%}{{object.title_keywords}}{%else%}{{object.ap}}{%endif%}">{{object.ap|safe|smartypants|widont}}</a></h3>
+ <p class="card-lede">{{object.ap.scientific_name}}</p>
+ <time class="card-smcaps" datetime="{{object.pub_date|date:'c'}}">Last Seen: {{object.pub_date|date:"F"}} <span>{{object.pub_date|date:"j, Y"}}</span></time>
+ </article> {% endfor %}
+ </div>
</div>{%endif%}
-
- {% comment %}
- {% for entry in book_list %}{% if forloop.first %}
- <div id="recommended-reading" >
- <h3 class="hed">Recommended Reading</h3>
- <ul>{% endif %}{% for obj in entry.books.all %}
- <li><a href="{% url 'books:detail' slug=obj.slug %}"><img src="{{obj.get_small_image_url}}" /></a></li>{% endfor %}
- {% if forloop.last%}</ul>
- </div>{%endif%}{% endfor %}
- {% endcomment %}
</main>
{% endblock %}
diff --git a/app/pages/templates/pages/luxagraf/homepage.html b/app/pages/templates/pages/luxagraf/homepage.html
index b7fa7d4..2f2dc19 100644
--- a/app/pages/templates/pages/luxagraf/homepage.html
+++ b/app/pages/templates/pages/luxagraf/homepage.html
@@ -91,5 +91,3 @@
<h5><a href="/jrnl/">Browse the Archives</a></h5>
</section>
{% endblock %}
-
-{% block js %}{% comment %} <script async src="/media/js/hyphenate.min.js" type="text/javascript"></script>{% endcomment%}{% endblock%}
diff --git a/app/posts/templates/posts/essay_detail.html b/app/posts/templates/posts/essay_detail.html
index 7eb90f5..961187d 100644
--- a/app/posts/templates/posts/essay_detail.html
+++ b/app/posts/templates/posts/essay_detail.html
@@ -4,33 +4,13 @@
{%block htmlclass%}class="detail single"{%endblock%}
{% block pagetitle %}{{object.title|title|smartypants|safe}} - by Scott Gilbertson{% endblock %}
-{% block metadescription %}{% autoescape on %}{{object.meta_description|striptags|safe}}{% endautoescape %}{% endblock %}
-{%block extrahead%}
-{% if object.has_code %}
- <link rel="stylesheet" href="/media/src/solarized.css" type="text/css" media="screen"/>
-{%endif %}
+{% block metadescription %}{% autoescape on %}{{object.meta_description|striptags|safe}}{% endautoescape %}{% endblock %}{%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="{% if object.meta_description %}{{object.meta_description}}{%else%}{{object.subtitle}}{%endif%}" />
- <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="{{self.get_featured_image}}" />
- <meta property="og:locale" content="en_US" />
- <meta name="twitter:card" content="summary_large_image"/>
- <meta name="twitter:description" content="{% if object.meta_description %}{{object.meta_description}}{%else%}{{object.subtitle}}{%endif%}"/>
- <meta name="twitter:title" content="{{object.title|safe}}"/>
- <meta name="twitter:site" content="@luxagraf"/>
- <meta name="twitter:domain" content="luxagraf"/>{% if object.featured_image %}
- <meta name="twitter:image:src" content="{{object.featured_image.get_image_url}}"/>{%endif%}
- <meta name="twitter:creator" content="@luxagraf"/>
+{% if object.has_code %} <link rel="stylesheet" href="/media/src/solarized.css" type="text/css" media="screen"/>{%endif %}
{%endblock%}
-
{%block bodyid %}{% if object.get_post_type_display == 'tools' %}class="src"{% endif %}{%endblock%}
{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %}
-{% block primary %}
+{% block primary %}<main>
<article class="h-entry hentry entry-content content" itemscope itemType="http://schema.org/BlogPosting">
<header id="header" class="post-header">
<h1 class="p-name post-title" itemprop="headline">{{object.title|smartypants|safe}}</h1>
@@ -86,12 +66,12 @@
</aside>{% endif %}
</div>{%endif%}
</article>
-
+ </main>
{% 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="https://schema.org/Article">
<a href="{{object.get_absolute_url}}" title="{{object.title}}">
<div class="card-image-tiny">
{% if object.featured_image %}
@@ -99,9 +79,9 @@
{%endif%}
</div>
<h4 class="p-name card-hed" itemprop="headline">{% if object.title %}{{object.title|safe|smartypants|widont}}{% else %}{{object.common_name}}{%endif%}</h4>
- <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>
+ <p class="p-author author hide" itemprop="author"><span class="byline-author" itemscope itemtype="https://schema.org/Person"><span itemprop="name">Scott Gilbertson</span></span></p>
<span class="card-smcaps">
- {% if object.location %}<span class="p-location h-adr adr card-location" itemprop="contentLocation" itemscope itemtype="http://schema.org/Place">
+ {% if object.location %}<span class="p-location h-adr adr card-location" itemprop="contentLocation" itemscope itemtype="https://schema.org/Place">
{% if object.location.country_name == "United States" %}{{object.location.state_name}}{%else%}{{object.location.country_name}}{%endif%}
</span>{%endif%}
{% if object.location and object.model_name.model != 'page' %}&ndash;{%endif%}
@@ -128,11 +108,12 @@
</div>
{% else %}
<p class="comments--header" style="text-align: center">Sorry, comments have been disabled for this post.</p>
+</div>
{%endif%}
</div>
-</main>
{% endblock %}
{% block js %}
<script src="/media/js/leaflet-master/leaflet-mod.js"></script>
<script src="/media/js/detail.min.js"></script>
+{{ block.super }}
{%endblock%}
diff --git a/app/posts/templates/posts/essay_list.html b/app/posts/templates/posts/essay_list.html
index cdd272f..e18919f 100644
--- a/app/posts/templates/posts/essay_list.html
+++ b/app/posts/templates/posts/essay_list.html
@@ -1,42 +1,23 @@
{% extends 'base.html' %}
{% load typogrify_tags %}
-
{% block pagetitle %}Collected Essays of Scott Gilbertson {% endblock %}
{% block metadescription %}Collected writing: essays, articles and stories on travel, photography, tools, walking, the natural world and other ephemera.{% endblock %}
{% block breadcrumbs %}{% if breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{%endif%}{% endblock %}
-{% block primary %}<main role="main" class="archive-wrapper">
+{% block primary %}<main class="archive-wrapper">
<div class="archive-intro">
<h2 class="archive-hed">Essays &amp; Articles</h2>
<p>Topics include travel, writing, photography, free software, culture, and once, Del Taco.</p>
<p>Some essays below were previously published in: <em><a href="https://www.wired.com/author/scott-gilbertson/" rel="me">WIRED</a></em>, <em><a href="https://www.budgettravel.com/article/0902_HTTN_SocialNetwork_5488">Budget Travel</a></em>, <em><a href="https://arstechnica.com/">Ars Technica</a></em>, <em><a href="https://www.epicurious.com/contributors/scott-gilbertson" rel="me">Epicurious</a></em>, <em><a href="https://web.archive.org/web/20100904114555/http://one.longshotmag.com/article/going-for-seconds">Longshot Magazine</a>,</em> <em><a href="https://web.archive.org/web/20150506051746/http://1888.center/scott-gilbertson/" rel="me">The Cost of Paper</a></em> and elsewhere.</a></p>
</div>
<h1 class="archive-sans">Essays</h1>
- <ul class="archive-list">{% for object in object_list %}
+ <ul class="archive-list">{% for object in object_list %}
<li class="h-entry hentry archive-list-card archive-list-card-sm" itemscope itemType="http://schema.org/Article">
- <span class="date dt-published card-smcaps">{{object.pub_date|date:"F Y"}}</span>
- <a href="{{object.get_absolute_url}}">
- <h2 class="card-hed">{{object.title|safe|smartypants|widont}}</h2>
- <p class="p-summary card-lede">{% if object.subtitle %}{{object.subtitle}}{%else%}{{object.meta_description|safe|smartypants|widont}}{%endif%}</p>
- </a>
- </li>
- {%endfor%}</ul>
- </main>
-{%endblock%}
-
-
- <ul class="article-card-list">{% for object in object_list %}
- <li class="h-entry hentry card-cir-mini-image" itemscope itemType="http://schema.org/Article">
- <span class="date"></span><span class="date dt-published card-date">{{object.pub_date|date:"F d, Y"}}</span>
+ <span class="date dt-published card-smcaps">{{object.pub_date|date:"F Y"}}</span>
<a href="{{object.get_absolute_url}}">
- <h2 class="card-title">{{object.title|safe|smartypants|widont}}</h2>
- {% if object.subtitle %}<h3 class="p-summary card-summary">{{object.subtitle|safe|smartypants|widont}}</h3>{%endif%}
+ <h2 class="card-hed">{{object.title|safe|smartypants|widont}}</h2>
+ <p class="p-summary card-lede">{% if object.subtitle %}{{object.subtitle}}{%else%}{{object.meta_description|safe|smartypants|widont}}{%endif%}</p>
</a>
- {% if object.location %}<h4 class="p-location h-adr card-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>
- {%endfor%}</ul>
+ </li>{%endfor%}
+ </ul>
+ </main>
+{%endblock%}
diff --git a/app/posts/templates/posts/fieldnote_detail.html b/app/posts/templates/posts/fieldnote_detail.html
index f678400..eba1f10 100644
--- a/app/posts/templates/posts/fieldnote_detail.html
+++ b/app/posts/templates/posts/fieldnote_detail.html
@@ -50,4 +50,5 @@
{% block js %}
<script src="/media/js/leaflet-master/leaflet-mod.js"></script>
<script src="/media/js/detail.min.js"></script>
+{{ block.super }}
{%endblock%}
diff --git a/app/posts/templates/posts/jrnl_detail.html b/app/posts/templates/posts/jrnl_detail.html
index d07719d..a0b9b11 100644
--- a/app/posts/templates/posts/jrnl_detail.html
+++ b/app/posts/templates/posts/jrnl_detail.html
@@ -164,4 +164,5 @@
{% block js %}
<script src="/media/js/leaflet-master/leaflet-mod.js"></script>
<script src="/media/js/detail.min.js"></script>
+{{ block.super }}
{%endblock%}
diff --git a/app/posts/templates/posts/post_detail.html b/app/posts/templates/posts/post_detail.html
index b7c31fa..e7492e2 100644
--- a/app/posts/templates/posts/post_detail.html
+++ b/app/posts/templates/posts/post_detail.html
@@ -111,4 +111,5 @@
{% block js %}
<script src="/media/js/leaflet-master/leaflet-mod.js"></script>
<script src="/media/js/detail.min.js"></script>
+{{ block.super }}
{%endblock%}
diff --git a/app/posts/templates/posts/range_detail.html b/app/posts/templates/posts/range_detail.html
index ac3af66..17c1486 100644
--- a/app/posts/templates/posts/range_detail.html
+++ b/app/posts/templates/posts/range_detail.html
@@ -159,7 +159,3 @@
</div>{%endif%}
</main>
{% endblock %}
-
-{% block js %}{% comment %} <script async src="/media/js/hyphenate.min.js" type="text/javascript"></script>{% endcomment%}{% endblock%}
-
-
diff --git a/app/posts/templates/posts/src_detail.html b/app/posts/templates/posts/src_detail.html
index b372139..bef0057 100644
--- a/app/posts/templates/posts/src_detail.html
+++ b/app/posts/templates/posts/src_detail.html
@@ -119,4 +119,5 @@
{% block js %}
<script src="/media/js/leaflet-master/leaflet-mod.js"></script>
<script src="/media/js/detail.min.js"></script>
+{{ block.super }}
{%endblock%}
diff --git a/app/posts/templates/posts/src_list.html b/app/posts/templates/posts/src_list.html
index c673935..b015deb 100644
--- a/app/posts/templates/posts/src_list.html
+++ b/app/posts/templates/posts/src_list.html
@@ -7,7 +7,7 @@
{% block metadescription %}Tutorials and tools for building great things on the web - by Scott Gilbertson.{% endblock %}
{%block sitesubtitle %}Code Slowly{% endblock%}
{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %}
-{% block primary %}<main role="main" class="archive-wrapper">
+{% block primary %}<main class="archive-wrapper">
<div class="archive-intro">
<h1 class="archive-hed"><code>/src/</code></h1>
<h2 class="list-subhed">Let's building things.</h2>
@@ -31,8 +31,6 @@
<nav aria-label="page navigation" class="pagination">
{% paginate %}
</nav>
-
-
</main>
{%endblock%}
diff --git a/app/sightings/templates/sightings/ap_detail.html b/app/sightings/templates/sightings/ap_detail.html
index 72c3666..c27b81e 100644
--- a/app/sightings/templates/sightings/ap_detail.html
+++ b/app/sightings/templates/sightings/ap_detail.html
@@ -2,7 +2,18 @@
{% load typogrify_tags %}
{% block extrahead %}
<style>
-#detail-map-canvas { height: 100%;}
+#detail-map-canvas {
+ height: 100%;
+}
+@media screen and (min-width: 1170px) {
+#detail-map-canvas {
+ height: 300px;
+ width: 100vw;
+}
+.map {
+ margin-top: 4rem;
+}
+}
</style>
{% endblock %}
{% block bodyid %}class="detail center"{%endblock%}
@@ -10,7 +21,7 @@
{% block primary %}<main>
<article class="content">
<header class="post-header">
- <h1 class="p-name post-title" itemprop="headline">{{object.common_name}}</h1>
+ <h1 class="p-name post-title">{{object.common_name}}</h1>
<h2 class="post-subtitle post-subtitle-line">{{object.scientific_name}}</h2>
<h3 class="post-smcaps">Family {{object.apclass.scientific_name}} ({{object.apclass}})</h3>
</header>
@@ -38,6 +49,8 @@
{%endfor%}</ul>
</div>
</div>
+ <div id="endnode">
+ </div>
</article>
</main>
{% endblock %}
@@ -45,13 +58,14 @@
{% block js %}
<script src="/media/js/leaflet-master/leaflet-mod.js"></script>
<script src="/media/js/detail.js"></script>
-<script type="text/javascript">
+<script>
sightings = [];
{% for s in sighting %}
sightings.push(['{{s.latitude}}', '{{s.longitude}}']);
{% endfor %}
-window.onload = function() {
- createBirdMap({% for s in sighting %}{% if forloop.first %}{{s.latitude}},{{s.longitude}}{%endif%}{%endfor%}, 5, { type:'point', lat:'{{sighting.latitude}}', lon:'{{sighting.longitude}}'}, sightings); return false;
-}
+document.addEventListener("DOMContentLoaded", function(event) {
+ createBirdMap({% for s in sighting %}{% if forloop.first %}{{s.latitude}},{{s.longitude}}{%endif%}{%endfor%}, 5, { type:'point', lat:'{% for s in sighting %}{% if forloop.first %}{{s.latitude}}{%endif%}{%endfor%}', lon:'{% for s in sighting %}{% if forloop.first %}{{s.latitude}}{%endif%}{%endfor%}'}, sightings); return false;
+});
</script>
+{{ block.super }}
{% endblock %}