From 47b79fd9d4329e73cef7929ed8f64d9eeb287ae5 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Fri, 15 Jan 2021 14:54:30 -0500 Subject: Proj: Massive design overhaul to simplify code Cut out Sass syntax, deleted old CSS rules, changed HTML to use fewer lists and more cascading instead of specific rules. Still requires compiling with sass to strip comments and compress, but would in theory work on its own. Reduced CSS file size by 2/3 --- app/posts/templates/posts/essay_detail.html | 10 ++- app/posts/templates/posts/essay_list.html | 36 ++++++-- .../posts/fieldnote_archive_list_date.html | 24 +++--- app/posts/templates/posts/fieldnote_detail.html | 39 ++------- app/posts/templates/posts/fieldnote_list.html | 26 +++--- app/posts/templates/posts/guide_base.html | 22 ++--- app/posts/templates/posts/guide_by_topic.html | 43 +++++----- app/posts/templates/posts/guide_detail.html | 8 +- app/posts/templates/posts/jrnl_detail.html | 99 +++++++++++----------- app/posts/templates/posts/jrnl_list.html | 12 +-- app/posts/templates/posts/post_detail.html | 10 +-- app/posts/templates/posts/src_detail.html | 86 ++++++++----------- app/posts/templates/posts/src_list.html | 25 +++--- 13 files changed, 212 insertions(+), 228 deletions(-) (limited to 'app/posts') diff --git a/app/posts/templates/posts/essay_detail.html b/app/posts/templates/posts/essay_detail.html index 3902e33..b6a0db8 100644 --- a/app/posts/templates/posts/essay_detail.html +++ b/app/posts/templates/posts/essay_detail.html @@ -32,9 +32,9 @@ {% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %} {% block primary %}
-
-
-

{%if object.template_name == 1 or object.template_name == 3 %}{{object.title|smartypants|safe}}{%else%}{{object.title|smartypants|safe}}{%endif%}

+
+
+

{{object.title|smartypants|safe}}

{{object.subtitle|smartypants|safe}}

{% if object.originally_published_by %}

Originally Published By: {{object.originally_published_by}}

{%endif%} @@ -46,7 +46,7 @@
-
+
{% if object.prologue_html %}
{{object.prologue_html|smartypants|safe}}
{%endif%} @@ -148,6 +148,7 @@ document.addEventListener("DOMContentLoaded", function(event) { {%endif%}{%endwith%} } + {%comment%} lightbox.onload = function() { var opts= { //nextOnClick: false, @@ -165,6 +166,7 @@ document.addEventListener("DOMContentLoaded", function(event) { var lightbox = new Lightbox(); lightbox.load(opts); } + {%endcomment%} {% if object.enable_comments %} {% get_comment_count for object as comment_count %} {%if comment_count > 0 %} diff --git a/app/posts/templates/posts/essay_list.html b/app/posts/templates/posts/essay_list.html index 8a35225..cdd272f 100644 --- a/app/posts/templates/posts/essay_list.html +++ b/app/posts/templates/posts/essay_list.html @@ -4,21 +4,39 @@ {% 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 %}
-
-

Essays & Articles

+{% block primary %}
+
+

Essays & Articles

Topics include travel, writing, photography, free software, culture, and once, Del Taco.

Some essays below were previously published in: WIRED, Budget Travel, Ars Technica, Epicurious, Longshot Magazine, The Cost of Paper and elsewhere.

-

Essays

-
{%endblock%} + + + diff --git a/app/posts/templates/posts/fieldnote_archive_list_date.html b/app/posts/templates/posts/fieldnote_archive_list_date.html index 5d6865f..9294867 100644 --- a/app/posts/templates/posts/fieldnote_archive_list_date.html +++ b/app/posts/templates/posts/fieldnote_archive_list_date.html @@ -12,21 +12,21 @@
  • {% if not month %}{{year|date:"Y"}}{%else%}{{month|date:"Y"}} →{%endif%}
  • {% if month %}
  • {{month|date:"F"}}
  • {% endif %} -
    -
    -

    Field Notes {% if month or year %}{% if month %} from {{month|date:"F"}} {{month|date:"Y"}}{%else%} from {{year|date:"Y"}}{%endif%}{%endif%}

    +
    +
    +

    Field Notes {% if month or year %}{% if month %} from {{month|date:"F"}} {{month|date:"Y"}}{%else%} from {{year|date:"Y"}}{%endif%}{%endif%}

    Quick notes, sketches and images from the road. This is the semi-orgnized brain dump that comes before the more organized journal entries and essays. If I used social media this is the stuff I'd probably put there, but I prefer to put it here, even if it means a lot few people read it.

    -
    {% endblock %} diff --git a/app/posts/templates/posts/fieldnote_detail.html b/app/posts/templates/posts/fieldnote_detail.html index 3368c56..0cb8dd1 100644 --- a/app/posts/templates/posts/fieldnote_detail.html +++ b/app/posts/templates/posts/fieldnote_detail.html @@ -34,9 +34,10 @@ {% endblock %} {% block primary %}
    -
    -
    -

    {%if object.template_name == 1 or object.template_name == 3 %}{{object.title|smartypants|safe}}{%else%}{{object.title|smartypants|safe}}{%endif%}

    +
    +
    +
    +

    {{object.title|smartypants|safe}}

    {% if object.subtitle %}

    {{object.subtitle|smartypants|safe}}

    {%endif%}
    {% if object.location %}
    @@ -47,37 +48,9 @@
    -
    - {{object.body_html|safe|smartypants}} +
    + {{object.body_html|safe|smartypants}}
    - - - - - - - {% with object.get_next_published as next %} {% with object.get_previous_published as prev %}