feat: center hints over the timeline + add hubris footer

- KeyboardHints: switch from fixed positioning to absolute, mounted
  inside the main content column. The column is now relative-positioned
  so the hints overlay centers against the timeline area instead of the
  raw viewport (which was off-center because of the sidebars).
- AppFooter: tiny "Built with hubris • <YEAR in roman>" pinned to the
  bottom-right corner of the main column. Year is computed at render
  time and converted via a small toRoman helper.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-08 21:34:18 +02:00
parent ec4a14976d
commit 26424469db
3 changed files with 57 additions and 7 deletions

View File

@@ -0,0 +1,43 @@
/**
* Tiny corner footer pinned to the bottom-right of the main column.
* Renders "Built with hubris • <year in roman numerals>", refreshed
* once per page load.
*/
const ROMAN_PAIRS: [number, string][] = [
[1000, 'M'],
[900, 'CM'],
[500, 'D'],
[400, 'CD'],
[100, 'C'],
[90, 'XC'],
[50, 'L'],
[40, 'XL'],
[10, 'X'],
[9, 'IX'],
[5, 'V'],
[4, 'IV'],
[1, 'I'],
]
function toRoman(n: number): string {
let result = ''
for (const [value, symbol] of ROMAN_PAIRS) {
while (n >= value) {
result += symbol
n -= value
}
}
return result
}
export function AppFooter() {
const year = new Date().getFullYear()
return (
<div className="pointer-events-none absolute bottom-2 right-3 z-10 text-[10px] text-text-faint">
<span className="pointer-events-auto">
Built with hubris {toRoman(year)}
</span>
</div>
)
}

View File

@@ -25,7 +25,11 @@ export function KeyboardHints() {
]
return (
<div className="pointer-events-none fixed bottom-4 left-1/2 z-30 -translate-x-1/2">
// Absolute (not fixed) so the parent's flex/position context can
// center it relative to the timeline area, not the viewport. Mount
// inside the main column in App.tsx so it isn't offset by the
// sidebar widths.
<div className="pointer-events-none absolute bottom-4 left-1/2 z-30 -translate-x-1/2">
<div className="pointer-events-auto flex items-center gap-3 rounded-full border border-border/60 bg-surface/40 px-4 py-1.5 shadow-lg ring-1 ring-white/5 backdrop-blur-md">
{hints.map((hint, i) => (
<div key={i} className="flex items-center gap-1.5">