mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-06-29 20:20:31 +00:00
print: add option to print whole chapter #230
This commit is contained in:
parent
70b4143327
commit
0dd92e332b
53 changed files with 454 additions and 71 deletions
static/js
|
@ -7,6 +7,8 @@ if( isIE ){
|
|||
else{
|
||||
document.querySelector( 'body' ).classList.add( 'mobile-support' );
|
||||
}
|
||||
var isPrint = document.querySelector( 'body' ).classList.contains( 'print' );
|
||||
|
||||
var touchsupport = ('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)
|
||||
|
||||
var formelements = 'button, datalist, fieldset, input, label, legend, meter, optgroup, option, output, progress, select, textarea';
|
||||
|
@ -295,6 +297,10 @@ function initArrowNav(){
|
|||
}
|
||||
|
||||
function initMenuScrollbar(){
|
||||
if( isPrint ){
|
||||
return;
|
||||
}
|
||||
|
||||
var content = '#body-inner';
|
||||
if( isIE ){
|
||||
// IE can not display the topbar as sticky; so we let
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue