diff --git a/src/assets/styles/opposans/OPPOSans-Bold.ttf b/src/assets/styles/opposans/OPPOSans-Bold.ttf deleted file mode 100644 index b764e98..0000000 Binary files a/src/assets/styles/opposans/OPPOSans-Bold.ttf and /dev/null differ diff --git a/src/assets/styles/opposans/OPPOSans-Bold.woff2 b/src/assets/styles/opposans/OPPOSans-Bold.woff2 deleted file mode 100644 index 989ed90..0000000 Binary files a/src/assets/styles/opposans/OPPOSans-Bold.woff2 and /dev/null differ diff --git a/src/assets/styles/opposans/OPPOSans-Medium.ttf b/src/assets/styles/opposans/OPPOSans-Medium.ttf deleted file mode 100644 index c60c3c7..0000000 Binary files a/src/assets/styles/opposans/OPPOSans-Medium.ttf and /dev/null differ diff --git a/src/assets/styles/opposans/OPPOSans-Medium.woff2 b/src/assets/styles/opposans/OPPOSans-Medium.woff2 deleted file mode 100644 index cda829c..0000000 Binary files a/src/assets/styles/opposans/OPPOSans-Medium.woff2 and /dev/null differ diff --git a/src/assets/styles/opposans/OPPOSans-Regular.ttf b/src/assets/styles/opposans/OPPOSans-Regular.ttf deleted file mode 100644 index d41b703..0000000 Binary files a/src/assets/styles/opposans/OPPOSans-Regular.ttf and /dev/null differ diff --git a/src/assets/styles/opposans/OPPOSans-Regular.woff2 b/src/assets/styles/opposans/OPPOSans-Regular.woff2 deleted file mode 100644 index d4f89da..0000000 Binary files a/src/assets/styles/opposans/OPPOSans-Regular.woff2 and /dev/null differ diff --git a/src/assets/styles/opposans/opposans.css b/src/assets/styles/opposans/opposans.css deleted file mode 100644 index b162b55..0000000 --- a/src/assets/styles/opposans/opposans.css +++ /dev/null @@ -1,27 +0,0 @@ -/** - * OPPO Sans Fonts - */ -@font-face { - font-family: 'OPPOSans'; - src: - url(OPPOSans-Regular.woff2) format('woff2'), - url(OPPOSans-Regular.ttf) format('truetype'); - font-weight: 400; - font-style: normal; -} -@font-face { - font-family: 'OPPOSans'; - src: - url(OPPOSans-Medium.woff2) format('woff2'), - url(OPPOSans-Medium.ttf) format('truetype'); - font-weight: 600; - font-style: normal; -} -@font-face { - font-family: 'OPPOSans'; - src: - url(OPPOSans-Bold.woff2) format('woff2'), - url(OPPOSans-Bold.ttf) format('truetype'); - font-weight: 800; - font-style: normal; -} diff --git a/src/components/player/MusicPlayer.astro b/src/components/player/MusicPlayer.astro index b75cf0b..bed42d3 100644 --- a/src/components/player/MusicPlayer.astro +++ b/src/components/player/MusicPlayer.astro @@ -1,6 +1,5 @@ --- import { resolveSong, type MusicPlayerProps } from '@/components/player/resolver'; -import 'aplayer/dist/APlayer.min.css'; interface Props extends MusicPlayerProps {} diff --git a/src/helpers/og.ts b/src/helpers/og.ts index 9a4a359..ead9ea5 100644 --- a/src/helpers/og.ts +++ b/src/helpers/og.ts @@ -135,13 +135,13 @@ export const defaultOpenGraph = async (): Promise => { return await fetchCover('/images/default-cover.jpg'); }; -export const drawOpenGraph = async ({ title, summary, cover }: OpenGraphProps): Promise => { - // Register the font if it doesn't exist - if (!GlobalFonts.has('NotoSansSC-Bold')) { - const fontBuffer = await readFile(join(process.cwd(), 'src/assets/og/NotoSansSC-Bold.ttf')); - GlobalFonts.register(fontBuffer, 'NotoSansSC-Bold'); - } +// Register the font if it doesn't exist +if (!GlobalFonts.has('NotoSansSC-Bold')) { + const fontBuffer = await readFile(join(process.cwd(), '/src/assets/og/NotoSansSC-Bold.ttf')); + GlobalFonts.register(fontBuffer, 'NotoSansSC-Bold'); +} +export const drawOpenGraph = async ({ title, summary, cover }: OpenGraphProps): Promise => { // Fetch the cover image as the background const coverImage = new Image(); coverImage.src = await fetchCover(cover); diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 0ca94e7..592ac96 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -1,8 +1,8 @@ --- // tslint:disable:ordered-imports import 'bootstrap/dist/css/bootstrap.min.css'; -import '@/assets/styles/opposans/opposans.css'; import '@/assets/styles/iconfont/iconfont.css'; +import 'aplayer/dist/APlayer.min.css'; import '@/assets/styles/reset.css'; import '@/assets/styles/globals.css';