fix(theme): use next font athelas variable globally
This commit is contained in:
+2
-2
@@ -9,7 +9,7 @@ import localFont from "next/font/local";
|
|||||||
* - 产出的 CSS 变量由 `globals.css` 桥接到 Tailwind(如 `font-sans`、`font-athelas`)。
|
* - 产出的 CSS 变量由 `globals.css` 桥接到 Tailwind(如 `font-sans`、`font-athelas`)。
|
||||||
*
|
*
|
||||||
* 注意:本文件不通过 `src/lib/index.ts` 桶导出,避免被误打进客户端 bundle。
|
* 注意:本文件不通过 `src/lib/index.ts` 桶导出,避免被误打进客户端 bundle。
|
||||||
* 引用方式:`import { geistSans, geistMono, athelas } from "@/lib/fonts";`
|
* 引用方式:`import { geistSans, geistMono, athelas } from "@/core/fonts";`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const geistSans = Geist({
|
const geistSans = Geist({
|
||||||
@@ -29,7 +29,7 @@ const geistMono = Geist_Mono({
|
|||||||
* 放置位置:/public/fonts/Athelas-*.ttf
|
* 放置位置:/public/fonts/Athelas-*.ttf
|
||||||
*
|
*
|
||||||
* 路径计算(`next/font/local` 要求相对路径从调用文件出发):
|
* 路径计算(`next/font/local` 要求相对路径从调用文件出发):
|
||||||
* src/lib/fonts.ts → ../../public/fonts/...
|
* src/core/fonts.ts → ../../public/fonts/...
|
||||||
*/
|
*/
|
||||||
const athelas = localFont({
|
const athelas = localFont({
|
||||||
src: [
|
src: [
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
*/
|
*/
|
||||||
--font-system: var(--font-athelas), system-ui, -apple-system,
|
--font-system: var(--font-athelas), system-ui, -apple-system,
|
||||||
BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||||
--font-athelas: "Athelas", serif;
|
|
||||||
|
|
||||||
/* Tailwind 默认字体别名:font-sans → font-system */
|
/* Tailwind 默认字体别名:font-sans → font-system */
|
||||||
--font-sans: var(--font-system);
|
--font-sans: var(--font-system);
|
||||||
|
|||||||
Reference in New Issue
Block a user