1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2025-07-27 11:09:48 +02:00

WIP: make code compatible with new SILK API
All checks were successful
gitea-sync/antd-web-apps/pipeline/head This commit looks good

This commit is contained in:
DanyLE
2023-04-26 18:51:03 +02:00
parent 93b6ca18ad
commit a76942f2f3
60 changed files with 1527 additions and 2845 deletions

View File

@ -76,12 +76,12 @@
<?lua
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?show_toc=false".." >")
echo("<a class = 'go_prev' href="..HTTP_ROOT..'/'..toc.controller..'/'..enc.b64encode(prev_entry.path):gsub("=","")..'/'..prev_entry.name:gsub(" ", "_")..".md?show_toc=false".." >")
echo(prev_entry.name)
echo("</a>")
end
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?show_toc=false".." >")
echo("<a class = 'go_next' href="..HTTP_ROOT..'/'..toc.controller..'/'..enc.b64encode(next_entry.path):gsub("=","")..'/'..next_entry.name:gsub(" ", "_")..".md?show_toc=false".." >")
echo(next_entry.name)
echo("</a>")
end
@ -108,12 +108,12 @@ The comment editor supports <b>Markdown</b> syntax. Your email is necessary to n
<div class = "pagenav">
<?lua
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?show_toc=false".." >")
echo("<a class = 'go_prev' href="..HTTP_ROOT..'/'..toc.controller..'/'..enc.b64encode(prev_entry.path):gsub("=","")..'/'..prev_entry.name:gsub(" ", "_")..".md?show_toc=false".." >")
echo(prev_entry.name)
echo("</a>")
end
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?show_toc=false".." >")
echo("<a class = 'go_next' href="..HTTP_ROOT..'/'..toc.controller..'/'..enc.b64encode(next_entry.path):gsub("=","")..'/'..next_entry.name:gsub(" ", "_")..".md?show_toc=false".." >")
echo(next_entry.name)
echo("</a>")
end

View File

@ -7,9 +7,9 @@
local title = io.read()
io.close()
file = file:gsub(map.local_path, map.vfs_path)
title = std.trim(std.trim(title, "#"), " ")
title = ulib.trim(ulib.trim(title, "#"), " ")
echo("<div>")
echo("<p class= 'result-header'><a href='"..HTTP_ROOT..'/'..controller..'/'..std.b64encode(file):gsub("=","")..'/'..title:gsub(" ", "_")..".md'>")
echo("<p class= 'result-header'><a href='"..HTTP_ROOT..'/'..controller..'/'..enc.b64encode(file):gsub("=","")..'/'..title:gsub(" ", "_")..".md'>")
echo(title)
echo("</a></p>")
for i,content in ipairs(arr) do