parent
f58e7b958c
commit
dae0f7b4bf
|
@ -25,14 +25,15 @@ local function get_site_home(req)
|
|||
log(LOG_DEBUG,"Cache miss, rendering site index")
|
||||
stmnt_index:bind_names{}
|
||||
local latest = {}
|
||||
for tagsr, idr, title, iar, dater, author in util.sql_rows(stmnt_index) do
|
||||
for idr, title, iar, dater, author in util.sql_rows(stmnt_index) do
|
||||
print("got:",tagsr,idr,title,iar,dater,author)
|
||||
table.insert(latest,{
|
||||
url = util.encode_id(idr),
|
||||
title = title,
|
||||
isanon = tonumber(iar) == 1,
|
||||
posted = os.date("%B %d %Y",tonumber(dater)),
|
||||
author = author,
|
||||
tags = libtags.get(tagsr),
|
||||
tags = libtags.get(idr),
|
||||
})
|
||||
end
|
||||
return pages.index{
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
</td><td>
|
||||
<ul class="row tag-list">
|
||||
<% for i = 1,math.min(#v.tags, 5) do %>
|
||||
<li><a class="tag button button-outline" href="https://<%= domain %>/_search?q=+<%= v.tags[i] %>"><%= v.tags[i] %></a></li>
|
||||
<li><a class="tag button button-outline" href="https://<%= domain %>/_search?q=%2B<%= v.tags[i] %>"><%= v.tags[i] %></a></li>
|
||||
<% end %>
|
||||
<% if #v.tags > 5 then %>
|
||||
<li>+<%= #v.tags - 5 %></li>
|
||||
|
|
Loading…
Reference in New Issue