1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2025-04-17 09:16:44 +02:00

enable mobile compatibility

This commit is contained in:
lxsang 2021-02-07 12:36:52 +01:00
parent 8d0f9d3480
commit 9fce4a3fd5
2 changed files with 25 additions and 7 deletions

View File

@ -29,11 +29,11 @@ body {
width: 100%; width: 100%;
padding: 5px; padding: 5px;
border-top: 1px solid #878887; border-top: 1px solid #878887;
z-index: 22;
} }
#cover { #cover {
/* height: calc(100% - 50px); */ height: calc(100% - 50px);
height: calc(100% - 30px);
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
} }
@ -125,9 +125,10 @@ div.doc-toc {
overflow: auto; overflow: auto;
position: fixed; position: fixed;
top: 30px; top: 30px;
bottom: 0px; bottom: 30px;
border-right: 1px solid #c9c9c9; border-right: 1px solid #c9c9c9;
padding-top: 10px; padding-top: 0;
padding-bottom: 10px;
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.65); box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.65);
z-index: 20; z-index: 20;
} }
@ -135,7 +136,21 @@ button#btn_toc {
width: 33px; width: 33px;
height: 33px; height: 33px;
position: fixed; position: fixed;
border: 1px solid #dadddd; border: 1px solid #c9c9c9;
background-color: #e3e3e3;
z-index: 21;
outline: none;
}
div.doc-to-header{
display: block;
padding: 0px;
margin: 0px;
padding-left: 37px;
padding-top: 9px;
height: 24px;
border-bottom: 1px solid #c9c9c9;
font-weight: bold;
} }
div.doc-toc a { div.doc-toc a {

View File

@ -11,6 +11,8 @@ end
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link <link
rel="stylesheet" rel="stylesheet"
type="text/css" type="text/css"
@ -117,6 +119,7 @@ end
?> ?>
<button id="btn_toc" class="fa fa-bars"></button> <button id="btn_toc" class="fa fa-bars"></button>
<div id="doc_toc" class = "doc-toc"> <div id="doc_toc" class = "doc-toc">
<div class = "doc-to-header">Table of content</div>
<?lua <?lua
if toc then if toc then
toc:set("data", tocdata) toc:set("data", tocdata)
@ -145,9 +148,9 @@ end
</div> </div>
</div> </div>
<!--div id = "bottom"> <div id = "bottom">
Powered by antd server, (c) 2019 - <?=os.date("*t").year?> Xuan Sang LE Powered by antd server, (c) 2019 - <?=os.date("*t").year?> Xuan Sang LE
</div--> </div>
<script> <script>
window.addEventListener('load', (event) => { window.addEventListener('load', (event) => {
$("#btn_toc").click(function(){ $("#btn_toc").click(function(){