fix(client): Fix #6526

This commit is contained in:
syuilo
2020-07-15 18:22:19 +09:00
parent 9d3beb3174
commit e7f1ab2d01
4 changed files with 22 additions and 6 deletions

View File

@ -59,6 +59,16 @@ if (localStorage.getItem('theme') == null) {
applyTheme(lightTheme);
}
//#region SEE: https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
// TODO: いつの日にか消したい
const vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
window.addEventListener('resize', () => {
const vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
});
//#endregion
//#region Detect the user language
let lang = localStorage.getItem('lang');