mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-11-20 02:18:20 +01:00
enable mobile compatibility
This commit is contained in:
parent
ecd409778a
commit
7f29ab310a
@ -145,7 +145,7 @@ div.search-icon {
|
|||||||
width: 35px;
|
width: 35px;
|
||||||
}
|
}
|
||||||
div.doc-toc {
|
div.doc-toc {
|
||||||
max-width: 80%;
|
max-width: 70%;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
background-color: #e3e3e3;
|
background-color: #e3e3e3;
|
||||||
color: #2c2c2c;
|
color: #2c2c2c;
|
||||||
|
@ -76,12 +76,12 @@
|
|||||||
<?lua
|
<?lua
|
||||||
|
|
||||||
if prev_entry then
|
if prev_entry then
|
||||||
echo("<a class = 'go_prev' href="..HTTP_ROOT..'/'..toc.controller..'/'..std.b64encode(prev_entry.path):gsub("=","")..'/'..prev_entry.name:gsub(" ", "_")..".md".." >")
|
echo("<a class = 'go_prev' href="..HTTP_ROOT..'/'..toc.controller..'/'..std.b64encode(prev_entry.path):gsub("=","")..'/'..prev_entry.name:gsub(" ", "_")..".md?show_toc=false".." >")
|
||||||
echo(prev_entry.name)
|
echo(prev_entry.name)
|
||||||
echo("</a>")
|
echo("</a>")
|
||||||
end
|
end
|
||||||
if next_entry then
|
if next_entry then
|
||||||
echo("<a class = 'go_next' href="..HTTP_ROOT..'/'..toc.controller..'/'..std.b64encode(next_entry.path):gsub("=","")..'/'..next_entry.name:gsub(" ", "_")..".md".." >")
|
echo("<a class = 'go_next' href="..HTTP_ROOT..'/'..toc.controller..'/'..std.b64encode(next_entry.path):gsub("=","")..'/'..next_entry.name:gsub(" ", "_")..".md?show_toc=false".." >")
|
||||||
echo(next_entry.name)
|
echo(next_entry.name)
|
||||||
echo("</a>")
|
echo("</a>")
|
||||||
end
|
end
|
||||||
@ -108,12 +108,12 @@ The comment editor supports <b>Markdown</b> syntax. Your email is necessary to n
|
|||||||
<div class = "pagenav">
|
<div class = "pagenav">
|
||||||
<?lua
|
<?lua
|
||||||
if prev_entry then
|
if prev_entry then
|
||||||
echo("<a class = 'go_prev' href="..HTTP_ROOT..'/'..toc.controller..'/'..std.b64encode(prev_entry.path):gsub("=","")..'/'..prev_entry.name:gsub(" ", "_")..".md".." >")
|
echo("<a class = 'go_prev' href="..HTTP_ROOT..'/'..toc.controller..'/'..std.b64encode(prev_entry.path):gsub("=","")..'/'..prev_entry.name:gsub(" ", "_")..".md?show_toc=false".." >")
|
||||||
echo(prev_entry.name)
|
echo(prev_entry.name)
|
||||||
echo("</a>")
|
echo("</a>")
|
||||||
end
|
end
|
||||||
if next_entry then
|
if next_entry then
|
||||||
echo("<a class = 'go_next' href="..HTTP_ROOT..'/'..toc.controller..'/'..std.b64encode(next_entry.path):gsub("=","")..'/'..next_entry.name:gsub(" ", "_")..".md".." >")
|
echo("<a class = 'go_next' href="..HTTP_ROOT..'/'..toc.controller..'/'..std.b64encode(next_entry.path):gsub("=","")..'/'..next_entry.name:gsub(" ", "_")..".md?show_toc=false".." >")
|
||||||
echo(next_entry.name)
|
echo(next_entry.name)
|
||||||
echo("</a>")
|
echo("</a>")
|
||||||
end
|
end
|
||||||
|
@ -3,6 +3,10 @@ local tocdata = __main__:get("toc")
|
|||||||
local elinks = __main__:get("elinks")
|
local elinks = __main__:get("elinks")
|
||||||
local has_3d = __main__:get("has_3d")
|
local has_3d = __main__:get("has_3d")
|
||||||
local url = __main__:get("url")
|
local url = __main__:get("url")
|
||||||
|
local show_toc_css = ''
|
||||||
|
if REQUEST.show_toc and REQUEST.show_toc == "false" then
|
||||||
|
show_toc_css = 'style="display:none;"'
|
||||||
|
end
|
||||||
local book_width_css='style="max-width:80%;"'
|
local book_width_css='style="max-width:80%;"'
|
||||||
if HEADER.mobile then
|
if HEADER.mobile then
|
||||||
book_width_css='style="max-width:95%;"'
|
book_width_css='style="max-width:95%;"'
|
||||||
@ -96,6 +100,7 @@ end
|
|||||||
</div>
|
</div>
|
||||||
<form id = "search_form" action="<?=HTTP_ROOT..'/'..tocdata.controller..'/search/'?>" method="get" class="search-form">
|
<form id = "search_form" action="<?=HTTP_ROOT..'/'..tocdata.controller..'/search/'?>" method="get" class="search-form">
|
||||||
<input id = "search_box" name="q" type = "text" class = "search-box"></input>
|
<input id = "search_box" name="q" type = "text" class = "search-box"></input>
|
||||||
|
<input name="show_toc" type = "hidden" value="false"></input>
|
||||||
</form>
|
</form>
|
||||||
<div class= "search-icon"></div>
|
<div class= "search-icon"></div>
|
||||||
<?lua
|
<?lua
|
||||||
@ -105,7 +110,7 @@ end
|
|||||||
</div>
|
</div>
|
||||||
<div id = "cover">
|
<div id = "cover">
|
||||||
<div id = "book" <?=book_width_css?>>
|
<div id = "book" <?=book_width_css?>>
|
||||||
<div id="doc_toc" class = "doc-toc">
|
<div id="doc_toc" class = "doc-toc" <?=show_toc_css?> >
|
||||||
<div class = "doc-name doc-toc-header">
|
<div class = "doc-name doc-toc-header">
|
||||||
<?lua if tocdata then ?>
|
<?lua if tocdata then ?>
|
||||||
<a href ="<?=HTTP_ROOT..'/'..tocdata.controller..'/'?>">
|
<a href ="<?=HTTP_ROOT..'/'..tocdata.controller..'/'?>">
|
||||||
|
Loading…
Reference in New Issue
Block a user