Files
jiang13-forum/frontend/src/components/SiteBrandMark.tsx
freefire 822eef96be 新增 OIDC/SSO、邮件验证码与 Gitea 项目同步,并强化 Feed 与管理后台。
作为 OIDC Provider 对接 Gitea;注册支持邮件验证码/验证码;侧栏同步公开仓库;Feed 分页、文章大纲、标签云与站点品牌设置。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-31 16:58:22 +08:00

27 lines
752 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { SiteBranding } from '../api/types';
import { cn } from '@/lib/utils';
interface Props {
branding: SiteBranding;
/** CSS 类header-logo-mark / logo-mark / admin-topbar-mark */
className?: string;
/** 有 Logo 图时用的额外类名 */
imgClassName?: string;
}
/** 站点字标或 Logo 图 */
export default function SiteBrandMark({ branding, className, imgClassName }: Props) {
if (branding.logo) {
return (
<img
src={branding.logo}
alt={branding.name}
className={cn(className, 'site-brand-logo-img', imgClassName)}
loading="lazy"
decoding="async"
/>
);
}
return <span className={className}>{branding.logo_mark || branding.name.charAt(0) || '?'}</span>;
}