mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +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>
|
</style>
|
||||||
{{- partial "custom-header.html" . }}
|
{{- partial "custom-header.html" . }}
|
||||||
</head>
|
</head>
|
||||||
<body data-url="/">
|
<body class="mobile-support" data-url="/">
|
||||||
<div id="body default-animation" style="margin-left:0px;">
|
<div id="body" class="default-animation" style="margin-left:0px;">
|
||||||
<div id="sidebar-overlay"></div>
|
<div id="sidebar-overlay"></div>
|
||||||
<main id="body-inner" class="chapter">
|
<main id="body-inner" class="chapter">
|
||||||
<div class="flex-block-wrapper">
|
<div class="flex-block-wrapper">
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
{{- partial "stylesheet.html" . }}
|
{{- partial "stylesheet.html" . }}
|
||||||
{{- partial "custom-header.html" . }}
|
{{- partial "custom-header.html" . }}
|
||||||
</head>
|
</head>
|
||||||
<body data-url="{{ .RelPermalink }}">
|
<body class="mobile-support" data-url="{{ .RelPermalink }}">
|
||||||
<div id="body" class="default-animation">
|
<div id="body" class="default-animation">
|
||||||
<div id="sidebar-overlay"></div>
|
<div id="sidebar-overlay"></div>
|
||||||
<div id="toc-overlay"></div>
|
<div id="toc-overlay"></div>
|
||||||
|
|
|
@ -99,7 +99,7 @@ th {
|
||||||
}
|
}
|
||||||
|
|
||||||
.default-animation{
|
.default-animation{
|
||||||
transition: all 0.5s ease;
|
transition: all 0.35s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar {
|
#sidebar {
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
var isIE = /*@cc_on!@*/false || !!document.documentMode;
|
var isIE = /*@cc_on!@*/false || !!document.documentMode;
|
||||||
if( !isIE ){
|
if( isIE ){
|
||||||
// we don't support sidebar flyout in IE
|
// we don't support sidebar flyout in IE
|
||||||
|
document.querySelector( 'body' ).classList.remove( 'mobile-support' );
|
||||||
|
}
|
||||||
|
else{
|
||||||
document.querySelector( 'body' ).classList.add( 'mobile-support' );
|
document.querySelector( 'body' ).classList.add( 'mobile-support' );
|
||||||
}
|
}
|
||||||
var touchsupport = ('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)
|
var touchsupport = ('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)
|
||||||
|
|
Loading…
Reference in a new issue