Files
sorsfonalak/services/frontend/src/components/NavIcon.tsx
T
fecoandClaude Opus 5.5 36b38525c3 Forum: a service of its own and the /forum pages
services/forum (axum, port 8083) on the same database and login, in the
forum schema (migration 0038, which also adds the moderator role):
nicknames, profiles with shared signs, topics, threads with listening or
advice intent, two-level replies, read marks and followed threads,
reactions as ratings with points and ranks, newcomer limits (lifted by a
purchase), moderation with reasons, bans and a log. Integration tests run
in CI.

The frontend's /forum pages (light by default, dark on request, phone
first with a desktop layout) are switched on by FORUM_URL; the /api/v1
proxy sends /api/v1/forum/* to the forum service. Concept and status:
docs/kozosseg.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
2026-11-26 10:29:49 +00:00

81 lines
2.0 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Small gold marks before the menu items: astrological glyphs where one fits,
// otherwise a line drawing.
export type NavIconName =
| "chart"
| "persons"
| "compare"
| "tarot"
| "explore"
| "signs"
| "famous"
| "moon"
| "retro"
| "packages"
| "forum"
| "admin";
const GLYPHS: Partial<Record<NavIconName, string>> = {
chart: "☉",
persons: "☽",
compare: "☌",
explore: "✧",
signs: "♈",
retro: "☿",
};
export function NavIcon({ name }: { name: NavIconName }) {
const glyph = GLYPHS[name];
if (glyph) {
return (
<span className="nav-icon sym" aria-hidden="true">
{glyph}
{"︎"}
</span>
);
}
return (
<svg className="nav-icon" viewBox="0 0 24 24" aria-hidden="true">
{name === "tarot" && (
<>
<rect x="5" y="3" width="14" height="18" rx="2.2" />
<path
d="M12 8l1.2 2.8 2.8 1.2-2.8 1.2L12 16l-1.2-2.8L8 12l2.8-1.2z"
className="nav-icon-fill"
/>
</>
)}
{name === "famous" && (
<path d="M12 3l2.6 5.6 6.1.7-4.5 4.2 1.2 6L12 16.6 6.6 19.5l1.2-6L3.3 9.3l6.1-.7z" />
)}
{name === "moon" && (
<>
<circle cx="12" cy="12" r="8.5" />
<path
d="M12 3.5a8.5 8.5 0 0 1 0 17a5 8.5 0 0 0 0-17z"
className="nav-icon-fill"
/>
</>
)}
{name === "packages" && (
<>
<path d="M12 2.5l8.5 4.7v9.6L12 21.5l-8.5-4.7V7.2z" />
<path d="M3.5 7.2L12 12l8.5-4.8M12 12v9.5" />
</>
)}
{name === "forum" && (
<>
<path d="M4 5h12a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H9l-4 3v-3H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z" />
<path d="M20 9h1a1 1 0 0 1 1 1v8l-3-2h-6" />
</>
)}
{name === "admin" && (
<>
<circle cx="12" cy="12" r="3" />
<path d="M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3M5.3 5.3l2.1 2.1M16.6 16.6l2.1 2.1M5.3 18.7l2.1-2.1M16.6 7.4l2.1-2.1" />
</>
)}
</svg>
);
}