mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add support for adding calibre to the homescreen on Android and iOS devices
This commit is contained in:
parent
1cf008ab2a
commit
6c670b22a4
@ -5,9 +5,11 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="robots" content="noindex">
|
<meta name="robots" content="noindex">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel="icon" type="image/png" href="favicon.png">
|
<link rel="icon" sizes="256x256" type="image/png" href="favicon.png">
|
||||||
<link rel="apple-touch-icon" href="apple-touch-icon.png">
|
<link rel="apple-touch-icon" sizes="256x256" href="apple-touch-icon.png">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="page_load_progress">
|
<div id="page_load_progress">
|
||||||
|
@ -62,10 +62,11 @@ def margin_elem(sd, which, id, onclick):
|
|||||||
)
|
)
|
||||||
if onclick:
|
if onclick:
|
||||||
ans.addEventListener('click', onclick)
|
ans.addEventListener('click', onclick)
|
||||||
if is_ios and which is 'margin_bottom' and not /CriOS\//.test(window.navigator.userAgent):
|
if is_ios and which is 'margin_bottom' and not window.navigator.standalone and not /CriOS\//.test(window.navigator.userAgent):
|
||||||
# On iOS Safari 100vh includes the size of the navbar and there is no way to
|
# On iOS Safari 100vh includes the size of the navbar and there is no way to
|
||||||
# go fullscreen, so to make the bottom bar visible we add a margin to
|
# go fullscreen, so to make the bottom bar visible we add a margin to
|
||||||
# the bottom bar. CriOS is for Chrome on iOS.
|
# the bottom bar. CriOS is for Chrome on iOS. And in standalone
|
||||||
|
# (web-app mode) there is no nav bar.
|
||||||
ans.style.marginBottom = '25px'
|
ans.style.marginBottom = '25px'
|
||||||
return ans
|
return ans
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user