1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-08-09 15:35:29 +02:00

dynamic layout

This commit is contained in:
Ran Shamay 2023-10-12 13:38:25 +03:00
parent 7fdb253b35
commit d6d8d46d30
3 changed files with 8 additions and 2 deletions

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html dir="rtl">
<html>
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />

View file

@ -16,7 +16,6 @@ import 'easymde/dist/easymde.min.css';
import '../lib/custom-ui/styles.css';
import '../styles.module.scss';
import OidcLoginContainer from '../containers/OidcLoginContainer';
import './semantic.rtl.min.css';
function Root({ store, history, config }) {
return (

View file

@ -32,6 +32,13 @@ i18n.dateFns = {
};
i18n.on('languageChanged', () => {
if (i18n.resolvedLanguage === 'he' || i18n.resolvedLanguage === 'ar') {
document.documentElement.setAttribute('dir', 'rtl');
import('./components/semantic.rtl.min.css');
} else {
document.documentElement.setAttribute('dir', 'ltr');
}
setDefaultLocale(i18n.resolvedLanguage);
});