added random cybersigilism generation

This commit is contained in:
2026-05-16 17:48:52 +02:00
parent c576794951
commit 2dc224abc4
4 changed files with 222 additions and 0 deletions
@@ -1,6 +1,23 @@
import { useEffect, useRef, useState } from 'react';
import { deletePost } from '../../lib/api';
import { confirmDialog, notify } from '../../lib/confirm';
import { buildCybersigil } from '../../lib/cybersigil';
// Per-plate sigil accent. Built post-mount (not during render) so the random
// markup never differs between SSR and hydration. Inert/display:none off the
// cybersigil theme; carves in on plate hover/focus via global.css.
function PlateSigil() {
const [html, setHtml] = useState('');
useEffect(() => { setHtml(buildCybersigil()); }, []);
if (!html) return null;
return (
<div
className="cs-plate-sig"
aria-hidden="true"
dangerouslySetInnerHTML={{ __html: html }}
/>
);
}
const PAGE_SIZE = 9;
@@ -220,6 +237,8 @@ export default function PostList({ posts: initialPosts, isAdmin = false }: Props
</button>
</div>
)}
<PlateSigil />
</article>
);
})}