xonecas.io
8356
Wx

www-xonecas-io / commit e65d87b

tag pools pop in and lift on hover (1038)

Co-Authored-By: Claude Opus 5.5

Sean Caetano Martin2026-11-08 e65d87b502d9666e582bbd88901304c57fc98b09 parent 66b31ca

5 files changed

internal/site/assets/site.css+9−0
@@ -124,3 +124,12 @@
124124 .pager [aria-current] { color: var(--color-paper); background: var(--color-ink); }
125125 .pager [aria-label] { font: 1rem/1 var(--font-sans); }
126126 .pager span[aria-label] { opacity: .35; }
127+
128+/* Tag pools: linked chips pop in one after another (--i is their place), then lift and fill on hover. */
129+.pool > a { animation: pop .35s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: calc(var(--i, 0) * 18ms); transition: transform .12s, box-shadow .12s; }
130+.pool > a > span { transition: background-color .12s, color .12s; }
131+.pool > a:hover, .pool > a:focus-visible { transform: translate(-2px, -2px); box-shadow: 2px 2px 0 var(--color-ink); }
132+.pool > a:hover > span, .pool > a:focus-visible > span { background: var(--color-accent); color: var(--color-paper); }
133+.pool > a:active { transform: none; box-shadow: none; }
134+@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.85); } }
135+@media (prefers-reduced-motion: reduce) { .pool > a { animation: none; transition: none; } .pool > a:hover, .pool > a:focus-visible { transform: none; } }
internal/site/templates/index.html+2−2
@@ -9,8 +9,8 @@
99 {{range list (list "Projects" .Projects) (list "Commits" (comma .Commits)) (list "Busiest month" .Busiest) (list "Quietest year" .Quietest)}}
1010 <div class="flex justify-between py-1.5 border-b border-line"><dt>{{index . 0}}</dt><dd class="font-bold">{{index . 1}}</dd></div>{{end}}
1111 </dl>
12- <div class="flex flex-wrap gap-1 mt-4">{{range .Tags}}<a href="/projects/?tag={{.}}" class="flex no-underline">{{template "tag" .}}</a>{{end}}</div>
13- <div class="flex flex-wrap gap-1 mt-2">{{range .Topics}}<a href="/projects/?q={{.Name}}" title="{{.Count}} projects" class="flex no-underline">{{template "topic" .Name}}</a>{{end}}</div>
12+ <div class="pool flex flex-wrap gap-1 mt-4">{{range $i, $t := .Tags}}<a href="/projects/?tag={{$t}}" style="--i:{{$i}}" class="flex no-underline">{{template "tag" $t}}</a>{{end}}</div>
13+ <div class="pool flex flex-wrap gap-1 mt-2">{{range $i, $t := .Topics}}<a href="/projects/?q={{$t.Name}}" title="{{$t.Count}} projects" style="--i:{{inc (inc (inc (inc (inc (inc $i)))))}}" class="flex no-underline">{{template "topic" $t.Name}}</a>{{end}}</div>
1414 </aside>
1515 <div class="min-w-0">
1616 <div class="flex items-baseline justify-between mb-2"><h2 class="font-bold text-lg">Every month since {{(index .Wall 0).Year}}</h2><span class="text-xs text-soft">one cell = one month of commits</span></div>
internal/site/templates/project.html+2−2
@@ -5,8 +5,8 @@
55 <div class="min-w-0">
66 <h1 class="text-4xl font-bold break-words">{{.P.Name}}</h1>
77 <p class="mt-1 text-lg">{{or .P.Description "No description"}}</p>
8- <div class="flex flex-wrap gap-1 mt-3">{{range .P.Tags}}{{template "tag" .}}{{end}}
9- {{range .P.Topics}}<a href="/projects/?q={{.}}" title="Projects about {{.}}" class="no-underline hover:outline outline-ink rounded-[2px]">{{template "topic" .}}</a>{{end}}</div>
8+ <div class="pool flex flex-wrap gap-1 mt-3">{{range .P.Tags}}{{template "tag" .}}{{end}}
9+ {{range $i, $t := .P.Topics}}<a href="/projects/?q={{$t}}" title="Projects about {{$t}}" style="--i:{{$i}}" class="flex no-underline">{{template "topic" $t}}</a>{{end}}</div>
1010 <p class="mt-3 text-sm text-soft">
1111 <a href="commits/" class="text-ink"><b>{{.P.Commits}}</b> commits{{if ne .P.Commits .P.Total}} of {{.P.Total}}{{end}}</a> ·
1212 {{.P.First}} to {{.P.Last}} · {{.P.Files}} files
tickets/1038-let-s-make-tag-pool-more-alive-and-animated.md+32−0
@@ -0,0 +1,32 @@
1+---
2+id: 1038
3+title: let's make tag pool more alive and animated with hover states.
4+type: feature
5+status: review
6+priority: p2
7+created: 2026-11-08T05:21:27Z
8+updated: 2026-11-08T05:28:22Z
9+source: devnote
10+moves: 2026-11-08T05:21:35Z inbox doing drag; 2026-11-08T05:28:22Z doing review agent
11+area: site
12+---
13+
14+## Context
15+
16+Filed from `http://192.168.122.10:8080/`, on `span.inline-flex.items-center.border-[1.5px]`.
17+
18+> jquery
19+
20+## Notes
21+
22+- 2026-11-08 05:28Z (agent): Done: the tag pools are livelier.
23+
24+ - On load, each linked chip pops in one after another. It rises 4px and scales up from 0.85 with a little overshoot, 18ms apart, in the order of the pool. The whole front page pool takes about 0.9s.
25+ - On hover or keyboard focus, a chip lifts 2px up and left, casts a hard 2px ink shadow, and fills with the accent colour with paper text. On press it drops back flat.
26+ - With prefers-reduced-motion there is no pop-in and no lift, only the colour change.
27+
28+ Where: the front page sidebar (the 6 tags and the topics) and the topic links on project pages. On project pages the structural tags aren't links, so they stay still. The /projects filter chips are unchanged.
29+
30+ Files: assets/site.css (.pool block, @keyframes pop), templates/index.html and project.html (class 'pool', --i per chip). Note: the hover rules are plain CSS, not Tailwind's hover: variant, so unlike Tailwind's hover classes they also apply on touch screens after a tap.
31+
32+ Checked in agent-browser: hovering 'jquery' on / gives transform translate(-2px,-2px), shadow 'rgb(26,26,26) 2px 2px 0', accent fill rgb(168,70,31) (screenshot attached). animation-name is pop, with a 0.234s delay for the 13th chip. Not checked: the pop-in by eye (only by its computed values) and dark mode.
tickets/attachments/1038/front page, hovering jquery.png+0−0
Binary file, not shown.