fix(web): 离线/内网环境改用系统字体,避免构建时联网下载 Google 字体
This commit is contained in:
@@ -4,6 +4,16 @@
|
|||||||
|
|
||||||
@custom-variant dark (&:is(.dark *));
|
@custom-variant dark (&:is(.dark *));
|
||||||
|
|
||||||
|
/* 系统字体回退:离线/内网环境不依赖 Google 字体 */
|
||||||
|
:root {
|
||||||
|
--font-sans: ui-sans-serif, system-ui, -apple-system, "PingFang SC",
|
||||||
|
"Microsoft YaHei", "Hiragino Sans GB", "Segoe UI", Roboto, Helvetica, Arial,
|
||||||
|
sans-serif;
|
||||||
|
--font-geist-sans: var(--font-sans);
|
||||||
|
--font-geist-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
|
||||||
|
"Liberation Mono", monospace;
|
||||||
|
}
|
||||||
|
|
||||||
@theme inline {
|
@theme inline {
|
||||||
--color-background: var(--background);
|
--color-background: var(--background);
|
||||||
--color-foreground: var(--foreground);
|
--color-foreground: var(--foreground);
|
||||||
|
|||||||
@@ -1,18 +1,16 @@
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import { Geist, Geist_Mono } from "next/font/google";
|
|
||||||
import { Providers } from "@/components/providers";
|
import { Providers } from "@/components/providers";
|
||||||
import { Toaster } from "@/components/ui/sonner";
|
import { Toaster } from "@/components/ui/sonner";
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
|
|
||||||
const geistSans = Geist({
|
// 使用系统字体,避免构建时联网下载 Google 字体(内网/离线环境)
|
||||||
|
const geistSans = {
|
||||||
variable: "--font-geist-sans",
|
variable: "--font-geist-sans",
|
||||||
subsets: ["latin"],
|
};
|
||||||
});
|
|
||||||
|
|
||||||
const geistMono = Geist_Mono({
|
const geistMono = {
|
||||||
variable: "--font-geist-mono",
|
variable: "--font-geist-mono",
|
||||||
subsets: ["latin"],
|
};
|
||||||
});
|
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "AI智能应用平台",
|
title: "AI智能应用平台",
|
||||||
|
|||||||
Reference in New Issue
Block a user