]> zackmdavis.net Git - An_Algorithmic_Lucidity.git/commitdiff
theme adjustments (feat. Claude Code)
authorZack M. Davis <code@zackmdavis.net>
Tue, 14 Jul 2026 20:36:39 +0000 (13:36 -0700)
committerZack M. Davis <code@zackmdavis.net>
Tue, 14 Jul 2026 20:36:39 +0000 (13:36 -0700)
theme/static/css/style.css
theme/templates/archives.html
theme/templates/article.html
theme/templates/authors.html
theme/templates/base.html
theme/templates/categories.html
theme/templates/includes/pagination.html [new file with mode: 0644]
theme/templates/index.html
theme/templates/tags.html

index f6c93ada2cf56f66ddeb2abe907932ff604bb444..a2a0b292cad4f249fcf374357017ad980f5abbcb 100644 (file)
@@ -60,7 +60,7 @@ header h1 a:hover {
 
 .main {
     display: flex;
-    gap: 30px;
+    gap: 15px;
     align-items: flex-start;
     margin-top: 10px;
 }
@@ -69,14 +69,21 @@ header h1 a:hover {
 .content {
     flex: 1;
     min-width: 0;
+}
+
+/* A plain box for non-post content listings (archives, tags, categories) */
+.content-box {
     background-color: #fff;
     padding: 20px;
     box-shadow: 0 3px 8px rgba(0,0,0,0.25);
 }
 
-/* Posts */
+/* Posts: each one is its own box, sitting on the page's gray background */
 .post {
-    margin-bottom: 40px;
+    background-color: #fff;
+    padding: 20px;
+    margin-bottom: 15px;
+    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
 }
 
 .post:last-child {
@@ -278,11 +285,30 @@ header h1 a:hover {
 
 /* Pagination */
 .pagination {
-    margin-top: 30px;
-    padding-top: 15px;
-    border-top: 1px solid #ddd;
+    margin-top: 10px;
+    padding: 15px 20px;
+    background-color: #fff;
+    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
     display: flex;
-    justify-content: space-between;
+    flex-wrap: wrap;
+    align-items: center;
+    gap: 10px;
+    font-size: 13px;
+}
+
+.pagination .page-count {
+    color: #999;
+    margin-right: 10px;
+}
+
+.pagination a {
+    padding: 2px 4px;
+}
+
+.pagination .current {
+    font-weight: bold;
+    color: #222;
+    padding: 2px 4px;
 }
 
 /* Footer */
@@ -295,6 +321,19 @@ footer {
     font-size: 12px;
 }
 
+footer p {
+    margin-bottom: 6px;
+}
+
+footer p:last-child {
+    margin-bottom: 0;
+}
+
+footer a {
+    color: #999;
+    text-decoration: underline;
+}
+
 /* Responsive */
 @media (max-width: 768px) {
     .main {
index 23a858360cbe03356c34a08738229035dc13b0d8..2e085ccf2cc936fc6ba5b1a88e8c228d19314ae9 100644 (file)
@@ -3,6 +3,7 @@
 {% block title %}{{ SITENAME }} - Archives{% endblock %}
 
 {% block content %}
+    <div class="content-box">
     <h2 class="archive-title">Archives</h2>
     {% for year, year_articles in dates|groupby('date.year')|reverse %}
         <h3 class="archive-year">{{ year }}</h3>
@@ -15,4 +16,5 @@
             {% endfor %}
         </ul>
     {% endfor %}
+    </div>
 {% endblock %}
index e9cab1f597ad4cb25ac691b6491a49cba9fcd1ef..7600d703bf60f4152fb3c5d8a223d0756b3bd5ba 100644 (file)
@@ -3,6 +3,10 @@
 
 {% block title %}{{ article.title }} - {{ SITENAME }}{% endblock %}
 
+{% block extra_head %}
+<link rel="alternate" type="text/markdown" title="Markdown version" href="{{ SITEURL }}/{{ article.markdown_url }}">
+{% endblock %}
+
 {% block content %}
     {{ post_card.render_post(article) }}
 {% endblock %}
index 7491620b2b7cba6dda46bb959729f3c73430d702..d1556ed700f9a85b6e171d808c25ae0a4215626a 100644 (file)
@@ -3,10 +3,12 @@
 {% block title %}{{ SITENAME }} - Authors{% endblock %}
 
 {% block content %}
+    <div class="content-box">
     <h2 class="archive-title">Authors</h2>
     <ul class="archive-list">
         {% for author, articles in authors|sort %}
             <li><a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> ({{ articles|count }})</li>
         {% endfor %}
     </ul>
+    </div>
 {% endblock %}
index 3bf152cd03f6ce92a17ad7effc241cff04f75245..ee873c66a6f9a20c95d2289fd34cf75f27646c79 100644 (file)
@@ -9,6 +9,7 @@
     {% if FEED_ALL_ATOM %}
     <link rel="alternate" type="application/atom+xml" title="{{ SITENAME }} Full Atom Feed" href="{{ SITEURL }}/{{ FEED_ALL_ATOM }}">
     {% endif %}
+    {% block extra_head %}{% endblock %}
     <script>
     MathJax = { tex: { inlineMath: [['\\(', '\\)']], displayMath: [['$$', '$$']] } };
     </script>
@@ -87,7 +88,8 @@
 
     <footer>
         <div class="container">
-            <p>&copy; {{ SITENAME }}</p>
+            <p class="license">This work is licensed under a <a rel="license" href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.</p>
+            <p>&copy; {{ AUTHOR }}</p>
         </div>
     </footer>
 </body>
index c837533c3644fdc815a67d510f0f8c788266bc1a..dfd5ab81cee0942bd9768e920f8f72c0d1c388bb 100644 (file)
@@ -3,10 +3,12 @@
 {% block title %}{{ SITENAME }} - Categories{% endblock %}
 
 {% block content %}
+    <div class="content-box">
     <h2 class="archive-title">Categories</h2>
     <ul class="archive-list">
         {% for category, articles in categories %}
             <li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a> ({{ articles|count }})</li>
         {% endfor %}
     </ul>
+    </div>
 {% endblock %}
diff --git a/theme/templates/includes/pagination.html b/theme/templates/includes/pagination.html
new file mode 100644 (file)
index 0000000..b94092c
--- /dev/null
@@ -0,0 +1,23 @@
+{% macro render_pagination(page, paginator) %}
+{% if paginator.num_pages > 1 %}
+<nav class="pagination">
+    <span class="page-count">Page {{ page.number }} of {{ paginator.num_pages }}</span>
+    {% if page.number > 1 %}
+        <a href="{{ SITEURL }}/{{ paginator.page(1).url }}">&laquo; First</a>
+        <a href="{{ SITEURL }}/{{ paginator.page(page.number - 1).url }}">&lsaquo; Prev</a>
+    {% endif %}
+    {% set window = 3 %}
+    {% for n in range([1, page.number - window]|max, [paginator.num_pages, page.number + window]|min + 1) %}
+        {% if n == page.number %}
+            <span class="current">{{ n }}</span>
+        {% else %}
+            <a href="{{ SITEURL }}/{{ paginator.page(n).url }}">{{ n }}</a>
+        {% endif %}
+    {% endfor %}
+    {% if page.number < paginator.num_pages %}
+        <a href="{{ SITEURL }}/{{ paginator.page(page.number + 1).url }}">Next &rsaquo;</a>
+        <a href="{{ SITEURL }}/{{ paginator.page(paginator.num_pages).url }}">Last &raquo;</a>
+    {% endif %}
+</nav>
+{% endif %}
+{% endmacro %}
index 09949febe5541bf3c58738ec38c4cdae0ee0aef7..1adbc5c9d802ac8a345ac8284f9f1c60b18b932e 100644 (file)
@@ -1,5 +1,6 @@
 {% extends "base.html" %}
 {% import "includes/post_card.html" as post_card %}
+{% import "includes/pagination.html" as pagination %}
 
 {% block content %}
     {% block content_title %}{% endblock %}
@@ -8,16 +9,5 @@
         {{ post_card.render_post(article) }}
     {% endfor %}
 
-    {% if articles_page.has_previous() or articles_page.has_next() %}
-    <nav class="pagination">
-        {% if articles_page.has_previous() %}
-            <a href="{{ SITEURL }}/{{ articles_previous_page.url }}">&larr; Newer</a>
-        {% else %}
-            <span></span>
-        {% endif %}
-        {% if articles_page.has_next() %}
-            <a href="{{ SITEURL }}/{{ articles_next_page.url }}">Older &rarr;</a>
-        {% endif %}
-    </nav>
-    {% endif %}
+    {{ pagination.render_pagination(articles_page, articles_paginator) }}
 {% endblock %}
index c27d5a769b08036113c648383bbfd1d6b960abdb..b51fc38a6cf1e2a5c58bad229234f6a66d52a43a 100644 (file)
@@ -3,10 +3,12 @@
 {% block title %}{{ SITENAME }} - Tags{% endblock %}
 
 {% block content %}
+    <div class="content-box">
     <h2 class="archive-title">Tags</h2>
     <ul class="archive-list">
         {% for tag, articles in tags|sort %}
             <li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li>
         {% endfor %}
     </ul>
+    </div>
 {% endblock %}