<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="renderer" content="webkit" />
<meta name="google" content="notranslate" />
<meta name="description" content="Tauri + React app" />
<meta name="format-detection" content="telephone=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
<title>Hello</title>
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<div id="loading"></div>
<div id="lock"></div>
<div id="portal"></div>
<div id="cover"></div>
<script>
console.log('client width -- ', document.documentElement.clientWidth);
console.log('client height -- ', document.documentElement.clientHeight);
(function (doc, win) {
var docEl = doc.documentElement;
var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
function recalc () {
var clientWidth = docEl.clientWidth;
if (!clientWidth) return;
if (clientWidth <= 390) {
docEl.style.fontSize = '10px';
} else if (clientWidth > 390 && clientWidth <= 768) {
docEl.style.fontSize = '11px';
} else if (clientWidth > 768 && clientWidth <= 1920) {
docEl.style.fontSize = '10px';
} else {
docEl.style.fontSize = '11px';
}
};
if (!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);
</script>
</body>
</html>