1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2025-07-26 02:29:47 +02:00

enable mobile compatibility

This commit is contained in:
lxsang
2021-02-07 11:35:26 +01:00
parent 0c6d81ef93
commit 3f1530cfe8
4 changed files with 27 additions and 11 deletions

View File

@ -111,7 +111,8 @@ local url = __main__:get("url")
<?lua
if tocdata then
?>
<div class = "doc-toc">
<button id="btn_toc" class="fa fa-bars"></button>
<div id="doc_toc" class = "doc-toc">
<?lua
if toc then
toc:set("data", tocdata)
@ -119,7 +120,7 @@ local url = __main__:get("url")
end
?>
</div>
<div class="doc-content markdown-body">
<div class="doc-content markdown-body" id="doc_content">
<?lua
if __main__ then
__main__:render()
@ -145,6 +146,12 @@ local url = __main__:get("url")
</div>
<script>
window.addEventListener('load', (event) => {
$("#btn_toc").click(function(){
$("#doc_toc").toggle();
});
$("#doc_content").click(function(){
$("#doc_toc").hide();
});
// tree view events
var toggler = document.getElementsByClassName("caret");
var i;