Skip to content

Commit

Permalink
Fix up the fonts and language settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Moitié committed Sep 11, 2023
1 parent 2dab005 commit 471905e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
15 changes: 13 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,27 @@ import Filters from './components/Filters';
import styles from './styles/main.module.scss';

import '@blueprintjs/core/lib/css/blueprint.css';
import CoachDaveSponsor from "./components/CoachDaveSponsor";
import CoachDaveSponsor from './components/CoachDaveSponsor';

import './styles/fonts.css';

export default function App(): React.Node {
const { t } = useTranslation();
const { t, i18n } = useTranslation();
const dispatch = useDispatch();

React.useEffect(() => {
dispatch(startListener());

return () => {};
}, []);

React.useEffect(() => {
document.body.dir = i18n.dir();
document.documentElement.setAttribute('lang', i18n.language);

return () => {};
}, [i18n.language]);

return (
<div>
<Navbar />
Expand Down
3 changes: 2 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
<meta name="msapplication-TileImage" content="/static/mstile-144x144.png">
<meta name="theme-color" content="#ec232c">
<meta name=viewport content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Lato&subset=latin,latin-ext" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Noto+Sans&subset=latin,latin-ext" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+JP:wght@400;500;600;700&display=swap" rel="stylesheet">
</head>
<body>
<div id='root' class='padbox'></div>
Expand Down
15 changes: 15 additions & 0 deletions src/styles/fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
html body,
html input::placeholder,
html button,
html input {
font-family: 'Noto Sans', sans-serif;
}


html[lang="ja"] body,
html[lang="ja"] input::placeholder,
html[lang="ja"] button,
html[lang="ja"] input {
font-family: 'Noto Sans JP', sans-serif;
}

0 comments on commit 471905e

Please sign in to comment.