feat: replace mobile header logo image with i18n text
Use ArkLogoMark + t('brand') on the mobile header so the wordmark can be translated (zh-CN: 'ARK 资料库', en: 'ARK Library'). Desktop nav already used this pattern.
This commit is contained in:
@@ -11,7 +11,7 @@ export type Lang = "zh-CN" | "en" | "ja" | "ko" | "vi" | "id" | "ms";
|
|||||||
type Dict = Record<string, string>;
|
type Dict = Record<string, string>;
|
||||||
|
|
||||||
const zhDict: Dict = {
|
const zhDict: Dict = {
|
||||||
brand: "ARK 数据库",
|
brand: "ARK 资料库",
|
||||||
mainNav: "网站导航",
|
mainNav: "网站导航",
|
||||||
home: "首页",
|
home: "首页",
|
||||||
all: "全部资料",
|
all: "全部资料",
|
||||||
|
|||||||
@@ -278,18 +278,11 @@ export function PublicLayout() {
|
|||||||
<div className="flex h-[64px] items-center justify-between bg-[#08070c] px-[20px] py-[12px] md:hidden">
|
<div className="flex h-[64px] items-center justify-between bg-[#08070c] px-[20px] py-[12px] md:hidden">
|
||||||
<Link
|
<Link
|
||||||
to="/"
|
to="/"
|
||||||
className="flex h-[28px] w-[160px] shrink-0 rounded-sm outline-none focus-visible:ring-2 focus-visible:ring-ark-gold/80 focus-visible:ring-offset-2 focus-visible:ring-offset-[#08070c]"
|
className="flex h-[28px] shrink-0 items-center gap-[8px] rounded-sm text-[18px] font-bold tracking-wide text-ark-gold outline-none focus-visible:ring-2 focus-visible:ring-ark-gold/80 focus-visible:ring-offset-2 focus-visible:ring-offset-[#08070c]"
|
||||||
aria-label={t("brand")}
|
aria-label={t("brand")}
|
||||||
>
|
>
|
||||||
<img
|
<ArkLogoMark className="h-[28px] w-[28px] shrink-0" />
|
||||||
src="/assets/ark-library/header-logo.svg"
|
<span className="truncate text-ark-gold">{t("brand")}</span>
|
||||||
alt="ARK LIBRARY"
|
|
||||||
className="h-full w-full object-contain"
|
|
||||||
width={160}
|
|
||||||
height={28}
|
|
||||||
decoding="async"
|
|
||||||
draggable={false}
|
|
||||||
/>
|
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<div className="flex h-[40px] w-[136px] shrink-0 items-center gap-[8px]">
|
<div className="flex h-[40px] w-[136px] shrink-0 items-center gap-[8px]">
|
||||||
|
|||||||
Reference in New Issue
Block a user