mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
mobile: hide initial menu animation in landscape #210
This commit is contained in:
parent
30bf0250e4
commit
bc018cbb0d
4 changed files with 8 additions and 5 deletions
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -99,7 +99,7 @@ th {
|
|||
}
|
||||
|
||||
.default-animation{
|
||||
transition: all 0.5s ease;
|
||||
transition: all 0.35s ease;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue