Navigation: lucide-Icons, Sigillen für die Rechtstexte

Die selbstgezeichneten Icons passten nicht zur rohen Optik. Die Ziele nutzen
jetzt lucide-react (1.48.0, fest gepinnt); Datenschutz, Beitragsordnung und
Impressum tragen Chaos-Stern, Anarcho-A und Sab-Cat aus static/assets/sigils.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TiXsPUqw7oeomZ8wZrQW5q
This commit is contained in:
irrlicht
2026-10-09 22:16:42 +02:00
co-authored by Claude Opus 5.5
parent f0dbb67054
commit 2b17f6b58c
7 changed files with 40 additions and 132 deletions
+18 -15
View File
@@ -1,11 +1,8 @@
import type { ReactNode } from "react";
import { NavLink } from "react-router";
import { Bell, ChartColumn, House, LogOut, MessageSquare, Search, Settings, User } from "lucide-react";
import { api } from "./api";
import { useAuthChanged, useMe } from "./auth";
import {
BellIcon, ChatIcon, FeedIcon, ImprintIcon, LogoutIcon, PrivacyIcon,
ProfileIcon, RulesIcon, SearchIcon, SettingsIcon, StatsIcon,
} from "./icons";
type Target = { title: string; icon: ReactNode; to: string; end?: boolean };
@@ -16,23 +13,29 @@ function useMainTargets(): Target[] {
const me = useMe().data;
const profile = me ? `/u/${encodeURIComponent(me.username)}` : "/me";
return [
{ title: "Feed", icon: <FeedIcon />, to: "/", end: true },
{ title: "Suche", icon: <SearchIcon />, to: "/search" },
{ title: "Benachrichtigungen", icon: <BellIcon />, to: "/notifications" },
{ title: "Chats", icon: <ChatIcon />, to: "/chats" },
{ title: "Profil", icon: <ProfileIcon />, to: profile },
{ title: "Feed", icon: <House className="icon" />, to: "/", end: true },
{ title: "Suche", icon: <Search className="icon" />, to: "/search" },
{ title: "Benachrichtigungen", icon: <Bell className="icon" />, to: "/notifications" },
{ title: "Chats", icon: <MessageSquare className="icon" />, to: "/chats" },
{ title: "Profil", icon: <User className="icon" />, to: profile },
];
}
const moreTargets: Target[] = [
{ title: "Einstellungen", icon: <SettingsIcon />, to: "/settings" },
{ title: "Statistik", icon: <StatsIcon />, to: "/stats" },
{ title: "Einstellungen", icon: <Settings className="icon" />, to: "/settings" },
{ title: "Statistik", icon: <ChartColumn className="icon" />, to: "/stats" },
];
// Die Rechtstexte tragen die Sigillen aus static/assets/sigils statt
// lucide-Icons.
function Sigil({ name }: { name: string }) {
return <img className="icon sigil" src={`/static/assets/sigils/${name}.svg`} alt="" />;
}
const docs: Target[] = [
{ title: "Datenschutz", icon: <PrivacyIcon />, to: "/datenschutz" },
{ title: "Beitragsordnung", icon: <RulesIcon />, to: "/beitragsordnung" },
{ title: "Impressum", icon: <ImprintIcon />, to: "/impressum" },
{ title: "Datenschutz", icon: <Sigil name="chaos_star" />, to: "/datenschutz" },
{ title: "Beitragsordnung", icon: <Sigil name="anarchy_a" />, to: "/beitragsordnung" },
{ title: "Impressum", icon: <Sigil name="sab_cat" />, to: "/impressum" },
];
// Sidebar: alle Ziele mit Icon und Titel. Auf dem Desktop immer sichtbar,
@@ -76,7 +79,7 @@ function Logout({ onDone }: { onDone: () => void }) {
return (
<ul>
<li>
<button id="logout-btn" onClick={logout}><LogoutIcon /><span>Logout</span></button>
<button id="logout-btn" onClick={logout}><LogOut className="icon" /><span>Logout</span></button>
</li>
</ul>
);