From 8ace254a0f033fc7581a6ae93c9107f953acf6f1 Mon Sep 17 00:00:00 2001 From: Yufan Sheng Date: Tue, 25 Jun 2024 20:45:14 +0800 Subject: [PATCH] feat: add opposans fonts through cdn. --- src/assets/styles/opposans.css | 27 +++++++++++++++++++++++++++ src/layouts/BaseLayout.astro | 1 + 2 files changed, 28 insertions(+) create mode 100644 src/assets/styles/opposans.css diff --git a/src/assets/styles/opposans.css b/src/assets/styles/opposans.css new file mode 100644 index 0000000..667d9e4 --- /dev/null +++ b/src/assets/styles/opposans.css @@ -0,0 +1,27 @@ +/** + * OPPO Sans Fonts + */ +@font-face { + font-family: 'OPPOSans'; + src: + url(https://cdn.yufan.me/opposans/OPPOSans-Regular.woff2) format('woff2'), + url(https://cdn.yufan.me/opposans/OPPOSans-Regular.ttf) format('truetype'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: 'OPPOSans'; + src: + url(https://cdn.yufan.me/opposans/OPPOSans-Medium.woff2) format('woff2'), + url(https://cdn.yufan.me/opposans/OPPOSans-Medium.ttf) format('truetype'); + font-weight: 600; + font-style: normal; +} +@font-face { + font-family: 'OPPOSans'; + src: + url(https://cdn.yufan.me/opposans/OPPOSans-Bold.woff2) format('woff2'), + url(https://cdn.yufan.me/opposans/OPPOSans-Bold.ttf) format('truetype'); + font-weight: 800; + font-style: normal; +} diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 395e627..c835e94 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -5,6 +5,7 @@ import '@/assets/styles/iconfont/iconfont.css'; import 'aplayer/dist/APlayer.min.css'; import '@/assets/styles/reset.css'; import '@/assets/styles/globals.css'; +import '@/assets/styles/opposans.css'; import Footer from '@/components/footer/Footer.astro'; import Header from '@/components/header/Header.astro';