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

change handler

This commit is contained in:
Xuan Sang LE
2018-02-25 01:57:42 +01:00
parent 3e809b03c6
commit 7c7caa7b6e
7 changed files with 35 additions and 45 deletions

View File

@ -27,9 +27,11 @@
local i = 1
for tag in data.tags:gmatch(",*([^,]+)") do
tag = std.trim(tag, " ")
local b64tag = std.b64encode(tag)
atags[i] = '<a href = "./bytag:'..b64tag:gsub("=","")..':'..MAX_ENTRY..'">'..tag.."</a>"
i = i+ 1
if tag ~= "" then
local b64tag = std.b64encode(tag)
atags[i] = '<a href = "./r:bytag:'..b64tag:gsub("=","")..':'..MAX_ENTRY..'">'..tag.."</a>"
i = i+ 1
end
end
echo(table.concat(atags, ", "))
?>
@ -40,7 +42,7 @@
<div class = "shortcontent">
<?lua
local content = bytes.__tostring(std.b64decode(data.rendered)):gsub("%%","%%%%")
local content = bytes.__tostring(std.b64decode(data.rendered))
local r, s = content:find("<hr/?>")
if r then
echo(content:sub(0,r-1))

View File

@ -27,9 +27,11 @@
local i = 1
for tag in data.tags:gmatch(",*([^,]+)") do
tag = std.trim(tag, " ")
local b64tag = std.b64encode(tag)
atags[i] = '<a href = "./bytag:'..b64tag:gsub("=","")..':'..MAX_ENTRY..'">'..tag.."</a>"
i = i+ 1
if tag ~= "" then
local b64tag = std.b64encode(tag)
atags[i] = '<a href = "./r:bytag:'..b64tag:gsub("=","")..':'..MAX_ENTRY..'">'..tag.."</a>"
i = i+ 1
end
end
echo(table.concat(atags, ", "))
?>
@ -39,7 +41,7 @@
<div class = "blogentry">
<div class = "shortcontent">
<?lua
local content = bytes.__tostring(std.b64decode(data.rendered)):gsub("%%","%%%%")
local content = bytes.__tostring(std.b64decode(data.rendered))
local r, s = content:find("(<hr/?>)")
if r then
@ -50,7 +52,7 @@
</div>
<div class = "detail">
<span></span>
<?='<a href="./id:'..data.id..'" ></a>'?>
<?='<a href="./r:id:'..data.id..'" ></a>'?>
<span></span>
</div>
</div>