1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2024-11-20 02:18:20 +01:00

minor fix

This commit is contained in:
Xuan Sang LE 2018-02-25 15:19:31 +01:00
parent ec45ad9cb1
commit 08a48dc525
2 changed files with 20 additions and 2 deletions

View File

@ -246,6 +246,9 @@ button{
padding-bottom: 5px;
text-align: left;
}
#container .blogentry .title_link {
color:#2c2c2c;
}
#container .blogentry h2{
font-size: 18px;
text-align: left;
@ -389,6 +392,7 @@ div.commentform .inputbox{
}
div.commentform .inputbox input{
margin-top:3px;
flex:1;
}
div.commentform .inputbox .label{
padding-right: 5px;

View File

@ -47,12 +47,26 @@
<div class = "shortcontent">
<?lua
local content = bytes.__tostring(std.b64decode(data.rendered)):gsub("%%","%%%%")
local r, s = content:find("(<hr/?>)")
local title = nil
if r then
content = content:sub(0,r-1)
end
echo(content)
local a,b = content:find("<[Hh]1[^>]*>")
local c,d
if a then
c,d = content:find("</[Hh]1>")
if c then
title = content:sub(b+1, c-1)
end
end
if title then
echo(content:sub(0, b))
echo("<a class = 'title_link' href='./r:id:"..data.id.."'>"..title.."</a>")
echo(content:sub(c))
else
echo(content)
end
?>
</div>
<div class = "detail">