feat: add posting frequency sparklines to all post type pages

Each collection page (articles, notes, photos, bookmarks, likes,
replies, reposts) now shows its own sparkline next to the heading,
showing that specific post type's frequency over the last 12 months.
This commit is contained in:
Ricardo
2026-02-18 12:02:49 +01:00
parent 113d0d55dd
commit f7bc5d9112
7 changed files with 49 additions and 7 deletions

View File

@@ -10,7 +10,13 @@ pagination:
permalink: "replies/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber + 1 }}/{% endif %}"
---
<div class="h-feed">
<h1 class="text-2xl sm:text-3xl font-bold text-surface-900 dark:text-surface-100 mb-2">Replies</h1>
<div class="flex flex-wrap items-center gap-4 mb-2">
<h1 class="text-2xl sm:text-3xl font-bold text-surface-900 dark:text-surface-100">Replies</h1>
{% set sparklineSvg = collections.replies | postingFrequency %}
{% if sparklineSvg %}
<span class="opacity-60 dark:opacity-40 text-surface-500 dark:text-surface-400">{{ sparklineSvg | safe }}</span>
{% endif %}
</div>
<p class="text-surface-600 dark:text-surface-400 mb-6 sm:mb-8">
My responses to posts across the web.
<span class="text-sm">({{ collections.replies.length }} total)</span>