commit efbf21ba86a35e8551769596ae96b106c63af14d
parent 2c29b2a367c29e1056934c758c9202ad1286a553
Author: FIGBERT <figbert@figbert.com>
Date: Tue, 19 Dec 2023 23:04:59 -0800
Refactor /reading to utilize three subsections
The top section is complete books with short commentary, followed by
a manually-sorted list of books I'm currently reading, and finally a
list of to-read books.
Diffstat:
14 files changed, 97 insertions(+), 20 deletions(-)
diff --git a/content/reading/_index.md b/content/reading/_index.md
@@ -1,6 +1,6 @@
+++
title = "Reading"
-template = "books.html"
+template = "reading.html"
page_template = "book.html"
sort_by = "date"
insert_anchor_links = "left"
diff --git a/content/reading/complete/_index.md b/content/reading/complete/_index.md
@@ -0,0 +1,4 @@
++++
+weight = 0
+sort_by = "date"
++++
diff --git a/content/reading/war-of-return/index.md b/content/reading/complete/war-of-return/index.md
diff --git a/content/reading/war-of-return/refugees.png b/content/reading/complete/war-of-return/refugees.png
Binary files differ.
diff --git a/content/reading/list/_index.md b/content/reading/list/_index.md
@@ -0,0 +1,7 @@
++++
+title = "To-Read"
+weight = 2
+sort_by = "weight"
+[extra]
+no_link = true
++++
diff --git a/content/reading/list/world-behind-the-world.md b/content/reading/list/world-behind-the-world.md
@@ -0,0 +1,8 @@
++++
+title = "World Behind the World"
+date = 2023-11-03
+weight = 0
+[extra]
+book = "The World Behind the World"
+author = "Erik Hoel"
++++
diff --git a/content/reading/now/_index.md b/content/reading/now/_index.md
@@ -0,0 +1,7 @@
++++
+title = "Current"
+weight = 1
+sort_by = "weight"
+[extra]
+no_link = true
++++
diff --git a/content/reading/now/carbon-almanac.md b/content/reading/now/carbon-almanac.md
@@ -0,0 +1,8 @@
++++
+title = "Carbon Almanac"
+date = 2023-08-25
+weight = 3
+[extra]
+book = "Carbon Almanac"
+author = "Seth Godin et. al."
++++
diff --git a/content/reading/now/dune.md b/content/reading/now/dune.md
@@ -0,0 +1,8 @@
++++
+title = "Dune"
+date = 2023-11-03
+weight = 0
+[extra]
+book = "Dune"
+author = "Frank Herbert"
++++
diff --git a/content/reading/now/hypermedia-systems.md b/content/reading/now/hypermedia-systems.md
@@ -0,0 +1,8 @@
++++
+title = "Hypermedia Systems"
+date = 2023-12-19
+weight = 2
+[extra]
+book = "Hypermedia Systems"
+author = "Carson Gross"
++++
diff --git a/content/reading/now/subtle-art-of-not-giving-a-fuck.md b/content/reading/now/subtle-art-of-not-giving-a-fuck.md
@@ -0,0 +1,8 @@
++++
+title = "The Subtle Art of Not Giving a Fuck"
+date = 2023-09-15
+weight = 1
+[extra]
+book = "The Subtle Art of Not Giving a Fuck"
+author = "Mark Manson"
++++
diff --git a/templates/book.html b/templates/book.html
@@ -5,9 +5,13 @@
<h1><a href="{{ current_url }}">{{ page.title }}</a></h1>
<small>
<i>{{ page.extra.book }}</i> by {{ page.extra.author }}. <br/>
+ {% if page.extra is containing("finished") %}
Finished on {{ page.extra.finished | date(format="%B %d, %Y") }}. <br/>
+ {% endif %}
+ {% if page.extra is containing("rating") %}
Rating: {{ page.extra.rating }} <br/>
- <a href="..">< Back</a>
+ {% endif %}
+ <a href="/reading/">< Back</a>
</small>
</section>
{{ page.content | safe }}
diff --git a/templates/books.html b/templates/books.html
@@ -1,18 +0,0 @@
-{% extends "index.html" %}
-{% block content %}
- {% if section.content %}
- {{ section.content | safe }}
- {% endif %}
- <ul id="section-list">
- {% for page in section.pages %}
- <li>
- <a href="{{ page.permalink }}" id="section-title">{{ page.extra.book }}</a>
- <div class="summary">
- By: {{ page.extra.author }} <br/>
- Finished: {{ page.extra.finished | date(format="%B %d, %Y") }} <br/>
- Rating: {{ page.extra.rating }}
- </div>
- </li>
- {% endfor %}
- </ul>
-{% endblock content %}
diff --git a/templates/reading.html b/templates/reading.html
@@ -0,0 +1,33 @@
+{% extends "index.html" %}
+{% block content %}
+ {% for _path in section.subsections %}
+ {% set subsection = get_section(path=_path) %}
+ {% if subsection.title %}
+ <hr/>
+ <p><strong>{{ subsection.title }}</strong></p>
+ {% endif %}
+ {% if subsection.content %}
+ {{ subsection.content | safe }}
+ {% endif %}
+ {% for page in subsection.pages %}
+ <ul id="section-list">
+ <li>
+ {% if subsection.extra is not containing("no_link") %}
+ <a href="{{ page.permalink }}" id="section-title">{{ page.extra.book }}</a>
+ {% else %}
+ <span id="section-title">{{ page.extra.book }}</span>
+ {% endif %}
+ <div class="summary">
+ By: {{ page.extra.author }} <br/>
+ {% if page.extra is containing("finished") %}
+ Finished: {{ page.extra.finished | date(format="%B %d, %Y") }} <br/>
+ {% endif %}
+ {% if page.extra is containing("rating") %}
+ Rating: {{ page.extra.rating }}
+ {% endif %}
+ </div>
+ </li>
+ </ul>
+ {% endfor %}
+ {% endfor %}
+{% endblock content %}