BrandMark.tsx 1.66 KB
export interface BrandMarkProps {
  /** 中文主标题 */
  title?: string;
  /** 英文副标题 */
  subtitle?: string;
  size?: number;
}

/**
 * 品牌标识:几何化「热力环」标记 + 标题。
 *
 * 图形语义取自热力扩散:三层同心圆由实到虚,右下角一个实心点表示事故点位。
 * 纯 CSS/SVG 实现,不依赖图片资源,任意分辨率不糊。
 */
export function BrandMark({
  title = '智能网联监管平台',
  subtitle = 'IOT-CONNECTED VEHICLE SUPERVISION',
  size = 36,
}: BrandMarkProps) {
  const s = size;
  return (
    <div className="hm-brand" style={{ height: s }}>
      <svg
        width={s}
        height={s}
        viewBox="0 0 48 48"
        aria-hidden
        className="hm-brand__mark"
        style={{ flex: `0 0 ${s}px` }}
      >
        <defs>
          <linearGradient id="hm-brand-g" x1="0" y1="0" x2="1" y2="1">
            <stop offset="0%" stopColor="var(--hm-primary-light)" />
            <stop offset="100%" stopColor="var(--hm-primary)" />
          </linearGradient>
        </defs>
        <rect x="0" y="0" width="48" height="48" rx="12" fill="url(#hm-brand-g)" />
        <circle cx="24" cy="24" r="14" fill="none" stroke="#fff" strokeOpacity="0.28" strokeWidth="2" />
        <circle cx="24" cy="24" r="8.5" fill="none" stroke="#fff" strokeOpacity="0.55" strokeWidth="2" />
        <circle cx="24" cy="24" r="3.4" fill="#fff" />
        <circle cx="35.5" cy="36.5" r="2.6" fill="var(--hm-accent-gold)" />
      </svg>
      <div className="hm-brand__text">
        <div className="hm-brand__title">{title}</div>
        <div className="hm-brand__subtitle">{subtitle}</div>
      </div>
    </div>
  );
}