From e152e90a5ae9a11e871f264b95d17bd596aa6b4e Mon Sep 17 00:00:00 2001 From: Yufan Sheng Date: Mon, 17 Jun 2024 20:26:39 +0800 Subject: [PATCH] feat: fix typo. --- README.md | 2 +- src/{asserts => assets}/og/NotoSansSC-Bold.ttf | Bin src/{asserts => assets}/og/logo-dark.png | Bin src/{asserts => assets}/og/open-graph.png | Bin src/{asserts => assets}/scripts/sticky-sidebar.js | 0 src/{asserts => assets}/scripts/yufan.me.js | 0 src/{asserts => assets}/styles/globals.css | 0 .../styles/iconfont/iconfont.css | 0 .../styles/iconfont/iconfont.ttf | Bin .../styles/iconfont/iconfont.woff | Bin .../styles/iconfont/iconfont.woff2 | Bin .../styles/opposans/OPPOSans-Bold.ttf | Bin .../styles/opposans/OPPOSans-Bold.woff2 | Bin .../styles/opposans/OPPOSans-Medium.ttf | Bin .../styles/opposans/OPPOSans-Medium.woff2 | Bin .../styles/opposans/OPPOSans-Regular.ttf | Bin .../styles/opposans/OPPOSans-Regular.woff2 | Bin .../styles/opposans/opposans.css | 0 src/{asserts => assets}/styles/reset.css | 0 src/helpers/og.ts | 6 +++--- src/layouts/BaseLayout.astro | 10 +++++----- 21 files changed, 9 insertions(+), 9 deletions(-) rename src/{asserts => assets}/og/NotoSansSC-Bold.ttf (100%) rename src/{asserts => assets}/og/logo-dark.png (100%) rename src/{asserts => assets}/og/open-graph.png (100%) rename src/{asserts => assets}/scripts/sticky-sidebar.js (100%) rename src/{asserts => assets}/scripts/yufan.me.js (100%) rename src/{asserts => assets}/styles/globals.css (100%) rename src/{asserts => assets}/styles/iconfont/iconfont.css (100%) rename src/{asserts => assets}/styles/iconfont/iconfont.ttf (100%) rename src/{asserts => assets}/styles/iconfont/iconfont.woff (100%) rename src/{asserts => assets}/styles/iconfont/iconfont.woff2 (100%) rename src/{asserts => assets}/styles/opposans/OPPOSans-Bold.ttf (100%) rename src/{asserts => assets}/styles/opposans/OPPOSans-Bold.woff2 (100%) rename src/{asserts => assets}/styles/opposans/OPPOSans-Medium.ttf (100%) rename src/{asserts => assets}/styles/opposans/OPPOSans-Medium.woff2 (100%) rename src/{asserts => assets}/styles/opposans/OPPOSans-Regular.ttf (100%) rename src/{asserts => assets}/styles/opposans/OPPOSans-Regular.woff2 (100%) rename src/{asserts => assets}/styles/opposans/opposans.css (100%) rename src/{asserts => assets}/styles/reset.css (100%) diff --git a/README.md b/README.md index e14c5b9..741ac93 100644 --- a/README.md +++ b/README.md @@ -208,7 +208,7 @@ They are the fonts that can be used in business without any charge. The [OPPOSans 3.0](https://www.coloros.com/article/A00000050) is used for reading in my weblog. It can be used in business scenarios without any modification. -I just placed it under the [opposans](src/asserts/styles/opposans/) directory for better integration. +I just placed it under the [opposans](src/assets/styles/opposans/) directory for better integration. The license file is [here](licenses/LICENSE.oppo-sans.txt) ### Open Graph Font License diff --git a/src/asserts/og/NotoSansSC-Bold.ttf b/src/assets/og/NotoSansSC-Bold.ttf similarity index 100% rename from src/asserts/og/NotoSansSC-Bold.ttf rename to src/assets/og/NotoSansSC-Bold.ttf diff --git a/src/asserts/og/logo-dark.png b/src/assets/og/logo-dark.png similarity index 100% rename from src/asserts/og/logo-dark.png rename to src/assets/og/logo-dark.png diff --git a/src/asserts/og/open-graph.png b/src/assets/og/open-graph.png similarity index 100% rename from src/asserts/og/open-graph.png rename to src/assets/og/open-graph.png diff --git a/src/asserts/scripts/sticky-sidebar.js b/src/assets/scripts/sticky-sidebar.js similarity index 100% rename from src/asserts/scripts/sticky-sidebar.js rename to src/assets/scripts/sticky-sidebar.js diff --git a/src/asserts/scripts/yufan.me.js b/src/assets/scripts/yufan.me.js similarity index 100% rename from src/asserts/scripts/yufan.me.js rename to src/assets/scripts/yufan.me.js diff --git a/src/asserts/styles/globals.css b/src/assets/styles/globals.css similarity index 100% rename from src/asserts/styles/globals.css rename to src/assets/styles/globals.css diff --git a/src/asserts/styles/iconfont/iconfont.css b/src/assets/styles/iconfont/iconfont.css similarity index 100% rename from src/asserts/styles/iconfont/iconfont.css rename to src/assets/styles/iconfont/iconfont.css diff --git a/src/asserts/styles/iconfont/iconfont.ttf b/src/assets/styles/iconfont/iconfont.ttf similarity index 100% rename from src/asserts/styles/iconfont/iconfont.ttf rename to src/assets/styles/iconfont/iconfont.ttf diff --git a/src/asserts/styles/iconfont/iconfont.woff b/src/assets/styles/iconfont/iconfont.woff similarity index 100% rename from src/asserts/styles/iconfont/iconfont.woff rename to src/assets/styles/iconfont/iconfont.woff diff --git a/src/asserts/styles/iconfont/iconfont.woff2 b/src/assets/styles/iconfont/iconfont.woff2 similarity index 100% rename from src/asserts/styles/iconfont/iconfont.woff2 rename to src/assets/styles/iconfont/iconfont.woff2 diff --git a/src/asserts/styles/opposans/OPPOSans-Bold.ttf b/src/assets/styles/opposans/OPPOSans-Bold.ttf similarity index 100% rename from src/asserts/styles/opposans/OPPOSans-Bold.ttf rename to src/assets/styles/opposans/OPPOSans-Bold.ttf diff --git a/src/asserts/styles/opposans/OPPOSans-Bold.woff2 b/src/assets/styles/opposans/OPPOSans-Bold.woff2 similarity index 100% rename from src/asserts/styles/opposans/OPPOSans-Bold.woff2 rename to src/assets/styles/opposans/OPPOSans-Bold.woff2 diff --git a/src/asserts/styles/opposans/OPPOSans-Medium.ttf b/src/assets/styles/opposans/OPPOSans-Medium.ttf similarity index 100% rename from src/asserts/styles/opposans/OPPOSans-Medium.ttf rename to src/assets/styles/opposans/OPPOSans-Medium.ttf diff --git a/src/asserts/styles/opposans/OPPOSans-Medium.woff2 b/src/assets/styles/opposans/OPPOSans-Medium.woff2 similarity index 100% rename from src/asserts/styles/opposans/OPPOSans-Medium.woff2 rename to src/assets/styles/opposans/OPPOSans-Medium.woff2 diff --git a/src/asserts/styles/opposans/OPPOSans-Regular.ttf b/src/assets/styles/opposans/OPPOSans-Regular.ttf similarity index 100% rename from src/asserts/styles/opposans/OPPOSans-Regular.ttf rename to src/assets/styles/opposans/OPPOSans-Regular.ttf diff --git a/src/asserts/styles/opposans/OPPOSans-Regular.woff2 b/src/assets/styles/opposans/OPPOSans-Regular.woff2 similarity index 100% rename from src/asserts/styles/opposans/OPPOSans-Regular.woff2 rename to src/assets/styles/opposans/OPPOSans-Regular.woff2 diff --git a/src/asserts/styles/opposans/opposans.css b/src/assets/styles/opposans/opposans.css similarity index 100% rename from src/asserts/styles/opposans/opposans.css rename to src/assets/styles/opposans/opposans.css diff --git a/src/asserts/styles/reset.css b/src/assets/styles/reset.css similarity index 100% rename from src/asserts/styles/reset.css rename to src/assets/styles/reset.css diff --git a/src/helpers/og.ts b/src/helpers/og.ts index 96a1f73..8ed39ee 100644 --- a/src/helpers/og.ts +++ b/src/helpers/og.ts @@ -9,8 +9,8 @@ import { options } from '@/helpers/schema'; import { Canvas, GlobalFonts, Image, type SKRSContext2D } from '@napi-rs/canvas'; import { readFile } from 'node:fs/promises'; import { join } from 'node:path'; -import font from '../asserts/og/NotoSansSC-Bold.ttf?arraybuffer'; -import logoDark from '../asserts/og/logo-dark.png?arraybuffer'; +import font from '../assets/og/NotoSansSC-Bold.ttf?arraybuffer'; +import logoDark from '../assets/og/logo-dark.png?arraybuffer'; const getStringWidth = (text: string, fontSize: number) => { let result = 0; @@ -114,7 +114,7 @@ const fetchCover = async (cover: string): Promise => { return await readFile(coverPath); }; -export { default as defaultOpenGraph } from '../asserts/og/open-graph.png?arraybuffer'; +export { default as defaultOpenGraph } from '../assets/og/open-graph.png?arraybuffer'; export interface OpenGraphProps { title: string; diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 1dee01b..0ca94e7 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -1,10 +1,10 @@ --- // tslint:disable:ordered-imports import 'bootstrap/dist/css/bootstrap.min.css'; -import '@/asserts/styles/opposans/opposans.css'; -import '@/asserts/styles/iconfont/iconfont.css'; -import '@/asserts/styles/reset.css'; -import '@/asserts/styles/globals.css'; +import '@/assets/styles/opposans/opposans.css'; +import '@/assets/styles/iconfont/iconfont.css'; +import '@/assets/styles/reset.css'; +import '@/assets/styles/globals.css'; import Footer from '@/components/footer/Footer.astro'; import GoTop from '@/components/footer/GoTop.astro'; @@ -57,7 +57,7 @@ const description = Astro.props.description || options.description;