mobile: hide initial menu animation in landscape #210

This commit is contained in:
Sören Weber 2022-03-13 12:36:48 +01:00
parent 30bf0250e4
commit bc018cbb0d
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589
4 changed files with 8 additions and 5 deletions

View file

@ -22,8 +22,8 @@
</style>
{{- partial "custom-header.html" . }}
</head>
<body data-url="/">
<div id="body default-animation" style="margin-left:0px;">
<body class="mobile-support" data-url="/">
<div id="body" class="default-animation" style="margin-left:0px;">
<div id="sidebar-overlay"></div>
<main id="body-inner" class="chapter">
<div class="flex-block-wrapper">

View file

@ -24,7 +24,7 @@
{{- partial "stylesheet.html" . }}
{{- partial "custom-header.html" . }}
</head>
<body data-url="{{ .RelPermalink }}">
<body class="mobile-support" data-url="{{ .RelPermalink }}">
<div id="body" class="default-animation">
<div id="sidebar-overlay"></div>
<div id="toc-overlay"></div>

View file

@ -99,7 +99,7 @@ th {
}
.default-animation{
transition: all 0.5s ease;
transition: all 0.35s ease;
}
#sidebar {

View file

@ -1,6 +1,9 @@
var isIE = /*@cc_on!@*/false || !!document.documentMode;
if( !isIE ){
if( isIE ){
// we don't support sidebar flyout in IE
document.querySelector( 'body' ).classList.remove( 'mobile-support' );
}
else{
document.querySelector( 'body' ).classList.add( 'mobile-support' );
}
var touchsupport = ('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)