Compare commits

...

3 Commits

Author SHA1 Message Date
b497cebe76 Merge commit 'fcd657c10ea14290455cfb0bf2de89375a664143' into dev
All checks were successful
continuous-integration/drone/push Build is passing
close #31
2021-01-14 18:26:33 +01:00
0fa107a75b [tmp] - disable serviceworker 2021-01-14 18:25:01 +01:00
fcd657c10e 🐞 fix sidebar mobile-md scaling
ref #31
2021-01-13 21:37:29 +01:00
2 changed files with 24 additions and 3 deletions

View File

@ -49,7 +49,7 @@
OpenAPI.BASE = config.baseurl;
import { register as registerSW } from "./swmodule";
store.init();
registerSW();
// registerSW();
</script>
<Route>

View File

@ -24,19 +24,40 @@
)
check = true;
})(navigator.userAgent || navigator.vendor || window.opera);
const aspectratio=window.innerWidth/window.innerHeight;
if(aspectratio<=0.765){
check=true;
}
return check;
}
$: mobile = ismobile();
window.addEventListener('resize', function(){
const aspectratio=window.innerWidth/window.innerHeight;
if(aspectratio<=0.765){
navOpen=false;
mobile=true;
}else{
navOpen=true;
mobile=false;
}
});
// $: if (mobile===true) {
// console.log("changed to mobile");
// }
// $: if (mobile===false) {
// console.log("changed to md");
// }
function logout() {
localForage.clear();
location.replace("/");
}
</script>
<section class="min-h-screen bg-gray-50 dark:bg-black dark:text-gray-100">
<section class="min-h-screen bg-gray-50">
<nav
class:hidden={!navOpen && mobile}
class="select-none fixed top-0 left-0 z-20 h-full pb-10 overflow-x-hidden overflow-y-auto transition origin-left transform border-r w-60 md:translate-x-0">
class="select-none fixed top-0 left-0 z-20 h-full pb-10 overflow-x-hidden overflow-y-auto transition origin-left transform border-r w-60 md:translate-x-0 bg-gray-50">
<a href="/" class="flex items-center px-4 py-5">
<img
src="/lfk-logo.png"