2018-02-23 19:52:10 +01:00
<?lua
2018-09-05 16:56:04 +02:00
local data = post
2018-02-25 13:54:37 +01:00
local class = "card"
if HEADER.mobile then
class = "card mobile"
end
2018-09-05 16:56:04 +02:00
local content = data.rendered
2018-02-23 19:52:10 +01:00
?>
2018-02-25 13:54:37 +01:00
<div class = "<?=class?>">
2018-02-23 19:52:10 +01:00
<div class = "side">
<span class = "date"><?=data.ctimestr:gsub("%s+.*$","")?></span>
<span class = "tags">
<?lua
local atags = {}
local i = 1
for tag in data.tags:gmatch(",*([^,]+)") do
tag = std.trim(tag, " ")
2018-02-25 01:57:42 +01:00
if tag ~= "" then
local b64tag = std.b64encode(tag)
2018-09-05 16:56:04 +02:00
atags[i] = '<a href = "'..HTTP_ROOT..'/post/bytag/'..b64tag:gsub("=","")..'/'..POST_LIMIT..'">'..tag.."</a>"
2018-02-25 01:57:42 +01:00
i = i+ 1
end
2018-02-23 19:52:10 +01:00
end
echo(table.concat(atags, ", "))
2018-09-05 19:07:37 +02:00
local old_url = HTTP_ROOT.."/r:id:"..data.id
2018-02-23 19:52:10 +01:00
?>
</span>
2020-06-05 20:00:42 +02:00
<!--div class="fb-like" data-href="<?=old_url?>" data-layout="button_count" data-action="like" data-size="small" data-show-faces="true" data-share="true"></div-->
2018-06-05 15:40:15 +02:00
<!--div class="g-plusone" data-action="share" data-size="medium" data-href="<?=url?>"></div-->
2018-02-27 11:39:18 +01:00
<a class="twitter-share-button" href='https://twitter.com/intent/tweet?url=<?=url?>&text=<?=data.title?>'></a>
2018-02-23 19:52:10 +01:00
</div>
2020-12-09 11:22:51 +01:00
<div class = "blogentry markdown-body">
2018-02-23 19:52:10 +01:00
<div class = "shortcontent">
<?lua
local r, s = content:find("<hr/?>")
if r then
echo(content:sub(0,r-1))
echo(content:sub(s+1))
else
echo(content)
end
?>
</div>
2018-06-05 15:40:15 +02:00
<?lua
if similar_posts then
?>
<h1 class = "commentsec">Related posts</h1>
<?lua
echo("<ul>")
for k,v in pairs(similar_posts) do
2018-10-05 19:03:29 +02:00
echo("<li><a href='./"..v.st.sid.."'>"..v.post.title.."</a> (<b>Score</b>: "..string.format("%2.2f",v.st.score)..")</li>")
2018-06-05 15:40:15 +02:00
end
echo("</ul>")
end?>
2020-09-22 16:18:12 +02:00
<h1 class = "commentsec">Comments</h1>
<div>
2020-12-09 11:22:51 +01:00
The comment editor supports <b>Markdown</b> syntax. Your email is necessary to notify you of further updates on the discussion. It will be hidden from the public.
2020-09-22 16:18:12 +02:00
</div>
<div id="quick_talk_comment_thread"></div>
2018-02-23 19:52:10 +01:00
</div>
</div>