feat(新字体): 引入“Baloo 2”字体,并设置成全局默认字体
This commit is contained in:
parent
3666313707
commit
de9bf30b24
BIN
src/assets/fonts/BalooDa2/BalooDa2-Bold.ttf
Normal file
BIN
src/assets/fonts/BalooDa2/BalooDa2-Bold.ttf
Normal file
Binary file not shown.
BIN
src/assets/fonts/BalooDa2/BalooDa2-ExtraBold.ttf
Normal file
BIN
src/assets/fonts/BalooDa2/BalooDa2-ExtraBold.ttf
Normal file
Binary file not shown.
BIN
src/assets/fonts/BalooDa2/BalooDa2-Medium.ttf
Normal file
BIN
src/assets/fonts/BalooDa2/BalooDa2-Medium.ttf
Normal file
Binary file not shown.
BIN
src/assets/fonts/BalooDa2/BalooDa2-Regular.ttf
Normal file
BIN
src/assets/fonts/BalooDa2/BalooDa2-Regular.ttf
Normal file
Binary file not shown.
BIN
src/assets/fonts/BalooDa2/BalooDa2-SemiBold.ttf
Normal file
BIN
src/assets/fonts/BalooDa2/BalooDa2-SemiBold.ttf
Normal file
Binary file not shown.
@ -1,16 +1,19 @@
|
||||
// src/main.js
|
||||
import './assets/main.css'
|
||||
import './styles/fonts.css'
|
||||
import './styles/global.css' // 引入全局样式
|
||||
|
||||
import { logEnvInfo } from './utils/env.js'
|
||||
import { versionChecker } from './utils/versionChecker.js'
|
||||
import { smartImage } from './directives/smartImage.js'
|
||||
import { createPinia } from 'pinia'
|
||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
||||
import { createApp } from 'vue'
|
||||
import { useLangStore } from '@/stores/lang'
|
||||
import i18n, { initI18n, setLocale } from './locales/i18n'
|
||||
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import { useLangStore } from '@/stores/lang' // 移动到顶部
|
||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
||||
|
||||
// 初始化环境信息
|
||||
logEnvInfo()
|
||||
|
||||
40
src/styles/fonts.css
Normal file
40
src/styles/fonts.css
Normal file
@ -0,0 +1,40 @@
|
||||
/* src/styles/fonts.css */
|
||||
@font-face {
|
||||
font-family: 'Baloo 2';
|
||||
src: url('@/assets/fonts/BalooDa2/BalooDa2-Regular.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Baloo 2';
|
||||
src: url('@/assets/fonts/BalooDa2/BalooDa2-Medium.ttf') format('truetype');
|
||||
font-weight: 500;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Baloo 2';
|
||||
src: url('@/assets/fonts/BalooDa2/BalooDa2-SemiBold.ttf') format('truetype');
|
||||
font-weight: 600;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Baloo 2';
|
||||
src: url('@/assets/fonts/BalooDa2/BalooDa2-Bold.ttf') format('truetype');
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Baloo 2';
|
||||
src: url('@/assets/fonts/BalooDa2/BalooDa2-ExtraBold.ttf') format('truetype');
|
||||
font-weight: 800;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
18
src/styles/global.css
Normal file
18
src/styles/global.css
Normal file
@ -0,0 +1,18 @@
|
||||
/* src/styles/global.css */
|
||||
/* 设置全局默认字体 */
|
||||
html {
|
||||
font-family: 'Baloo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Baloo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* 如果需要确保所有元素都使用该字体 */
|
||||
* {
|
||||
font-family: 'Baloo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user