update,
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
"fm:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"",
|
||||
"fm:fix": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
|
||||
"fix:all": "npm run lint:fix && npm run fm:fix",
|
||||
"fix:all:w": "npx nodemon --delay 1 --ext js,jsx,ts,tsx --exec \"npm run fix:all\"",
|
||||
"clean": "rm -rf node_modules .next out dist build",
|
||||
"re:dev": "yarn clean && yarn install && yarn dev",
|
||||
"re:build": "yarn clean && yarn install && yarn build",
|
||||
@@ -37,8 +38,11 @@
|
||||
"@emotion/styled": "^11.14.0",
|
||||
"@fontsource-variable/dm-sans": "^5.2.5",
|
||||
"@fontsource-variable/inter": "^5.2.5",
|
||||
"@fontsource-variable/noto-sans": "^5.2.7",
|
||||
"@fontsource-variable/noto-sans-jp": "^5.2.5",
|
||||
"@fontsource-variable/noto-sans-sc": "^5.2.5",
|
||||
"@fontsource-variable/noto-sans-tc": "^5.2.5",
|
||||
"@fontsource-variable/nunito-sans": "^5.2.5",
|
||||
"@fontsource-variable/public-sans": "^5.2.5",
|
||||
"@fontsource/barlow": "^5.2.5",
|
||||
"@fullcalendar/core": "^6.1.15",
|
||||
"@fullcalendar/daygrid": "^6.1.15",
|
||||
@@ -48,6 +52,7 @@
|
||||
"@fullcalendar/timegrid": "^6.1.15",
|
||||
"@fullcalendar/timeline": "^6.1.15",
|
||||
"@hookform/resolvers": "^4.1.3",
|
||||
"@ianvs/prettier-plugin-sort-imports": "^4.4.1",
|
||||
"@iconify/react": "^5.2.0",
|
||||
"@mui/lab": "^7.0.0-beta.10",
|
||||
"@mui/material": "^7.0.1",
|
||||
@@ -137,4 +142,4 @@
|
||||
"vite": "^6.2.3",
|
||||
"vite-plugin-checker": "^0.9.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,20 +1,26 @@
|
||||
/** **************************************
|
||||
* Fonts: app
|
||||
*************************************** */
|
||||
@import '@fontsource-variable/public-sans';
|
||||
@import '@fontsource-variable/noto-sans-tc';
|
||||
@import '@fontsource-variable/noto-sans-sc';
|
||||
@import '@fontsource-variable/noto-sans-jp';
|
||||
|
||||
/* @import '@fontsource-variable/public-sans'; */
|
||||
|
||||
/*
|
||||
@import '@fontsource/barlow/400.css';
|
||||
@import '@fontsource/barlow/500.css';
|
||||
@import '@fontsource/barlow/600.css';
|
||||
@import '@fontsource/barlow/700.css';
|
||||
@import '@fontsource/barlow/800.css';
|
||||
*/
|
||||
|
||||
/** **************************************
|
||||
* Fonts: options
|
||||
*************************************** */
|
||||
@import '@fontsource-variable/dm-sans';
|
||||
@import '@fontsource-variable/inter';
|
||||
@import '@fontsource-variable/nunito-sans';
|
||||
/* @import '@fontsource-variable/dm-sans'; */
|
||||
/* @import '@fontsource-variable/inter'; */
|
||||
/* @import '@fontsource-variable/nunito-sans'; */
|
||||
|
||||
/** **************************************
|
||||
* Plugins
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import type { CommonColors } from '@mui/material/styles';
|
||||
|
||||
import type { PaletteColorNoChannels } from './core/palette';
|
||||
import type { ThemeDirection, ThemeColorScheme, ThemeCssVariables } from './types';
|
||||
import type { ThemeColorScheme, ThemeCssVariables, ThemeDirection } from './types';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
@@ -25,6 +24,12 @@ type ThemeConfig = {
|
||||
};
|
||||
};
|
||||
|
||||
const navigator_language = navigator.language;
|
||||
let primaryFont = 'Noto Sans TC Variable';
|
||||
if (navigator_language.startsWith('zh')) primaryFont = 'Noto Sans TC Variable';
|
||||
if (navigator_language.startsWith('sc')) primaryFont = 'Noto Sans SC Variable';
|
||||
if (navigator_language.startsWith('jp')) primaryFont = 'Noto Sans JP Variable';
|
||||
|
||||
export const themeConfig: ThemeConfig = {
|
||||
/** **************************************
|
||||
* Base
|
||||
@@ -38,7 +43,12 @@ export const themeConfig: ThemeConfig = {
|
||||
* Typography
|
||||
*************************************** */
|
||||
fontFamily: {
|
||||
primary: 'Public Sans Variable',
|
||||
// primary: 'Public Sans Variable',
|
||||
|
||||
// added fontsource-variable fonts src/global.css
|
||||
primary: primaryFont,
|
||||
|
||||
//
|
||||
secondary: 'Barlow',
|
||||
},
|
||||
/** **************************************
|
||||
|
Reference in New Issue
Block a user