diff --git a/zbook_frontend/messages/de.json b/zbook_frontend/messages/de.json index 22d1e85..d40b50e 100644 --- a/zbook_frontend/messages/de.json +++ b/zbook_frontend/messages/de.json @@ -285,6 +285,7 @@ "DayAfter": "{duration, plural, =0 {gerade eben} =1 {in # Tag} other {in # Tagen} }" }, "GenerateMetaData": { + "HomePageDescription": "Dies ist die Startseite von ZBook, die die Hauptfunktionen zeigt und wichtige Einstiegspunkte bietet.", "User": "Benutzer", "Session": "Sitzung", "Repo": "Repository", diff --git a/zbook_frontend/messages/en.json b/zbook_frontend/messages/en.json index 09dc481..9272aaf 100644 --- a/zbook_frontend/messages/en.json +++ b/zbook_frontend/messages/en.json @@ -289,6 +289,7 @@ "DayAfter": "{duration, plural, =0 {just now} =1 {in # day} other {in # days} }" }, "GenerateMetaData": { + "HomePageDescription": "This is the homepage of ZBook, showcasing its main features and providing key entry points.", "User": "User", "Session": "Session", "Repo": "Repo", diff --git a/zbook_frontend/messages/zh.json b/zbook_frontend/messages/zh.json index fead7e8..dbb53e8 100644 --- a/zbook_frontend/messages/zh.json +++ b/zbook_frontend/messages/zh.json @@ -292,6 +292,7 @@ "DayAfter": "{duration} 天后" }, "GenerateMetaData": { + "HomePageDescription": "这是 ZBook 的首页,用于展示 ZBook 的主要功能,以及一些关键入口。", "User": "用户", "Session": "会话", "Repo": "仓库", diff --git a/zbook_frontend/src/app/[locale]/auth/forget/page.tsx b/zbook_frontend/src/app/[locale]/auth/forget/page.tsx index dd09d45..c8089a2 100644 --- a/zbook_frontend/src/app/[locale]/auth/forget/page.tsx +++ b/zbook_frontend/src/app/[locale]/auth/forget/page.tsx @@ -5,6 +5,7 @@ export async function generateMetadata(): Promise { const t = await getTranslations("GenerateMetaData"); return { title: t("ForgetPassword"), + description: t("ForgetPassword"), }; } export default async function forget() { diff --git a/zbook_frontend/src/app/[locale]/auth/login/page.tsx b/zbook_frontend/src/app/[locale]/auth/login/page.tsx index 56e7ae5..f5f3e24 100644 --- a/zbook_frontend/src/app/[locale]/auth/login/page.tsx +++ b/zbook_frontend/src/app/[locale]/auth/login/page.tsx @@ -11,6 +11,7 @@ export async function generateMetadata(): Promise { const t = await getTranslations("GenerateMetaData"); return { title: t("Login"), + description: t("Login"), }; } export default async function Login() { diff --git a/zbook_frontend/src/app/[locale]/auth/register/page.tsx b/zbook_frontend/src/app/[locale]/auth/register/page.tsx index 7d2c73a..8d4a015 100644 --- a/zbook_frontend/src/app/[locale]/auth/register/page.tsx +++ b/zbook_frontend/src/app/[locale]/auth/register/page.tsx @@ -7,6 +7,7 @@ export async function generateMetadata(): Promise { const t = await getTranslations("GenerateMetaData"); return { title: t("Register"), + description: t("Register"), }; } export default async function Register({ diff --git a/zbook_frontend/src/app/[locale]/cases/page.tsx b/zbook_frontend/src/app/[locale]/cases/page.tsx index 355b4af..f954e6d 100644 --- a/zbook_frontend/src/app/[locale]/cases/page.tsx +++ b/zbook_frontend/src/app/[locale]/cases/page.tsx @@ -6,6 +6,7 @@ export async function generateMetadata(): Promise { const t = await getTranslations("GenerateMetaData"); return { title: t("Cases"), + description: t("Cases"), }; } diff --git a/zbook_frontend/src/app/[locale]/layout.tsx b/zbook_frontend/src/app/[locale]/layout.tsx index 1c8730a..41d552b 100644 --- a/zbook_frontend/src/app/[locale]/layout.tsx +++ b/zbook_frontend/src/app/[locale]/layout.tsx @@ -39,6 +39,7 @@ export async function generateMetadata({ template: "%s - ZBook", default: "ZBook | " + t("Slogan"), // a default is required when creating a template }, + description: t("HomePageDescription"), }; } diff --git a/zbook_frontend/src/app/[locale]/page.tsx b/zbook_frontend/src/app/[locale]/page.tsx index 0f5a9ca..5c88f92 100644 --- a/zbook_frontend/src/app/[locale]/page.tsx +++ b/zbook_frontend/src/app/[locale]/page.tsx @@ -188,9 +188,9 @@ export default async function Home() {

{t("SimpleDocumentation")}

{t("VisuallyAppealing")}

-
-

{t("DocumentationForTeam")}

-
+

+ {t("DocumentationForTeam")} +

1 ? `${firstPart}: ${lastPart}` : lastPart, + description: parts.length > 1 ? `${firstPart}: ${lastPart}` : lastPart, }; } diff --git a/zbook_frontend/src/app/[locale]/workspace/[username]/(repos)/o/[reponame]/~visi/page.tsx b/zbook_frontend/src/app/[locale]/workspace/[username]/(repos)/o/[reponame]/~visi/page.tsx index 1a32cab..44e85cc 100644 --- a/zbook_frontend/src/app/[locale]/workspace/[username]/(repos)/o/[reponame]/~visi/page.tsx +++ b/zbook_frontend/src/app/[locale]/workspace/[username]/(repos)/o/[reponame]/~visi/page.tsx @@ -15,6 +15,8 @@ export async function generateMetadata({ const t = await getTranslations("GenerateMetaData"); return { title: params.username + " - repo - " + params.reponame + t("WhoCanSee"), + description: + params.username + " - repo - " + params.reponame + t("WhoCanSee"), }; } export default async function ListRepoVisi({ diff --git a/zbook_frontend/src/components/navbars/NavLang.tsx b/zbook_frontend/src/components/navbars/NavLang.tsx index 2322252..6660c77 100644 --- a/zbook_frontend/src/components/navbars/NavLang.tsx +++ b/zbook_frontend/src/components/navbars/NavLang.tsx @@ -18,7 +18,10 @@ export default function NavLink() { return (
- + - +
); diff --git a/zbook_frontend/src/components/navbars/NavTheme.tsx b/zbook_frontend/src/components/navbars/NavTheme.tsx index 14e1980..9d6fa13 100644 --- a/zbook_frontend/src/components/navbars/NavTheme.tsx +++ b/zbook_frontend/src/components/navbars/NavTheme.tsx @@ -26,7 +26,10 @@ export default function NavLang() { return (
- + - + ); @@ -30,7 +36,10 @@ export default async function UserState() { return ( <> - + ); diff --git a/zbook_frontend/src/components/navbars/SideBarToggle.tsx b/zbook_frontend/src/components/navbars/SideBarToggle.tsx index ce8ca89..1a31ff9 100644 --- a/zbook_frontend/src/components/navbars/SideBarToggle.tsx +++ b/zbook_frontend/src/components/navbars/SideBarToggle.tsx @@ -28,6 +28,7 @@ export default function SideBarToggle() { setSideBarOpen(!sideBarOpen); localStorage.setItem("sidebarValue", JSON.stringify(!sideBarOpen)); }} + aria-label="sidebar toggle" mounted={true} /> ); diff --git a/zbook_frontend/src/providers/dialogs/GlobalSearchButton.tsx b/zbook_frontend/src/providers/dialogs/GlobalSearchButton.tsx index 57af581..bab7150 100644 --- a/zbook_frontend/src/providers/dialogs/GlobalSearchButton.tsx +++ b/zbook_frontend/src/providers/dialogs/GlobalSearchButton.tsx @@ -13,6 +13,7 @@ export default function GlobalSearchButton() { setSearchType(SearchType.DOCUMENT); setSearchDialogOpen(true); }} + aria-label="search" className="block w-6 h-6 hover:text-sky-600 dark:hover:text-sky-400 cursor-pointer" /> );