Change default fonts
This commit is contained in:
parent
3c889d87ef
commit
3dd9e620a8
33 changed files with 31 additions and 105 deletions
|
@ -22,13 +22,11 @@ initSimpleImg({ threshold: 0.05 }, true);
|
||||||
export const App = () => {
|
export const App = () => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const contentFont = useSettingsStore((state) => state.general.fontContent);
|
const contentFont = useSettingsStore((state) => state.general.fontContent);
|
||||||
const headerFont = useSettingsStore((state) => state.general.fontHeader);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const root = document.documentElement;
|
const root = document.documentElement;
|
||||||
root.style.setProperty('--content-font-family', contentFont);
|
root.style.setProperty('--content-font-family', contentFont);
|
||||||
root.style.setProperty('--header-font-family', headerFont);
|
}, [contentFont]);
|
||||||
}, [contentFont, headerFont]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<QueryClientProvider client={queryClient}>
|
<QueryClientProvider client={queryClient}>
|
||||||
|
@ -66,7 +64,7 @@ export const App = () => {
|
||||||
xl: 18,
|
xl: 18,
|
||||||
xs: 10,
|
xs: 10,
|
||||||
},
|
},
|
||||||
headings: { fontFamily: 'var(--header-font-family)' },
|
headings: { fontFamily: 'var(--content-font-family)' },
|
||||||
other: {},
|
other: {},
|
||||||
spacing: {
|
spacing: {
|
||||||
lg: 12,
|
lg: 12,
|
||||||
|
|
|
@ -21,7 +21,7 @@ const HeaderWrapper = styled.div<{ position: 'left' | 'center' | 'right' }>`
|
||||||
? 'center'
|
? 'center'
|
||||||
: 'flex-start'};
|
: 'flex-start'};
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-family: var(--header-font-family);
|
font-family: var(--content-font-family);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
@ -11,23 +11,12 @@ import {
|
||||||
import { AppTheme } from '/@/renderer/themes/types';
|
import { AppTheme } from '/@/renderer/themes/types';
|
||||||
|
|
||||||
const FONT_OPTIONS = [
|
const FONT_OPTIONS = [
|
||||||
{ label: 'AnekTamil', value: 'AnekTamil' },
|
|
||||||
{ label: 'Archivo', value: 'Archivo' },
|
{ label: 'Archivo', value: 'Archivo' },
|
||||||
{ label: 'Circular STD', value: 'Circular STD' },
|
{ label: 'Fredoka', value: 'Fredoka' },
|
||||||
{ label: 'Didact Gothic', value: 'Didact Gothic' },
|
{ label: 'League Spartan', value: 'League Spartan' },
|
||||||
{ label: 'DM Sans', value: 'DM Sans' },
|
{ label: 'Lexend', value: 'Lexend' },
|
||||||
{ label: 'Encode Sans', value: 'Encode Sans' },
|
|
||||||
{ label: 'Epilogue', value: 'Epilogue' },
|
|
||||||
{ label: 'Gotham', value: 'Gotham' },
|
|
||||||
{ label: 'Inconsolata', value: 'Inconsolata' },
|
|
||||||
{ label: 'Inter', value: 'Inter' },
|
|
||||||
{ label: 'JetBrains Mono', value: 'JetBrainsMono' },
|
|
||||||
{ label: 'Manrope', value: 'Manrope' },
|
|
||||||
{ label: 'Montserrat', value: 'Montserrat' },
|
|
||||||
{ label: 'Oxygen', value: 'Oxygen' },
|
|
||||||
{ label: 'Poppins', value: 'Poppins' },
|
{ label: 'Poppins', value: 'Poppins' },
|
||||||
{ label: 'Raleway', value: 'Raleway' },
|
{ label: 'Raleway', value: 'Raleway' },
|
||||||
{ label: 'Roboto', value: 'Roboto' },
|
|
||||||
{ label: 'Sora', value: 'Sora' },
|
{ label: 'Sora', value: 'Sora' },
|
||||||
{ label: 'Work Sans', value: 'Work Sans' },
|
{ label: 'Work Sans', value: 'Work Sans' },
|
||||||
];
|
];
|
||||||
|
@ -68,6 +57,7 @@ export const GeneralTab = () => {
|
||||||
{
|
{
|
||||||
control: (
|
control: (
|
||||||
<Select
|
<Select
|
||||||
|
searchable
|
||||||
data={FONT_OPTIONS}
|
data={FONT_OPTIONS}
|
||||||
defaultValue={settings.fontContent}
|
defaultValue={settings.fontContent}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
@ -85,26 +75,6 @@ export const GeneralTab = () => {
|
||||||
isHidden: false,
|
isHidden: false,
|
||||||
title: 'Font (Content)',
|
title: 'Font (Content)',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
control: (
|
|
||||||
<Select
|
|
||||||
data={FONT_OPTIONS}
|
|
||||||
defaultValue={settings.fontHeader}
|
|
||||||
onChange={(e) => {
|
|
||||||
if (!e) return;
|
|
||||||
setSettings({
|
|
||||||
general: {
|
|
||||||
...settings,
|
|
||||||
fontHeader: e,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
description: 'Sets the application header font',
|
|
||||||
isHidden: false,
|
|
||||||
title: 'Font (Header)',
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const themeOptions = [
|
const themeOptions = [
|
||||||
|
|
Binary file not shown.
Binary file not shown.
BIN
src/renderer/fonts/Archivo-VariableFont_wdth,wght.ttf
Normal file
BIN
src/renderer/fonts/Archivo-VariableFont_wdth,wght.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
src/renderer/fonts/Fredoka-VariableFont_wdth,wght.ttf
Normal file
BIN
src/renderer/fonts/Fredoka-VariableFont_wdth,wght.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
src/renderer/fonts/LeagueSpartan-VariableFont_wght.ttf
Normal file
BIN
src/renderer/fonts/LeagueSpartan-VariableFont_wght.ttf
Normal file
Binary file not shown.
BIN
src/renderer/fonts/Lexend-VariableFont_wght.ttf
Normal file
BIN
src/renderer/fonts/Lexend-VariableFont_wght.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
src/renderer/fonts/Poppins-Italic.ttf
Normal file
BIN
src/renderer/fonts/Poppins-Italic.ttf
Normal file
Binary file not shown.
BIN
src/renderer/fonts/Poppins-Light.ttf
Normal file
BIN
src/renderer/fonts/Poppins-Light.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
src/renderer/fonts/Raleway-VariableFont_wght.ttf
Normal file
BIN
src/renderer/fonts/Raleway-VariableFont_wght.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
src/renderer/fonts/Sora-VariableFont_wght.ttf
Normal file
BIN
src/renderer/fonts/Sora-VariableFont_wght.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
src/renderer/fonts/WorkSans-VariableFont_wght.ttf
Normal file
BIN
src/renderer/fonts/WorkSans-VariableFont_wght.ttf
Normal file
Binary file not shown.
|
@ -83,7 +83,7 @@ export const useSettingsStore = create<SettingsSlice>()(
|
||||||
},
|
},
|
||||||
general: {
|
general: {
|
||||||
followSystemTheme: false,
|
followSystemTheme: false,
|
||||||
fontContent: 'Poppins',
|
fontContent: 'Sora',
|
||||||
showQueueDrawerButton: false,
|
showQueueDrawerButton: false,
|
||||||
sideQueueType: 'sideDrawerQueue',
|
sideQueueType: 'sideDrawerQueue',
|
||||||
theme: AppTheme.DEFAULT_DARK,
|
theme: AppTheme.DEFAULT_DARK,
|
||||||
|
|
|
@ -121,74 +121,46 @@ button {
|
||||||
animation: fadeOut 0.2s forwards;
|
animation: fadeOut 0.2s forwards;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "AnekTamil";
|
|
||||||
src: url("../fonts/AnekTamil-Regular.ttf") format("truetype");
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Archivo";
|
font-family: "Archivo";
|
||||||
src: url("../fonts/Archivo-Regular.ttf") format("truetype");
|
src: url("../fonts/Archivo-VariableFont_wdth,wght.ttf") format("truetype-variations");
|
||||||
|
font-weight: 100 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Circular STD";
|
font-family: "Raleway";
|
||||||
src: url("../fonts/CircularSTD-Regular.ttf") format("truetype");
|
src: url("../fonts/Raleway-VariableFont_wght.ttf") format("truetype-variations");
|
||||||
|
font-weight: 100 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Didact Gothic";
|
font-family: "Fredoka";
|
||||||
src: url("../fonts/DidactGothic-Regular.ttf") format("truetype");
|
src: url("../fonts/Fredoka-VariableFont_wdth,wght.ttf") format("truetype-variations");
|
||||||
|
font-weight: 100 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "DM Sans";
|
font-family: "League Spartan";
|
||||||
src: url("../fonts/DMSans-Regular.ttf") format("truetype");
|
src: url("../fonts/LeagueSpartan-VariableFont_wght.ttf") format("truetype-variations");
|
||||||
|
font-weight: 100 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Encode Sans";
|
font-family: "Lexend";
|
||||||
src: url("../fonts/EncodeSans-Regular.ttf") format("truetype");
|
src: url("../fonts/Lexend-VariableFont_wght.ttf") format("truetype-variations");
|
||||||
|
font-weight: 100 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Epilogue";
|
font-family: "Sora";
|
||||||
src: url("../fonts/Epilogue-Regular.ttf") format("truetype");
|
src: url("../fonts/Sora-VariableFont_wght.ttf") format("truetype-variations");
|
||||||
|
font-weight: 100 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Gotham";
|
font-family: "Work Sans";
|
||||||
src: url("../fonts/Gotham-Regular.ttf") format("truetype");
|
src: url("../fonts/WorkSans-VariableFont_wght.ttf") format("truetype-variations");
|
||||||
}
|
font-weight: 100 1000;
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "Inconsolata";
|
|
||||||
src: url("../fonts/Inconsolata-Regular.ttf") format("truetype");
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "Inter";
|
|
||||||
src: url("../fonts/Inter-Regular.ttf") format("truetype");
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "JetBrainsMono";
|
|
||||||
src: url("../fonts/JetBrainsMono-Regular.ttf") format("truetype");
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "Manrope";
|
|
||||||
src: url("../fonts/Manrope-Regular.ttf") format("truetype");
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "Montserrat";
|
|
||||||
src: url("../fonts/Montserrat-Regular.ttf") format("truetype");
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "Oxygen";
|
|
||||||
src: url("../fonts/Oxygen-Regular.ttf") format("truetype");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
|
@ -217,22 +189,8 @@ button {
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Raleway";
|
font-family: "Raleway";
|
||||||
src: url("../fonts/Raleway-Regular.ttf") format("truetype");
|
src: url("../fonts/Raleway-VariableFont_wght.ttf") format("truetype-variations");
|
||||||
}
|
font-weight: 100 1000;
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "Roboto";
|
|
||||||
src: url("../fonts/Roboto-Regular.ttf") format("truetype");
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "Sora";
|
|
||||||
src: url("../fonts/Sora-Regular.ttf") format("truetype");
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "Work Sans";
|
|
||||||
src: url("../fonts/WorkSans-Regular.ttf") format("truetype");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.ag-header-cell-label {
|
.ag-header-cell-label {
|
||||||
font-family: var(--header-font-family);
|
font-family: var(--content-font-family);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue