diff --git a/public/icons/icon.png b/public/icons/icon.png new file mode 100644 index 00000000..b44dd348 Binary files /dev/null and b/public/icons/icon.png differ diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 6c453f85..e96a870b 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,4 +1,4 @@ -import type { Metadata } from "next"; +import type { Metadata, Viewport } from "next"; import { Geist, Geist_Mono } from "next/font/google"; import "./globals.css"; import { Providers } from "@/components/providers"; @@ -13,9 +13,29 @@ const geistMono = Geist_Mono({ subsets: ["latin"], }); +export const viewport: Viewport = { + themeColor: '#f97316', + width: 'device-width', + initialScale: 1, + maximumScale: 1, + userScalable: false, +}; + export const metadata: Metadata = { title: "AI智能错题本", - description: "基于AI的智能错题管理系统", + description: "基于AI的智能错题管理系统,帮助学生高效整理、分析和复习错题", + appleWebApp: { + capable: true, + statusBarStyle: 'default', + title: '智能错题本', + }, + formatDetection: { + telephone: false, + }, + icons: { + icon: '/icons/icon.png', + apple: '/icons/icon.png', + }, }; export default function RootLayout({ diff --git a/src/app/manifest.ts b/src/app/manifest.ts new file mode 100644 index 00000000..2391f475 --- /dev/null +++ b/src/app/manifest.ts @@ -0,0 +1,21 @@ +import type { MetadataRoute } from 'next' + +export default function manifest(): MetadataRoute.Manifest { + return { + name: '智能错题本', + short_name: '错题本', + description: 'AI 驱动的智能错题管理系统,帮助学生高效整理、分析和复习错题', + start_url: '/', + display: 'standalone', + background_color: '#ffffff', + theme_color: '#f97316', + orientation: 'portrait', + icons: [ + { + src: '/icons/icon.png', + sizes: 'any', + type: 'image/png', + }, + ], + } +}