Skip to content

Commit a9d12b2

Browse files
kt3kclaude
andcommitted
feat: make grid taps preview instead of navigate on touch
On devices that can't hover, tapping an activity-strip cell now swaps the summary below (the same action hover does on desktop) rather than jumping straight to the article. The repointed summary link remains the way to open the day's article. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 74d9ea6 commit a9d12b2

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/index.page.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,14 @@ export default function (data: Lume.Data): string {
193193
}
194194
document.querySelectorAll("[data-card] [data-i]").forEach(function (cell) {
195195
cell.addEventListener("mouseenter", function () { show(cell); });
196+
cell.addEventListener("click", function (e) {
197+
// On devices that can't hover (touch), a tap previews the day instead of
198+
// jumping to the article; the repointed summary link is how you open it.
199+
if (window.matchMedia("(hover: none)").matches) {
200+
e.preventDefault();
201+
show(cell);
202+
}
203+
});
196204
});
197205
})();
198206
</script>`;

0 commit comments

Comments
 (0)