Skip to content

Commit 33d3007

Browse files
committed
category page: replace .sp-tree (white-space: pre eats template whitespace) with compact .cat-list
1 parent de6aa62 commit 33d3007

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

design/site.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,3 +633,11 @@
633633

634634
/* hide the stripe pattern when the cell is showing a real photo */
635635
.sp-img.has-photo::before { display: none; }
636+
637+
/* ── category sub-folder list (used on /musings/<cat>) ────── */
638+
.cat-list { list-style: none; margin: 0; padding: 0; font-family: var(--font-mono); font-size: var(--fs-small); }
639+
.cat-list li { padding: 6px 0; border-bottom: 1px solid var(--rule); display: flex; align-items: baseline; gap: var(--sp-3); }
640+
.cat-list li:last-child { border-bottom: 0; }
641+
.cat-list li a { color: var(--ink); text-decoration: none; }
642+
.cat-list li a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
643+
.cat-list li .count { color: var(--ink-3); }

templates/musings-category.eta

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
<% if (children.length) { %>
1717
<section style="margin-top: var(--sp-5); border-top: 1px solid var(--rule); padding-top: var(--sp-4);">
1818
<div style="font-family: var(--font-mono); font-size: var(--fs-tiny); color: var(--ink-3); margin-bottom: var(--sp-3);">// sub-folders</div>
19-
<div class="sp-tree">
20-
<% children.forEach(function(c, i){ var last = i === children.length - 1; %>
21-
<div><span class="glyph"><%= last ? '└── ' : '├── ' %></span><a href="<%= c.url %>"><%= c.label %>/</a><span class="count"> (<%= c.count %>)</span></div>
19+
<ul class="cat-list">
20+
<% children.forEach(function(c){ %>
21+
<li><a href="<%= c.url %>"><%= c.label %>/</a><span class="count">(<%= c.count %>)</span></li>
2222
<% }) %>
23-
</div>
23+
</ul>
2424
</section>
2525
<% } %>
2626

0 commit comments

Comments
 (0)